diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-29 21:59:00 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-21 02:38:00 +0800 |
commit | 5aec120da345fc5e59cf3847d3947b34ee0a54a7 (patch) | |
tree | de9bcb045554ddac3c8ee9ab0b632dd27e63d8a2 /libsolidity/interface | |
parent | 50bb24af5e84b9fea7fa4132227c9ce2462dede6 (diff) | |
download | dexon-solidity-5aec120da345fc5e59cf3847d3947b34ee0a54a7.tar.gz dexon-solidity-5aec120da345fc5e59cf3847d3947b34ee0a54a7.tar.zst dexon-solidity-5aec120da345fc5e59cf3847d3947b34ee0a54a7.zip |
Support the AST output
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 82a4ce7b..d78a9487 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -22,6 +22,7 @@ #include <libsolidity/interface/StandardCompiler.h> #include <libsolidity/interface/SourceReferenceFormatter.h> +#include <libsolidity/ast/ASTJsonConverter.h> #include <libevmasm/Instruction.h> #include <libdevcore/JSON.h> @@ -141,7 +142,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) { Json::Value sourceResult = Json::objectValue; sourceResult["id"] = sourceIndex++; - // @TODO add ast + sourceResult["ast"] = ASTJsonConverter(m_compilerStack.ast(source), m_compilerStack.sourceIndices()).json(); output["sources"][source] = sourceResult; } |