From 941c77c8fadd6195809cd2d572feb64478c4fb20 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 22 Jan 2015 01:02:38 +0100 Subject: Type resolution for function modifiers. --- grammar.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'grammar.txt') diff --git a/grammar.txt b/grammar.txt index 11d99854..b97dac5d 100644 --- a/grammar.txt +++ b/grammar.txt @@ -1,14 +1,14 @@ ContractDefinition = 'contract' Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' -ContractPart = VariableDeclaration ';' | StructDefinition | +ContractPart = VariableDeclaration ';' | StructDefinition | ModifierDefinition | FunctionDefinition | 'public:' | 'private:' InheritanceSpecifier = Identifier ( '(' Expression ( ',' Expression )* ')' )? StructDefinition = 'struct' Identifier '{' ( VariableDeclaration (';' VariableDeclaration)* )? '} - -FunctionDefinition = 'function' Identifier ParameterList 'const'? +ModifierDefinition = 'modifier' Identifier ParameterList? Block +FunctionDefinition = 'function' Identifier ParameterList ( Identifier | 'constant' )* ( 'returns' ParameterList )? Block ParameterList = '(' ( VariableDeclaration (',' VariableDeclaration)* )? ')' // semantic restriction: mappings and structs (recursively) containing mappings -- cgit