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

Fix number after + or - following $ not getting FP bytes #12

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

ryangray
Copy link

@ryangray ryangray commented Aug 1, 2023

Since we were parsing a number at a leading '+' or '-' rather than at the digit or leading '.', then a '$' before the '+' or '-' that is part of an expression (such as "CODE a$-32") was erroneously recognized as a "$nnnn" Spectrum Next hex constant and leaving out the floating point bytes. The fix was to change the number parsing to start on the digit or a leading '.', leaving the leading '+' or '-' to just copy through as it is not part of the FP number.

I did run it on the zx-next-demo.bas file and checked that the hex and binary constants were not getting FP bytes as expected.

Since we were parsing a number at a leading '+' or '-' rather than at the
digit or leading '.', then a '$' before the '+' or '-' that is part of an
expression was erroneously triggering a $nnnn Spectrum Next hex constant
condition and leaving out the floating point bytes. The fix was to change
the number parsing to start on the digit or a leading '.', leaving the
leading '+' or '-' to just copy through.
@chris-y chris-y merged commit 9ba3634 into chris-y:master Aug 1, 2023
5 checks passed
@ryangray ryangray deleted the dollar-op-num-fix branch August 16, 2023 22:34
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

Successfully merging this pull request may close these issues.

2 participants