ConsenSysMesh / solidity-parser

Solidity Parser in Javascript
138 stars 54 forks source link

Pragma directive should support any name and value #22

Closed federicobond closed 6 years ago

federicobond commented 8 years ago

The Solidity pragma directive was designed to support any identifier as name and expression as value, for backwards compatibility.

We should generalize it and return a PragmaStatement with name and value, not one that is restricted to solidity and a parsed version number.

If we are going to make this change, I would also suggest renaming it to PragmaDirective, which is a more descriptive name and in line with the official grammar.