ConsenSysMesh / solidity-parser

Solidity Parser in Javascript
137 stars 53 forks source link

Parser fails when it reaches a symbol with name "export" #95

Closed bitsandsalsa closed 6 years ago

bitsandsalsa commented 6 years ago

Tested on v0.4.0. Here is a Solidity test case:

contract export {}

duaraghav8 commented 6 years ago

the parser has reserved some words like export in anticipation that they'll be part of solidity grammar in future. If you want to make changes to your own fork, see this commit that I made to my parser https://github.com/duaraghav8/solparse/commit/329f396f4ae09ead50dfbb90942623e2ce163f28

I recommend you change your contract's name (maybe slightly) or switch to federicobond's antlr parser if you can afford the API change