diff options
author | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-17 22:23:20 +0800 |
---|---|---|
committer | Alex Sinyagin <sinyagin.alexander@gmail.com> | 2016-08-18 20:29:59 +0800 |
commit | a5d15e6895212a034f459ba06fe0ca62ba5c0904 (patch) | |
tree | d7935ea400a8a297c27cc8b8cebc8a71c8c072f6 /libsolidity | |
parent | 95832da16ea1577dd50e62212dd0ea620e2fcaeb (diff) | |
download | dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar.gz dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar.bz2 dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar.lz dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar.xz dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.tar.zst dexon-solidity-a5d15e6895212a034f459ba06fe0ca62ba5c0904.zip |
Add ast json converter for ModifierDefinition
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 9af002a3..bcf2577a 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -175,6 +175,12 @@ bool ASTJsonConverter::visit(VariableDeclaration const& _node) return true; } +bool ASTJsonConverter::visit(ModifierDefinition const& _node) +{ + addJsonNode(_node, "ModifierDefinition", { make_pair("name", _node.name()) }, true); + return true; +} + bool ASTJsonConverter::visit(TypeName const&) { return true; @@ -409,6 +415,11 @@ void ASTJsonConverter::endVisit(VariableDeclaration const&) goUp(); } +void ASTJsonConverter::endVisit(ModifierDefinition const&) +{ + goUp(); +} + void ASTJsonConverter::endVisit(TypeName const&) { } diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h index 009c9607..7808d76f 100644 --- a/libsolidity/ast/ASTJsonConverter.h +++ b/libsolidity/ast/ASTJsonConverter.h @@ -61,6 +61,7 @@ public: bool visit(ParameterList const& _node) override; bool visit(FunctionDefinition const& _node) override; bool visit(VariableDeclaration const& _node) override; + bool visit(ModifierDefinition const& _node) override; bool visit(TypeName const& _node) override; bool visit(ElementaryTypeName const& _node) override; bool visit(UserDefinedTypeName const& _node) override; @@ -99,6 +100,7 @@ public: void endVisit(ParameterList const&) override; void endVisit(FunctionDefinition const&) override; void endVisit(VariableDeclaration const&) override; + void endVisit(ModifierDefinition const&) override; void endVisit(TypeName const&) override; void endVisit(ElementaryTypeName const&) override; void endVisit(UserDefinedTypeName const&) override; |