diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-29 21:54:34 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-21 02:38:00 +0800 |
commit | 50bb24af5e84b9fea7fa4132227c9ce2462dede6 (patch) | |
tree | a7a3c89d0209e008c8d5a8de6469657ba46c2b62 /libsolidity | |
parent | 115458c50eec4dc32fdbfe5847fca4134a470668 (diff) | |
download | dexon-solidity-50bb24af5e84b9fea7fa4132227c9ce2462dede6.tar.gz dexon-solidity-50bb24af5e84b9fea7fa4132227c9ce2462dede6.tar.zst dexon-solidity-50bb24af5e84b9fea7fa4132227c9ce2462dede6.zip |
Include source mapping identifier
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 390332e8..82a4ce7b 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -135,6 +135,16 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) Json::Value output = Json::objectValue; + output["sources"] = Json::objectValue; + unsigned sourceIndex = 0; + for (auto const& source: m_compilerStack.sourceNames()) + { + Json::Value sourceResult = Json::objectValue; + sourceResult["id"] = sourceIndex++; + // @TODO add ast + output["sources"][source] = sourceResult; + } + Json::Value contractsOutput = Json::objectValue; for (string const& contractName: m_compilerStack.contractNames()) { |