From ad2784b333c166a163840db7d75a429975e88d04 Mon Sep 17 00:00:00 2001 From: Nicolai Date: Wed, 20 Jul 2016 19:17:03 +0200 Subject: Extend EventDefinition --- libsolidity/grammar.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index 60c716b9..c06faedd 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -2,6 +2,7 @@ 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 @@ -16,11 +17,12 @@ ModifierDefinition = 'modifier' Identifier ParameterList? Block FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )* ( 'returns' (ParameterList | TypeParameterList) )? Block -EventDefinition = 'event' Identifier (ParameterList | TypeParameterList) ';' +EventDefinition = 'event' Identifier (ParameterList | TypeParameterList | IndexedTypeParameterList) 'anonymous'? ';' EnumValue = Identifier EnumDefinition = 'enum' Identifier '{' EnumValue? (',' EnumValue)* '}' +IndexedTypeParameterList = '(' ( TypeName 'indexed'? Identifier? (',' TypeName 'indexed'? Identifier?)* )? ')' TypeParameterList = '(' ( TypeName (',' TypeName)* )? ')' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings -- cgit