Open duaraghav8 opened 6 years ago
Thanks for the report @duaraghav8! I wasn't aware of the optional version parts. Looks like supporting some of these would require a split of the parser and lexer and the introduction of lexer modes, which I am not sure I want to do right now.
Is there any particular example that is giving you trouble? Perhaps we can handle that case first and then worry about the rest.
@federicobond no prob, actually none of them trouble me. I happened to come across a codebase that was using ^0.4
in pragma statement and was wondering if it gets parsed.
But this version literal is being used very rarely, so not a high priority issue IMO. most people are using a.b.c
only. Let's keep the issue open though? So we have a record for the future.
Sure! I’ll keep it open, no worries 😊
This is causing me some troubles. I have a contract that has the version string ~0.4.10
and the parser can't parse that. I've created an issue at a grammar repo: https://github.com/solidityj/solidity-antlr4/issues/15
All of the above are syntactically correct pragma statements (feel free to test in remix). But parser only recognises version
a.b.c
. We need to make theb
&c
part optional, not mandatory.