Fold the 69-arm `if (k == nkind.N_X) return "..."` ladder in nkname to a single `switch (k)` with the terminal `return "?"` as the fall-past default. The other ast.ww ladders stay: pr()'s kind dispatch is side-effecting (emits output, recurses) and uses ||-grouped multi-kind predicates, not a pure value->value mapping a switch can express. Not byte-id-neutral (if-chain -> switch dispatch changes the asm), so the ladder->switch equivalence is pinned by a new table-driven test: lib/ww/asttest.ww drives nkname over every nkind plus the out-of-band "?" fallback, wired as 905_nkname_run (same `ww run` @test shape as 904_tok_run). The 990_selfhost wwdump diff only covers kinds that appear in its corpus. Regenerates the w6c + wwdump combined.ww amalgamations (nkname region only).
77 KiB
77 KiB