Imports => ImportDirective

This commit is contained in:
Nicolai 2016-07-27 16:01:30 +02:00
parent e584a8396a
commit ec0933bf9f

View File

@ -1,11 +1,12 @@
ContractDefinition = ('import' Imports ';')* SourceUnit = (ImportDirective ';')* ContractDefinition
( 'contract' | 'library' ) Identifier
ContractDefinition = ( 'contract' | 'library' ) Identifier
( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )?
'{' ContractPart* '}' '{' ContractPart* '}'
Imports = StringLiteral ('as' Identifier)? ImportDirective = 'import' StringLiteral ('as' Identifier)?
| ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral | 'import' ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral
| '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral | 'import' '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral
ContractPart = StateVariableDecOrDef | UsingDeclaration ContractPart = StateVariableDecOrDef | UsingDeclaration
| StructDefinition | ModifierDefinition | FunctionDefinition | EventDefinition | EnumDefinition | StructDefinition | ModifierDefinition | FunctionDefinition | EventDefinition | EnumDefinition