'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
|
| FloatingPointLiteral
|
||||||
| CharacterLiteral
|
| CharacterLiteral
|
||||||
| StringLiteral
|
| StringLiteral
|
||||||
| booleanLiteral
|
| BooleanLiteral
|
||||||
| 'null'
|
| 'null'
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -514,11 +514,6 @@ integerLiteral
|
||||||
| DecimalLiteral
|
| DecimalLiteral
|
||||||
;
|
;
|
||||||
|
|
||||||
booleanLiteral
|
|
||||||
: 'true'
|
|
||||||
| 'false'
|
|
||||||
;
|
|
||||||
|
|
||||||
// ANNOTATIONS
|
// ANNOTATIONS
|
||||||
|
|
||||||
annotations
|
annotations
|
||||||
|
@ -917,6 +912,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ;
|
||||||
fragment
|
fragment
|
||||||
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
||||||
|
|
||||||
|
// §3.10.3 Boolean Literals
|
||||||
|
|
||||||
|
BooleanLiteral
|
||||||
|
: 'true'
|
||||||
|
| 'false'
|
||||||
|
;
|
||||||
|
|
||||||
CharacterLiteral
|
CharacterLiteral
|
||||||
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
||||||
;
|
;
|
||||||
|
|
|
@ -501,7 +501,7 @@ literal
|
||||||
| FloatingPointLiteral
|
| FloatingPointLiteral
|
||||||
| CharacterLiteral
|
| CharacterLiteral
|
||||||
| StringLiteral
|
| StringLiteral
|
||||||
| booleanLiteral
|
| BooleanLiteral
|
||||||
| 'null'
|
| 'null'
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -511,11 +511,6 @@ integerLiteral
|
||||||
| DecimalLiteral
|
| DecimalLiteral
|
||||||
;
|
;
|
||||||
|
|
||||||
booleanLiteral
|
|
||||||
: 'true'
|
|
||||||
| 'false'
|
|
||||||
;
|
|
||||||
|
|
||||||
// ANNOTATIONS
|
// ANNOTATIONS
|
||||||
|
|
||||||
annotations
|
annotations
|
||||||
|
@ -1019,6 +1014,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ;
|
||||||
fragment
|
fragment
|
||||||
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
FloatTypeSuffix : ('f'|'F'|'d'|'D') ;
|
||||||
|
|
||||||
|
// §3.10.3 Boolean Literals
|
||||||
|
|
||||||
|
BooleanLiteral
|
||||||
|
: 'true'
|
||||||
|
| 'false'
|
||||||
|
;
|
||||||
|
|
||||||
CharacterLiteral
|
CharacterLiteral
|
||||||
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
: '\'' ( EscapeSequence | ~('\''|'\\') ) '\''
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue