aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-18 11:15:24 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-18 11:15:24 +0800
commit92f1c9d4929538b72b97981f67e8999717a35e01 (patch)
treeedfaf5eb45fcf4ccb085e1b002ba90eed71e3986
parentb46a14f4a8e128c08336763abf8bbf7c111f464d (diff)
downloaddexon-solidity-92f1c9d4929538b72b97981f67e8999717a35e01.tar.gz
dexon-solidity-92f1c9d4929538b72b97981f67e8999717a35e01.tar.zst
dexon-solidity-92f1c9d4929538b72b97981f67e8999717a35e01.zip
Properly define the pragma directive in the grammar
-rw-r--r--libsolidity/grammar.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index c8bc3aed..0aa6690b 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -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 ';'