The corpus-measured #1 blocker (~60% of RTL parse errors). Macro
invocations (`NAME, `NAME(args), optional trailing ;) now parse
wherever a module item or statement can appear; the invocation is an
AST leaf (MacroCall{RawText, semi}) emitted verbatim with column-
aware re-indent, semicolon reproduced only if written. Disambiguation
is safe by construction: both readings emit identical token streams.
The lexer's balanced-arg scan is hardened (strings, comments, 256-cap
nesting counter, iterative). Corpus parse rate: 35.2% -> 57.1%
(179 files gained, 0 regressed).
Round 1 was rejected in review: QA proved the new verify.rs
normalization could mask real corruption -- a string literal spanning
lines inside a macro arg had its bytes changed by re-indent, with
exit 0. The rework widened the finding to `define bodies and
attributes (same pre-existing defect, same shared root) and fixed
both sides: line_starts_inside_string, a lexer-mirroring scanner, is
the single shared definition of "which line breaks are data" -- the
verifier trims only outside strings, and the formatter emits any
token with an in-string line break fully verbatim (idempotent by
construction). Re-QA attacked the scanner on ten edge shapes and
found no hole; corpus TSV byte-identical pre/post fix.
Process consequence, codified as CLAUDE.md hard-invariant #4: any
widening of verify.rs forgiveness ships with masked-corruption attack
tests, dev-written and QA-re-attacked.
Dev + rework: Opus agent; QA + re-QA: Sonnet agent; full history in
docs/features/macro-items/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
Simplicity-first rules, Rust standards, and document-based development:
every feature gets docs/features/<name>/README.md with assumptions,
handshakes, work/QA logs, and a lead review section.
Co-Authored-By: Claude Fable 5 <[email protected]>