mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Include type names in grammar
This commit is contained in:
parent
b2f2b36b7c
commit
29502f9d44
@ -97,9 +97,11 @@ Grammar::
|
|||||||
Identifier '(' ( Expression ( ',' Expression )* )? ')'
|
Identifier '(' ( Expression ( ',' Expression )* )? ')'
|
||||||
Identifier = [a-zA-Z_$] [a-zA-Z_0-9]*
|
Identifier = [a-zA-Z_$] [a-zA-Z_0-9]*
|
||||||
IdentifierList = Identifier ( ',' Identifier)*
|
IdentifierList = Identifier ( ',' Identifier)*
|
||||||
TypedIdentifierList = Identifier ':' Identifier ( ',' Identifier ':' Identifier )*
|
TypeName = Identifier | BuiltinTypeName
|
||||||
|
BuiltinTypeName = 'bool' | [us] ( '8' | '32' | '64' | '128' | '256' )
|
||||||
|
TypedIdentifierList = Identifier ':' TypeName ( ',' Identifier ':' TypeName )*
|
||||||
Literal =
|
Literal =
|
||||||
(NumberLiteral | StringLiteral | HexLiteral) ':' Identifier
|
(NumberLiteral | StringLiteral | HexLiteral) ':' TypeName
|
||||||
NumberLiteral = HexNumber | DecimalNumber
|
NumberLiteral = HexNumber | DecimalNumber
|
||||||
HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
|
HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
|
||||||
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
|
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
|
||||||
|
Loading…
Reference in New Issue
Block a user