diff options
author | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-16 21:25:25 +0800 |
---|---|---|
committer | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-18 20:29:59 +0800 |
commit | 9e7fc124633ae1503ab33f1842f0164d895f46d2 (patch) | |
tree | 04dea677628aab5f3463baceb3e278cc29eece07 /libsolidity/ast | |
parent | c282ab379aac4a6b14f59a957c6261e2edb8b1ce (diff) | |
download | dexon-solidity-9e7fc124633ae1503ab33f1842f0164d895f46d2.tar.gz dexon-solidity-9e7fc124633ae1503ab33f1842f0164d895f46d2.tar.zst dexon-solidity-9e7fc124633ae1503ab33f1842f0164d895f46d2.zip |
Add a ast json converter for InheritanceSpecifier
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 11 | ||||
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index c4134f4e..60a3fd0a 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -120,6 +120,12 @@ bool ASTJsonConverter::visit(ContractDefinition const& _node) return true; } +bool ASTJsonConverter::visit(InheritanceSpecifier const& _node) +{ + addJsonNode(_node, "Inheritance", { }, true); + return true; +} + bool ASTJsonConverter::visit(StructDefinition const& _node) { addJsonNode(_node, "Struct", { make_pair("name", _node.name()) }, true); @@ -345,6 +351,11 @@ void ASTJsonConverter::endVisit(ContractDefinition const&) goUp(); } +void ASTJsonConverter::endVisit(InheritanceSpecifier const&) +{ + goUp(); +} + void ASTJsonConverter::endVisit(StructDefinition const&) { goUp(); diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h index ca4d9c2d..fb32352d 100644 --- a/libsolidity/ast/ASTJsonConverter.h +++ b/libsolidity/ast/ASTJsonConverter.h @@ -53,6 +53,7 @@ public: bool visit(ImportDirective const& _node) override; bool visit(ContractDefinition const& _node) override; + bool visit(InheritanceSpecifier const& _node) override; bool visit(StructDefinition const& _node) override; bool visit(ParameterList const& _node) override; bool visit(FunctionDefinition const& _node) override; @@ -87,6 +88,7 @@ public: void endVisit(ImportDirective const&) override; void endVisit(ContractDefinition const&) override; + void endVisit(InheritanceSpecifier const&) override; void endVisit(StructDefinition const&) override; void endVisit(ParameterList const&) override; void endVisit(FunctionDefinition const&) override; |