mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update grammar to include special functions (constructor, fallback, receive ether)
This commit is contained in:
parent
d577a768ab
commit
b6ddb32497
@ -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'? ';'
|
||||
|
Loading…
Reference in New Issue
Block a user