diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-27 22:01:30 +0800 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-07-27 22:01:30 +0800 |
commit | ec0933bf9f2ad60093c0bac9dd73c5541a34dfee (patch) | |
tree | b0953dae932f7f94f8863467a7ff3ae7087c716f /libsolidity | |
parent | e584a8396a3293641d3b9eb0019ceee11cebf892 (diff) | |
download | dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar.gz dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar.bz2 dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar.lz dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar.xz dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.tar.zst dexon-solidity-ec0933bf9f2ad60093c0bac9dd73c5541a34dfee.zip |
Imports => ImportDirective
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/grammar.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 9678d538..23022676 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -1,11 +1,12 @@ -ContractDefinition = ('import' Imports ';')* - ( 'contract' | 'library' ) Identifier +SourceUnit = (ImportDirective ';')* ContractDefinition + +ContractDefinition = ( 'contract' | 'library' ) Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' -Imports = StringLiteral ('as' Identifier)? - | ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral - | '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral +ImportDirective = 'import' StringLiteral ('as' Identifier)? + | 'import' ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral + | 'import' '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral ContractPart = StateVariableDecOrDef | UsingDeclaration | StructDefinition | ModifierDefinition | FunctionDefinition | EventDefinition | EnumDefinition |