Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider returning a different token for char than for int literals #13

Open
pzembrod opened this issue May 21, 2020 · 1 comment
Open

Comments

@pzembrod
Copy link
Owner

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.

@pzembrod
Copy link
Owner Author

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.

@pzembrod pzembrod changed the title char literals probably missing consider returning a different token for char than for int literals Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant