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,9 +1,9 @@
|
||||
{
|
||||
"language": "go",
|
||||
"total_pass": 92,
|
||||
"total": 92,
|
||||
"total_pass": 114,
|
||||
"total": 114,
|
||||
"suites": [
|
||||
{"name":"lex","pass":92,"total":92,"status":"ok"},
|
||||
{"name":"lex","pass":114,"total":114,"status":"ok"},
|
||||
{"name":"parse","pass":0,"total":0,"status":"pending"},
|
||||
{"name":"types","pass":0,"total":0,"status":"pending"},
|
||||
{"name":"eval","pass":0,"total":0,"status":"pending"},
|
||||
|
||||
Reference in New Issue
Block a user