aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
authorAlex Sinyagin <sinyagin.alexander@gmail.com>2016-08-16 23:18:57 +0800
committerAlex Sinyagin <sinyagin.alexander@gmail.com>2016-08-18 20:29:59 +0800
commita9e04217a4f22eb9869a7830ba8f33bd72f2e452 (patch)
tree87e5081f0e78cb95ffbd39b063b403b303b70df8 /libsolidity/ast/ASTJsonConverter.cpp
parentaf64219e17f2a01c1a27e19873ab6b03bfd01bfd (diff)
downloaddexon-solidity-a9e04217a4f22eb9869a7830ba8f33bd72f2e452.tar.gz
dexon-solidity-a9e04217a4f22eb9869a7830ba8f33bd72f2e452.tar.zst
dexon-solidity-a9e04217a4f22eb9869a7830ba8f33bd72f2e452.zip
Add ast json converter for EnumDefinition
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp11
1 files changed, 11 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();