diff options
Diffstat (limited to 'libsolidity')
-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 1b792694..9af002a3 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -144,6 +144,12 @@ bool ASTJsonConverter::visit(EnumDefinition const& _node) return true; } +bool ASTJsonConverter::visit(EnumValue const& _node) +{ + addJsonNode(_node, "EnumValue", { make_pair("name", _node.name()) }, true); + return true; +} + bool ASTJsonConverter::visit(ParameterList const& _node) { addJsonNode(_node, "ParameterList", {}, true); @@ -383,6 +389,11 @@ void ASTJsonConverter::endVisit(EnumDefinition const&) goUp(); } +void ASTJsonConverter::endVisit(EnumValue const&) +{ + goUp(); +} + void ASTJsonConverter::endVisit(ParameterList const&) { goUp(); diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h index 4ee21803..009c9607 100644 --- a/libsolidity/ast/ASTJsonConverter.h +++ b/libsolidity/ast/ASTJsonConverter.h @@ -57,6 +57,7 @@ public: bool visit(UsingForDirective const& _node) override; bool visit(StructDefinition const& _node) override; bool visit(EnumDefinition const& _node) override; + bool visit(EnumValue const& _node) override; bool visit(ParameterList const& _node) override; bool visit(FunctionDefinition const& _node) override; bool visit(VariableDeclaration const& _node) override; @@ -94,6 +95,7 @@ public: void endVisit(UsingForDirective const&) override; void endVisit(StructDefinition const&) override; void endVisit(EnumDefinition const&) override; + void endVisit(EnumValue const&) override; void endVisit(ParameterList const&) override; void endVisit(FunctionDefinition const&) override; void endVisit(VariableDeclaration const&) override; |