{{ message }}
Repository navigation
fix(tokenizer): preserve exponent signs in compile-time expressions - #1089
Merged
andorthehood merged 1 commit intoOct 18, 2026
Merged
Conversation
Recognize exponent signs within decimal operands without changing identifier or hexadecimal subtraction. Cover parser boundaries and execute float32 and float64 source regressions. Fixes 8f4e#1056 Assisted-by: Codex
irimias57
approved these changes
Oct 18, 2026
irimias57
left a comment
Member
There was a problem hiding this comment.
Thank you for another excellent contribution, Nigel! This fixes a subtle parser ambiguity and makes scientific-notation expressions behave reliably across the compiler. The focused parser coverage, edge-case controls, and executable float32/float64 regression test make the project more predictable and safer to evolve.
If you would like another issue, I deliberately looked further back in the backlog: #954 — Remove dead compiler block-state caches — is still open and unclaimed: #954. It is a clearly scoped compiler cleanup that would reduce duplicated internal state and make this area easier to maintain. No pressure, of course!
andorthehood
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #1056.
SCALE*1e-3failed because the parser counted the exponent's minus sign as a second operator. It now keeps exponent signs with the number whileVALUE-1and0x1E-1still work as subtraction.Added parser tests and a compiler fixture that runs both float32 and float64 examples. Chained expressions are still rejected.
Tested on Node 24.16.0:
npx nx run @8f4e/tokenizer:test --output-style=static- 473 passed.npx nx run @8f4e/compiler:test --output-style=static- 324 passed.npx nx run-many --target=typecheck --projects=@8f4e/tokenizer,@8f4e/compiler --parallel=1 --output-style=static- passed.Biome and the repository pre commit checks also pass.