nx_ident_len_gate.nx
buildroot/runtime/nx_ident_len_gate.nx
about
nx_ident_len_gate.nx -- the 63/64 identifier-length boundary in lex_ident_or_kw (debt 1785521184).
The scan used to be `while i < 63 { ... advance(L) ... }`, so on reaching 63 it stopped WITHOUT
consuming the rest of the identifier. A 64-char name emitted a 63-char IDENT and the lexer then
resumed at char 64, lexing the tail as a SECOND identifier token -- a TOKEN SPLIT, not a truncation.
HOW THIS PROVES IT, AT COMPILE TIME -- THE ONLY WAY IT CAN BE PROVEN. A split turns the 64-char
definition below into two adjacent identifiers where the parser expects one, followed by a paren --
a syntax error. So THIS FILE COMPILING AT ALL is the verdict for T2. It cannot pass vacuously: with
the defect present the build fails outright, and no runtime assertion could detect it because there
is no runtime.
THE BOUNDARY PAIR IS THE WHOLE TEST. 63 must work (it always did) and 64 must work (it did not). An
off-by-one in any future fix re-introduces the split for exactly one length -- precisely the bug a
single-value test walks past. Never reduce this gate to one identifier.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_kernel_v2.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 22 | func id_012345678901234567890123456789012345678901234567890123456789() -> nx_int { return 1 } called by 1: main |
| 25 | func idx_012345678901234567890123456789012345678901234567890123456789() -> nx_int { return 2 } called by 1: main |
| 27 | func main() -> nx_exit |