diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-14 22:27:31 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-15 23:56:40 +0800 |
commit | 2eaf9ff865c029fb1a2aa3595a93275963ffe0cd (patch) | |
tree | ae7c99ac737e4682bc1d2ef5e3a88c3d7898f249 /ASTJsonConverter.cpp | |
parent | bcf49095a2f66083f2a198be424daa98ac2e5b72 (diff) | |
download | dexon-solidity-2eaf9ff865c029fb1a2aa3595a93275963ffe0cd.tar.gz dexon-solidity-2eaf9ff865c029fb1a2aa3595a93275963ffe0cd.tar.zst dexon-solidity-2eaf9ff865c029fb1a2aa3595a93275963ffe0cd.zip |
ASTJSonconverter stack takes objects and not pointers
Diffstat (limited to 'ASTJsonConverter.cpp')
-rw-r--r-- | ASTJsonConverter.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ASTJsonConverter.cpp b/ASTJsonConverter.cpp index 3ef6728b..0e40713a 100644 --- a/ASTJsonConverter.cpp +++ b/ASTJsonConverter.cpp @@ -42,12 +42,12 @@ void ASTJsonConverter::addJsonNode(string const& _typeName, attrs[e.first] = e.second; node["attributes"] = attrs; - m_jsonNodePtrs.top()->append(node); + m_jsonNodePtrs.top().append(node); if (_hasChildren) { Json::Value children(Json::arrayValue); node["children"] = children; - m_jsonNodePtrs.push(&node["children"]); + m_jsonNodePtrs.push(node["children"]); m_depth ++; cout << "goDown" << endl; } @@ -62,9 +62,7 @@ ASTJsonConverter::ASTJsonConverter(ASTNode const& _ast): m_ast(&_ast), m_depth(0 m_astJson["attributes"] = attrs; attrs["name"] = "nameoffile"; //TODO m_astJson["children"] = children; - // m_jsonNodePtrs.push(&m_astJson["children"]); - m_jsonNodePtrs.push(&m_astJson["children"]); - // m_jsonNodePtrs.push(&children); + m_jsonNodePtrs.push(m_astJson["children"]); } void ASTJsonConverter::print(ostream& _stream) |