parser: .N tuple index reaches the AST; gen-c long-tail batch (66/68) - #1927
Merged
Conversation
The parser consumed the dot of 'expr.0' and silently DROPPED the numeric
index -- 'two().0' parsed as 'two()' (wrong value, no diagnostic; the
third silent-parser-drop class found by the validity campaigns).
Number-after-Dot now builds ExprFieldAccess; Rust emits '.0', Zig '.@"0"',
C '.fN'. gen-c batch: '_' tuple elements are skipped (no redefinition);
StmtLocal Rust-style [T; N] arrays lower to 'T name[N]'; StmtLocal tuple
destructure binds via __auto_type with element-wise binding for
tuple-LITERAL inits; and ExprArrayLiteral interprets its extra_size
element text ('{ e1, e2 }' / GNU '{ [0 ... N-1] = v }') -- the old
emitter produced an EMPTY '(int[]){ }' that compiled silently wrong.
tri-net C validity: 6 tails -> 2 (both spec redesigns, tracked in the
issue). Unit suite 1537/1537; FROZEN_HASH resealed.
Refs #1919
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 8, 2026 09:18
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two-part fix. Parser: the dot of
expr.0was consumed and the numeric index silently DROPPED --two().0parsed astwo()(wrong value, no diagnostic; the third silent-drop class the validity campaigns have caught). Number-after-Dot now builds ExprFieldAccess; Rust emits.0, Zig.@"0", C.fN(Verilog TB emission of .N stays a documented long-tail with its unsized-concat defect). gen-c batch:_tuple elements skipped; StmtLocal Rust-style[T;N]arrays lower toT name[N]; StmtLocal tuple destructure binds via __auto_type (element-wise for tuple-literal inits); ExprArrayLiteral interprets its extra_size element text -- the old emitter produced an EMPTY(int[]){ }that compiled silently wrong.tri-net C validity: 6 remaining tails -> 2 (auto_config's array-returning fn and olsr_routing's u256-scale table -- both spec redesigns, tracked in #1919). Exactly ONE committed gen drifts (mesh_protocol_stack, both backends -- regenerated tri-net-side in the follow-up). Unit suite 1537/1537; FROZEN_HASH resealed; NOW files updated.
Refs #1919
🤖 Generated with Claude Code