'true' and 'false' are both lexed as a BooleanLiteral token
This commit is contained in:
parent
d9e1289d13
commit
9bd3e965ef
|
@ -504,7 +504,7 @@ literal
|
|||
| FloatingPointLiteral
|
||||
| CharacterLiteral
|
||||
| StringLiteral
|
||||
| booleanLiteral
|
||||
| BooleanLiteral
|
||||
| 'null'
|
||||
;
|
||||
|
||||
|
@ -514,11 +514,6 @@ integerLiteral
|
|||
| DecimalLiteral
|
||||
;
|
||||
|
||||
booleanLiteral
|
||||
: 'true'
|
||||
| 'false'
|
||||
;
|
||||
|
||||
// ANNOTATIONS
|
||||
|
||||
annotations
|
||||
|
@ -917,6 +912,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ;
|
|||
fragment
|
||||
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
||||
|
||||
// §3.10.3 Boolean Literals
|
||||
|
||||
BooleanLiteral
|
||||
: 'true'
|
||||
| 'false'
|
||||
;
|
||||
|
||||
CharacterLiteral
|
||||
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
||||
;
|
||||
|
|
|
@ -501,7 +501,7 @@ literal
|
|||
| FloatingPointLiteral
|
||||
| CharacterLiteral
|
||||
| StringLiteral
|
||||
| booleanLiteral
|
||||
| BooleanLiteral
|
||||
| 'null'
|
||||
;
|
||||
|
||||
|
@ -511,11 +511,6 @@ integerLiteral
|
|||
| DecimalLiteral
|
||||
;
|
||||
|
||||
booleanLiteral
|
||||
: 'true'
|
||||
| 'false'
|
||||
;
|
||||
|
||||
// ANNOTATIONS
|
||||
|
||||
annotations
|
||||
|
@ -1019,6 +1014,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ;
|
|||
fragment
|
||||
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
||||
|
||||
// §3.10.3 Boolean Literals
|
||||
|
||||
BooleanLiteral
|
||||
: 'true'
|
||||
| 'false'
|
||||
;
|
||||
|
||||
CharacterLiteral
|
||||
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue