cc64
cc64 copied to clipboard
consider returning a different token for char than for int literals
Remains to be verified via a test, but looking at
| : atom ( -- obj ) #number# comes-a? IF do-numatom exit THEN #id# comes-a? IF do-idatom exit THEN #string# comes-a? IF drop compile$ do-stringatom exit THEN ." a value" expected error 0 do-numatom ;
in parser.fth, it seems I have forgotten to implement character literals.
Turns out I decided to handle char constants already at the scanner level. Still, could be worth to return a different token for char constants than for int constants, so they can be handled as 8 and not as 16 bit numbers.