Skip to content

Commit 4e3df5b

Browse files
committed
Add visitEmitStatement method
Allows parsing of event emit statements. Uses the same nomenclature as Solidity ast-compact-json.
1 parent 51051c7 commit 4e3df5b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

solidity_parser/parser.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ def visitFunctionCall(self, ctx):
313313
arguments=args,
314314
names=names)
315315

316+
def visitEmitStatement(self, ctx):
317+
return Node(ctx=ctx,
318+
type='EmitStatement',
319+
eventCall=self.visit(ctx.getChild(1)))
320+
316321
def visitStructDefinition(self, ctx):
317322
return Node(ctx=ctx,
318323
type='StructDefinition',

0 commit comments

Comments
 (0)