mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-05 07:40:39 +00:00
Added support for upper case integer suffixes eg. 1234U. Closes #682
This commit is contained in:
parent
825a3b79a5
commit
d6179a0b3c
@ -15265,3 +15265,13 @@ sta {c1},x
|
||||
lda #{c2}
|
||||
ora {c1},y
|
||||
sta {c1},y
|
||||
//FRAGMENT vwuz1=vwuz2_ror_8
|
||||
lda {z2}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT vwuz1=vwuz1_ror_8
|
||||
lda {z1}+1
|
||||
sta {z1}
|
||||
lda #0
|
||||
sta {z1}+1
|
||||
|
@ -15,6 +15,7 @@ public class NumberParser {
|
||||
}
|
||||
|
||||
SymbolType type = SymbolType.NUMBER;
|
||||
literal = literal.toLowerCase();
|
||||
if(literal.endsWith("ub") || literal.endsWith("uc")) {
|
||||
type = SymbolType.BYTE;
|
||||
literal = literal.substring(0, literal.length()-2);
|
||||
|
@ -130,7 +130,7 @@ NUMFLOAT : BINFLOAT | DECFLOAT | HEXFLOAT;
|
||||
BINFLOAT : ('%' | '0b' | '0B' ) (BINDIGIT)* '.' BINDIGIT+;
|
||||
DECFLOAT : (DECDIGIT)* '.' DECDIGIT+;
|
||||
HEXFLOAT : ('$' | '0x' | '0X' ) (HEXDIGIT)* '.' HEXDIGIT+;
|
||||
NUMINT : (DECINTEGER | HEXINTEGER | BININTEGER ) ([us][bcwisdl] | 'l' | 'u' )? ;
|
||||
NUMINT : (DECINTEGER | HEXINTEGER | BININTEGER ) ([usUS][bcwisdlBCWISDL] | [lL] | [uU] )? ;
|
||||
BININTEGER : '0' [bB] BINDIGIT+ | '%' BINDIGIT+ ;
|
||||
DECINTEGER : DECDIGIT+ ;
|
||||
HEXINTEGER : ( '$' | '0x' | '0X' ) HEXDIGIT+ ;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user