From 83cc8dfe008341948306fd38e5405429753cb8d0 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 28 Jan 2015 08:50:53 +0100 Subject: JSON compiler. --- CompilerStack.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CompilerStack.cpp') diff --git a/CompilerStack.cpp b/CompilerStack.cpp index d6274e2c..a2a17831 100644 --- a/CompilerStack.cpp +++ b/CompilerStack.cpp @@ -184,13 +184,16 @@ dev::h256 CompilerStack::getContractCodeHash(string const& _contractName) const return dev::sha3(getRuntimeBytecode(_contractName)); } -void CompilerStack::streamAssembly(ostream& _outStream, string const& _contractName, StringMap _sourceCodes, bool _inJsonFormat) const +Json::Value CompilerStack::streamAssembly(ostream& _outStream, string const& _contractName, StringMap _sourceCodes, bool _inJsonFormat) const { Contract const& contract = getContract(_contractName); if (contract.compiler) - contract.compiler->streamAssembly(_outStream, _sourceCodes, _inJsonFormat); + return contract.compiler->streamAssembly(_outStream, _sourceCodes, _inJsonFormat); else + { _outStream << "Contract not fully implemented" << endl; + return Json::Value(); + } } string const& CompilerStack::getInterface(string const& _contractName) const -- cgit v1.2.3