aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-20 22:14:23 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-20 22:14:23 +0800
commit5abb9b6e41f3135e097813f093eda335ff5ec5ba (patch)
tree7a59b07831c45d3d36ef785b601318f0a3f95369
parentf76616889a743cc76c746e92b4e86bcd9ef56815 (diff)
downloaddexon-solidity-5abb9b6e41f3135e097813f093eda335ff5ec5ba.tar.gz
dexon-solidity-5abb9b6e41f3135e097813f093eda335ff5ec5ba.tar.zst
dexon-solidity-5abb9b6e41f3135e097813f093eda335ff5ec5ba.zip
Added imports
-rw-r--r--libsolidity/grammar.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index afeb1d00..e997e180 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -1,6 +1,11 @@
-ContractDefinition = ( 'contract' | 'library' ) Identifier
+ContractDefinition = ('import' Imports ';')*
+ ( 'contract' | 'library' ) Identifier
( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )?
'{' 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
InheritanceSpecifier = Identifier ( '(' Expression ( ',' Expression )* ')' )?