mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add true/false literals
This commit is contained in:
parent
980ba42faf
commit
72f9e45b1a
@ -103,10 +103,12 @@ Grammar::
|
||||
BuiltinTypeName = 'bool' | [us] ( '8' | '32' | '64' | '128' | '256' )
|
||||
TypedIdentifierList = Identifier ':' TypeName ( ',' Identifier ':' TypeName )*
|
||||
Literal =
|
||||
(NumberLiteral | StringLiteral | HexLiteral) ':' TypeName
|
||||
(NumberLiteral | StringLiteral | HexLiteral | TrueLiteral | FalseLiteral) ':' TypeName
|
||||
NumberLiteral = HexNumber | DecimalNumber
|
||||
HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
|
||||
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
|
||||
TrueLiteral = 'true'
|
||||
FalseLiteral = 'false'
|
||||
HexNumber = '0x' [0-9a-fA-F]+
|
||||
DecimalNumber = [0-9]+
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user