Consensys / solidity-parser-antlr

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

Update to support Solidity 0.6.0 global structs and enums #11

Open fluorostani opened 4 years ago

fluorostani commented 4 years ago

Solidity 0.6.0 allows structs and enums to be defined outside of contracts and libraries but the parser fails if it encounters this with:

extraneous input 'struct' expecting {<EOF>, 'pragma', 'import', 'abstract', 'contract', 'interface', 'library'}

cgewecke commented 4 years ago

There's a companion issue for this at consensys/solidty-antlr4 #4

fvictorio commented 4 years ago

@fluorostani FYI this is fixed in this fork.

fluorostani commented 4 years ago

Hi Franco,

Thanks for alerting me to this. Unfortunately our reliance on the parser isn't direct but via the solidity-coverage module which has it as a dependency. I believe Goncalo at Consensys is going to be adding the fixes there soon, along with some additional work to handle the Solidity 0.6.5 immutable keyword which we also use.

Thanks again,

Glyn

http://www.artos.io/

[image: twitter] https://twitter.com/ArtosSystems [image: linkedin] https://www.linkedin.com/company/28150002

Glyn Dimond

Senior Blockchain Engineer | Artos Systems

+44 (0) 7306 666 768 glyn.dimond@artos.io www.artossystems.io Salisbury House, Finsbury Circus, London, EC2M 5SQ

On Wed, 8 Apr 2020 at 19:20, Franco Victorio notifications@github.com wrote:

@fluorostani https://github.com/fluorostani FYI this is fixed in this fork https://github.com/solidity-parser/parser.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConsenSys/solidity-parser-antlr/issues/11#issuecomment-611114679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPL2PZWTDG2FLVVVNFQCXLRLS573ANCNFSM4K7XDI2A .