mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly define the pragma directive in the grammar
This commit is contained in:
parent
b46a14f4a8
commit
92f1c9d492
@ -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