federicobond / solidity-parser-antlr

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

Can't read property expressionList of null #80

Closed jjgonecrypto closed 5 years ago

jjgonecrypto commented 5 years ago

This came up via eth-gas-reporter (via https://github.com/cgewecke/eth-gas-reporter/issues/153) which depends on ^0.4.2 of this package. They recently recreated their lockfile and upgraded to 0.4.6 and in that change, the following error is produced:

TypeError: Cannot read property 'expressionList' of null
[1]     at ASTBuilder.FunctionCall (/home/circleci/project/node_modules/solidity-parser-antlr/dist/ASTBuilder.js:307:17)

It is mapping to this line of source: https://github.com/federicobond/solidity-parser-antlr/blob/master/src/ASTBuilder.js#L327 which dies while parsing this Solidity code of ours.

Here is an example of it failing in CI: https://circleci.com/gh/Synthetixio/synthetix/217

I haven't had time to dive any deeper, but I didn't see any obvious changes to ASTBuilder.js that may have caused the issue.

federicobond commented 5 years ago

Hi there, version 0.4.6 had a bug in the grammar which was fixed later but not yet published. I have just published 0.4.7 which should include the fix.