From f1da1d07efce6f0c927e8a54ba5dfaeec14ede0e Mon Sep 17 00:00:00 2001 From: NoiTaTuM Date: Tue, 21 May 2019 13:59:05 -0300 Subject: [PATCH] Add emit statement support. This adds support for parsing event emit statements. Uses the same nomenclature as Solidity ast-compact-json. --- solidity_parser/parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solidity_parser/parser.py b/solidity_parser/parser.py index ea8898a..2da8f39 100644 --- a/solidity_parser/parser.py +++ b/solidity_parser/parser.py @@ -313,6 +313,11 @@ def visitFunctionCall(self, ctx): arguments=args, names=names) + def visitEmitStatement(self, ctx): + return Node(ctx=ctx, + type='EmitStatement', + eventCall=self.visit(ctx.getChild(1))) + def visitStructDefinition(self, ctx): return Node(ctx=ctx, type='StructDefinition',