Skip to content

fix(translate): simplify float literal recognition - #83

Merged
tetsuo-cpp merged 1 commit into
canonfrom
fix/forth-numeric-literal-diagnostics
Aug 15, 2026
Merged

fix(translate): simplify float literal recognition#83
tetsuo-cpp merged 1 commit into
canonfrom
fix/forth-numeric-literal-diagnostics

Conversation

@tetsuo-cpp

@tetsuo-cpp tetsuo-cpp commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the manual float syntax scan and strtod end-pointer handling with LLVM's to_float helper
  • classify integers before floats so integer literals remain integers without coupling isFloat to isNumber

Testing

  • cmake --build build --target format
  • cmake --build build --target check-warpforth -j2 (109 tests passed)
  • cmake --build build --target check-format

@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from e36c7d4 to 3831855 Compare August 11, 2026 18:38
@tetsuo-cpp tetsuo-cpp changed the title fix: diagnose invalid Forth numeric literals fix(parser): diagnose invalid numeric literals Aug 11, 2026
Comment thread lib/Translation/ForthToMLIR/ForthToMLIR.cpp
@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from 3831855 to e48072f Compare August 15, 2026 14:20
@tetsuo-cpp tetsuo-cpp changed the title fix(parser): diagnose invalid numeric literals fix(parser): diagnose out-of-range numeric literals Aug 15, 2026
@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from e48072f to 0bb073e Compare August 15, 2026 14:28
@tetsuo-cpp tetsuo-cpp changed the title fix(parser): diagnose out-of-range numeric literals fix(translate): diagnose out-of-range numeric literals Aug 15, 2026
@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from 0bb073e to dbabd46 Compare August 15, 2026 14:49
@tetsuo-cpp tetsuo-cpp changed the title fix(translate): diagnose out-of-range numeric literals fix(translate): simplify float literal recognition Aug 15, 2026
@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from dbabd46 to f87c9fc Compare August 15, 2026 14:51
@tetsuo-cpp
tetsuo-cpp force-pushed the fix/forth-numeric-literal-diagnostics branch from f87c9fc to 190c016 Compare August 15, 2026 14:53
@tetsuo-cpp
tetsuo-cpp merged commit 7249db2 into canon Aug 15, 2026
1 check passed
@tetsuo-cpp
tetsuo-cpp deleted the fix/forth-numeric-literal-diagnostics branch August 15, 2026 15:01
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.

1 participant