mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add ast json converter for ModifierInvocation and EventDefinition
This commit is contained in:
@@ -181,11 +181,23 @@ bool ASTJsonConverter::visit(ModifierDefinition const& _node)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTJsonConverter::visit(ModifierInvocation const& _node)
|
||||
{
|
||||
addJsonNode(_node, "Modifier", {}, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTJsonConverter::visit(TypeName const&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTJsonConverter::visit(EventDefinition const& _node)
|
||||
{
|
||||
addJsonNode(_node, "Event", { make_pair("name", _node.name()) }, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTJsonConverter::visit(ElementaryTypeName const& _node)
|
||||
{
|
||||
addJsonNode(_node, "ElementaryTypeName", { make_pair("name", _node.typeName().toString()) });
|
||||
@@ -420,6 +432,16 @@ void ASTJsonConverter::endVisit(ModifierDefinition const&)
|
||||
goUp();
|
||||
}
|
||||
|
||||
void ASTJsonConverter::endVisit(ModifierInvocation const&)
|
||||
{
|
||||
goUp();
|
||||
}
|
||||
|
||||
void ASTJsonConverter::endVisit(EventDefinition const&)
|
||||
{
|
||||
goUp();
|
||||
}
|
||||
|
||||
void ASTJsonConverter::endVisit(TypeName const&)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ public:
|
||||
bool visit(FunctionDefinition const& _node) override;
|
||||
bool visit(VariableDeclaration const& _node) override;
|
||||
bool visit(ModifierDefinition const& _node) override;
|
||||
bool visit(ModifierInvocation const& _node) override;
|
||||
bool visit(EventDefinition const& _node) override;
|
||||
bool visit(TypeName const& _node) override;
|
||||
bool visit(ElementaryTypeName const& _node) override;
|
||||
bool visit(UserDefinedTypeName const& _node) override;
|
||||
@@ -101,6 +103,8 @@ public:
|
||||
void endVisit(FunctionDefinition const&) override;
|
||||
void endVisit(VariableDeclaration const&) override;
|
||||
void endVisit(ModifierDefinition const&) override;
|
||||
void endVisit(ModifierInvocation const&) override;
|
||||
void endVisit(EventDefinition const&) override;
|
||||
void endVisit(TypeName const&) override;
|
||||
void endVisit(ElementaryTypeName const&) override;
|
||||
void endVisit(UserDefinedTypeName const&) override;
|
||||
|
||||
Reference in New Issue
Block a user