Added imports

This commit is contained in:
Nicolai 2016-07-20 16:14:23 +02:00
parent f76616889a
commit 5abb9b6e41

View File

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