diff options
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 9362b86b..1b792694 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -138,6 +138,12 @@ bool ASTJsonConverter::visit(StructDefinition const& _node) return true; } +bool ASTJsonConverter::visit(EnumDefinition const& _node) +{ + addJsonNode(_node, "Enum", { make_pair("name", _node.name()) }, true); + return true; +} + bool ASTJsonConverter::visit(ParameterList const& _node) { addJsonNode(_node, "ParameterList", {}, true); @@ -372,6 +378,11 @@ void ASTJsonConverter::endVisit(StructDefinition const&) goUp(); } +void ASTJsonConverter::endVisit(EnumDefinition const&) +{ + goUp(); +} + void ASTJsonConverter::endVisit(ParameterList const&) { goUp(); diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h index 8e25802a..4ee21803 100644 --- a/libsolidity/ast/ASTJsonConverter.h +++ b/libsolidity/ast/ASTJsonConverter.h @@ -56,6 +56,7 @@ public: bool visit(InheritanceSpecifier const& _node) override; bool visit(UsingForDirective const& _node) override; bool visit(StructDefinition const& _node) override; + bool visit(EnumDefinition const& _node) override; bool visit(ParameterList const& _node) override; bool visit(FunctionDefinition const& _node) override; bool visit(VariableDeclaration const& _node) override; @@ -92,6 +93,7 @@ public: void endVisit(InheritanceSpecifier const&) override; void endVisit(UsingForDirective const&) override; void endVisit(StructDefinition const&) override; + void endVisit(EnumDefinition const&) override; void endVisit(ParameterList const&) override; void endVisit(FunctionDefinition const&) override; void endVisit(VariableDeclaration const&) override; |