aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-21 01:31:05 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-21 01:31:05 +0800
commit1c341add59d39a35a25363bcf75c55245c373213 (patch)
tree79589043e077fd793a5a7d09f736eac153b36597
parentad2784b333c166a163840db7d75a429975e88d04 (diff)
downloaddexon-solidity-1c341add59d39a35a25363bcf75c55245c373213.tar.gz
dexon-solidity-1c341add59d39a35a25363bcf75c55245c373213.tar.zst
dexon-solidity-1c341add59d39a35a25363bcf75c55245c373213.zip
Added UsingDeclaration
-rw-r--r--libsolidity/grammar.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index c06faedd..d03b5f46 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -7,12 +7,15 @@ 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 | UsingDeclaration
+ | StructDefinition | ModifierDefinition | FunctionDefinition | EventDefinition | EnumDefinition
InheritanceSpecifier = Identifier ( '(' Expression ( ',' Expression )* ')' )?
+
+StateVariableDeclaration = TypeName ( 'public' | 'internal' | 'private' )? Identifier ';'
+UsingDeclaration = 'using' Identifier 'for' TypeName ';'
StructDefinition = 'struct' Identifier '{'
( VariableDeclaration ';' (VariableDeclaration ';')* )? '}'
-StateVariableDeclaration = TypeName ( 'public' | 'internal' | 'private' )? Identifier ';'
ModifierDefinition = 'modifier' Identifier ParameterList? Block
FunctionDefinition = 'function' Identifier ParameterList
( Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )*