aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/grammar.txt
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-21 01:17:03 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-21 01:17:03 +0800
commitad2784b333c166a163840db7d75a429975e88d04 (patch)
tree5ca66220c1bb369d8c47c58cc6c988b6940605e7 /libsolidity/grammar.txt
parente1c69b11f48ce6cd45edad437d403ba5a396d3c0 (diff)
downloaddexon-solidity-ad2784b333c166a163840db7d75a429975e88d04.tar.gz
dexon-solidity-ad2784b333c166a163840db7d75a429975e88d04.tar.zst
dexon-solidity-ad2784b333c166a163840db7d75a429975e88d04.zip
Extend EventDefinition
Diffstat (limited to 'libsolidity/grammar.txt')
-rw-r--r--libsolidity/grammar.txt4
1 files changed, 3 insertions, 1 deletions
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