Hovering `NAME(args) now appends an expands-to section: the definition
the card already chose (single_step is blind to lookup, so they cannot
disagree) with parameters substituted by the call's arguments - one
step, so nested macro names stay as written. Strings, `" markers and
escaped identifiers are never substituted into; count mismatches,
unnarrowed multiple candidates and paren-less function-like uses get no
section rather than a guess; an empty argument takes the parameter's
declared default. 2000-char cap with a note. Version 0.5.0 closes the
M7-M14 navigation run with a CHANGELOG entry covering all eight.
Co-Authored-By: Claude Fable 5 <[email protected]>
collect_defines() is a post-lex pass over Directive tokens (zero
lexer changes) building an ordered DefineTable: name, params (as
written, defaults included), body normalized exactly as a
preprocessor joins continuations (backslash-newline removed, every
other byte preserved -- string values survive), span and name_span.
Redefinitions and `undef events are all recorded in source order
(latest()/all()); position-aware resolution is deliberately left to
the future hover implementation, which needs the history.
Pure data feature: no behavior change anywhere. 24 tests including
mutation-testing of the normalization rule against alternatives that
would rewrite string values. QA swept 502 defines from the corpus
with zero span/name mismatches and hand-verified prim_assert.sv
macros; CRLF continuations confirmed at lexer and table layers.
TODO §6 data foundations now complete (spans, error recovery,
define table).
Dev: Opus agent; QA: Sonnet agent; review in
docs/features/define-table/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>