go: lex.sx — decimal float + imaginary literals + 22 tests [consumes-lex]
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
Adds Go float and imaginary literal forms per Go spec § Floating-point literals and § Imaginary literals: 3.14 .5 1. 1e10 1.5e-3 2.0e+2 1E5 (floats) 2i 3.14i 1e2i (imag) gl-read-number! returns one of "int" / "float" / "imag"; gl-finish-number! factors out the post-mantissa exponent + 'i' suffix logic so the int / float / leading-dot-float paths all share it. scan! adds a .<digit> branch ahead of the operator matcher so '.5' tokenises as float. ASI trigger list extended to include float + imag (Go spec § Semicolons: all literal types trigger). Greedy-grammar pin (a single test '1.method' lexes as float ident), since the Go spec says the '.' after a digit always belongs to the number, never to a following identifier. Hex floats (0x1.fp0) deferred — not commonly used. lex 114/114. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Go-on-SX Scoreboard
|
||||
|
||||
**Total: 92 / 92 tests passing**
|
||||
**Total: 114 / 114 tests passing**
|
||||
|
||||
| | Suite | Pass | Total |
|
||||
|---|---|---|---|
|
||||
| ✅ | lex | 92 | 92 |
|
||||
| ✅ | lex | 114 | 114 |
|
||||
| ⬜ | parse | 0 | 0 |
|
||||
| ⬜ | types | 0 | 0 |
|
||||
| ⬜ | eval | 0 | 0 |
|
||||
|
||||
Reference in New Issue
Block a user