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.
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
withname
andvalue
, not one that is restricted tosolidity
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.