From 1c341add59d39a35a25363bcf75c55245c373213 Mon Sep 17 00:00:00 2001 From: Nicolai Date: Wed, 20 Jul 2016 19:31:05 +0200 Subject: [PATCH] Added UsingDeclaration --- libsolidity/grammar.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index c06faedd8..d03b5f468 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' )*