mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
make long literals Longs
This commit is contained in:
parent
932115aa62
commit
7f3951aff0
@ -1426,7 +1426,8 @@ also_keyword:
|
||||
|
||||
literal:
|
||||
Real_literal
|
||||
| NUMBER
|
||||
| n=NUMBER -> {UInt64.Parse($n.text) > Int32.MaxValue}? LONGNUMBER[$n.token, $n.text]
|
||||
-> $n
|
||||
| Hex_number
|
||||
| Character_literal
|
||||
| STRINGLITERAL
|
||||
|
@ -1374,6 +1374,7 @@ also_keyword:
|
||||
literal:
|
||||
Real_literal -> string(payload={$Real_literal.text})
|
||||
| NUMBER -> string(payload={$NUMBER.text})
|
||||
| LONGNUMBER -> string(payload={$LONGNUMBER.text + "L"})
|
||||
| Hex_number -> string(payload={$Hex_number.text})
|
||||
| Character_literal -> string(payload={$Character_literal.text})
|
||||
| STRINGLITERAL -> string(payload={ $STRINGLITERAL.text })
|
||||
|
@ -993,6 +993,7 @@ also_keyword:
|
||||
literal:
|
||||
Real_literal
|
||||
| NUMBER
|
||||
| LONGNUMBER
|
||||
| Hex_number
|
||||
| Character_literal
|
||||
| STRINGLITERAL
|
||||
|
@ -104,6 +104,7 @@ tokens {
|
||||
UNSIGNED_RIGHT_SHIFT; /* not in C#: >>> */
|
||||
|
||||
SUPER;
|
||||
LONGNUMBER;
|
||||
|
||||
PLUS = '+';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user