mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1395 from ethereum/grammar
Properly define the pragma directive in the grammar
This commit is contained in:
commit
d7677826d4
@ -1,7 +1,7 @@
|
||||
SourceUnit = (PragmaDirective | ImportDirective | ContractDefinition)*
|
||||
|
||||
// Pragma actually parses anything up to the trailing ';' to be fully forward-compatible.
|
||||
PragmaDirective = 'pragma' Identifier Expression ';'
|
||||
PragmaDirective = 'pragma' Identifier ([^;]+) ';'
|
||||
|
||||
ImportDirective = 'import' StringLiteral ('as' Identifier)? ';'
|
||||
| 'import' ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral ';'
|
||||
|
Loading…
Reference in New Issue
Block a user