federicobond / solidity-parser-antlr

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

`UnaryOperation` expression type missing from type definitions #86

Open naddison36 opened 5 years ago

naddison36 commented 5 years ago

See line 104 of IDEX's Exchange contract verified on Etherscan https://etherscan.io/address/0x2a0c0DBEcC7E4D658f48E01e3fA353F44050c208#code

if (!Token(token).transferFrom(msg.sender, this, amount)) throw;

This has an expression type of UnaryOperation

yxliang01 commented 5 years ago

Yes. This is confirmed. Example UnaryOperation formation is at https://github.com/federicobond/solidity-parser-antlr/blob/918b74290b783f3aae7ba690c7163427e70df51c/test/ast.js#L699 .