test: banner purge + WHY-only comment sweep (rule 8)

Every section banner dies (103 -> 0) across test/lang, the observer
suites, the C carriers, and the five comment-heavy corpus fixtures;
banner provenance (#N cites, carrier numbers, repair-cluster labels)
folded into headers or adjacent WHY comments. Narration deleted; row
provenance, ref cites, divergence pins, and layout contracts kept
(fwd-ref decl-order guards and bootstrap-gate corpus rationale
restored where the sweep over-cut). Comment-only proven: all 3742
wwbuild workdir .s byte-identical before/after; test-commit and
test-byteid (161 lang + 1399 data, 0 pinned-divergent) green.
This commit is contained in:
2026-08-08 21:40:23 +09:00
parent aadc6618f0
commit 83f5956df2
120 changed files with 184 additions and 530 deletions

View File

@@ -1,11 +1,7 @@
/*
* 200_parse — parser tests.
*
* Two flavours:
* 1) "must parse": source must produce a Node and no errors.
* 2) "shape match": parsed AST printed via astprint, compared against
* expected substring (so tests stay readable without binding to
* every position field).
* Shape rows compare astprint output against a substring, not a full
* golden, so tests stay readable without binding to every position
* field.
*/
#include "ww.h"
#include <stdio.h>
@@ -136,34 +132,20 @@ main(void)
"fn fnt(f: fn(i32) i32, x: i32) i32 = { return f(x); };",
"fn anontype() void = { let f: fn(i32) i32 = id; };",
/* multiple decls */
"import io;\nimport fmt;\ndef N: i32 = 8;\ntype p = struct{x:i32};\nfn f() void = {};",
/* attribute on FFI decl */
"@symbol(\"strlen\") fn cstrlen(s: *u8) u64;",
/* trailing comma */
"fn f(a: i32, b: i32,) void = {};",
/* nil/true/false */
"fn f() void = { let p: *i32 = nil; let x: bool = true; let y: bool = false; };",
/* chan */
"fn ch() void = { let c: chan i32; let v = <-c; };",
/* nested struct lit */
"fn lit2() void = { let q = box { p = nil, n = 0, items = [1, 2] }; };",
/* defer with call */
"fn f() void = { defer close(fd); return; };",
/* break / continue */
"fn f() void = { for () { if (x) { break; }; continue; }; };",
/* deeply nested expr */
"fn deep() i32 = { return ((((((1 + 2) * 3) - 4) / 5) % 6) << 7); };",
/* index chain */
"fn ix() i32 = { return a[b][c[d]]; };",
/* dot chain */
"fn dot() i32 = { return a.b.c.d; };",
/* call chain */
"fn cc() i32 = { return f()()(); };",
/* mixed postfix */
"fn mx() i32 = { return obj.method(arg)[idx].field; };",
/* multi-return tuples */
"fn divmod(a: i64, b: i64) (i64, i64) = { return a / b, a % b; };",
"fn try() (i32, str) = { return 0, \"\"; };",
"fn use_tuple() void = { let q, r = divmod(10, 3); };",