diff --git a/docs/grammar.txt b/docs/grammar.txt index 9f4bf55db..06b306499 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -24,10 +24,12 @@ StructDefinition = 'struct' Identifier '{' ModifierDefinition = 'modifier' Identifier ParameterList? ( 'virtual' | OverrideSpecifier )* Block ModifierInvocation = Identifier ( '(' ExpressionList? ')' )? -FunctionDefinition = 'function' Identifier? ParameterList +FunctionDefinition = FunctionDescriptor ParameterList ( ModifierInvocation | StateMutability | 'external' | 'public' | 'internal' | 'private' | 'virtual' | OverrideSpecifier )* ( 'returns' ParameterList )? ( ';' | Block ) +FunctionDescriptor = 'function' Identifier | 'constructor' | 'fallback' | 'receive' + OverrideSpecifier = 'override' ( '(' UserDefinedTypeName (',' UserDefinedTypeName)* ')' )? EventDefinition = 'event' Identifier EventParameterList 'anonymous'? ';'