diff options
author | Christian <c@ethdev.com> | 2015-01-28 15:50:53 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-04-22 17:33:25 +0800 |
commit | 83cc8dfe008341948306fd38e5405429753cb8d0 (patch) | |
tree | f9e8fca70aad6cbea6681f445414bb763a1637cd /ASTJsonConverter.h | |
parent | a44bcb6909478543151cac871fdbbc4909ad54aa (diff) | |
download | dexon-solidity-83cc8dfe008341948306fd38e5405429753cb8d0.tar.gz dexon-solidity-83cc8dfe008341948306fd38e5405429753cb8d0.tar.zst dexon-solidity-83cc8dfe008341948306fd38e5405429753cb8d0.zip |
JSON compiler.
Diffstat (limited to 'ASTJsonConverter.h')
-rw-r--r-- | ASTJsonConverter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ASTJsonConverter.h b/ASTJsonConverter.h index 30a92e66..56502ab3 100644 --- a/ASTJsonConverter.h +++ b/ASTJsonConverter.h @@ -44,6 +44,7 @@ public: ASTJsonConverter(ASTNode const& _ast); /// Output the json representation of the AST to _stream. void print(std::ostream& _stream); + Json::Value const& json(); bool visit(ImportDirective const& _node) override; bool visit(ContractDefinition const& _node) override; @@ -114,6 +115,7 @@ public: void endVisit(Literal const&) override; private: + void process(); void addKeyValue(Json::Value& _obj, std::string const& _key, std::string const& _val); void addJsonNode(std::string const& _nodeName, std::initializer_list<std::pair<std::string const, std::string const>> _list, @@ -123,8 +125,9 @@ private: { solAssert(!m_jsonNodePtrs.empty(), "Uneven json nodes stack. Internal error."); m_jsonNodePtrs.pop(); - }; + } + bool processed = false; Json::Value m_astJson; std::stack<Json::Value*> m_jsonNodePtrs; std::string m_source; |