From 6f7d8fb65b1a2351824aa2eb9b1bab6057840c3c Mon Sep 17 00:00:00 2001 From: Nicolai Date: Wed, 20 Jul 2016 02:26:33 +0200 Subject: [PATCH] Allow function returns to be unnamed --- libsolidity/grammar.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt index a08a08fa6..30fbd6b5a 100644 --- a/libsolidity/grammar.txt +++ b/libsolidity/grammar.txt @@ -10,10 +10,12 @@ StateVariableDeclaration = TypeName ( 'public' | 'internal' | 'private' )? Ident ModifierDefinition = 'modifier' Identifier ParameterList? Block FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )* - ( 'returns' ParameterList )? Block + ( 'returns' (ParameterList | TypeParameterList) )? Block EnumValue = Identifier EnumDefinition = 'enum' Identifier '{' EnumValue? (',' EnumValue)* '}' + +TypeParameterList = '(' ( TypeName (',' TypeName)* )? ')' ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings // are not allowed in argument lists