federicobond / solidity-parser-antlr

A Solidity parser for JS built on top of a robust ANTLR4 grammar
MIT License
155 stars 55 forks source link

[Question] what is definition of AST node type ExpressionStatement ? #61

Open yxliang01 opened 5 years ago

yxliang01 commented 5 years ago

Is it formally defined as an expression which is also a statement?

federicobond commented 5 years ago

It's really up to us, but I would not like to stray too far from the official AST output produced by solc.

yxliang01 commented 5 years ago

@federicobond Hmm so for the current implementation what kinds of code will be transformed to a ExpressionStatement AST node type?