cli: capture complete source parser ranges
This commit is contained in:
1 parent
1a80c42289
commit
ba2cb1340a
3 files changed
+180
-16
No files matched your search
@@ -131,7 +131,7 @@ Lowering layers (P6A-3/4), each with accepted (golden AIR), rejected (`E7xxx`) a
|
||||
| ID | Status | Task | Depends | Output | Done when |
|
||||
|---|---|---|---|---|---|
|
||||
| P6-1 | todo | Complete the source grammar: expressions, `match`, `borrow` blocks, `task.scope`, `select`, `defer`, `?`, generics, lifetimes, contracts, attributes | — (may start after P2) | `reference/grammar.ebnf`, spec 01 | every construct in `examples/` is covered; grammar is LL(k) or otherwise documented as unambiguous |
|
||||
| P6-2 | todo | Lexer and parser with spans | P6-1 | `src/frontend/{lex,parse}.zig` | all `examples/` parse; syntax errors are registered diagnostics |
|
||||
| P6-2 | doing | Lexer and parser with spans | P6-1 | `src/frontend/{lex,parse}.zig` | all `examples/` parse; syntax errors are registered diagnostics |
|
||||
| P6-3 | done (RFC 0021 Implemented) | Explicit package modules, direct imports and qualified nominal types | P6-2 | `src/frontend/modules.zig`, spec 15 §14 | deterministic graph/name resolution; source/AIR and CLI tests |
|
||||
| P6-4 | done (RFC 0022 Implemented) | Type checking and monomorphized generics with structural constraints (`Copy`, `Send`, `Share`, `Freeze`, `Local`) | P6-3 | `src/frontend/generics.zig`, spec 15 §15 | generic code instantiates deterministically; constraint violations diagnosed |
|
||||
| P6-5 | todo | Lowering to AIR: control flow, `?`, `defer` cleanup edges, borrow blocks, task scopes | P6-4 | `src/frontend/lower.zig` | lowered AIR verifies; lowering is a pure function (same input ⇒ same AIR bytes) |
|
||||
@@ -213,4 +213,12 @@ Eight Phase 2 AIR rejection twins and five successful source runs cover owner/re
|
||||
|
||||
Validation: unit tests and full conformance pass, 1,225/1,225; all 24 new cases pass with per-instruction collection. Lifetime CLI checks pass 188 assertions, related-location checks 301, coverage 120/120 and formatting checks pass. The formatter checks 940 public files with 606 identical AIR outputs. Across 916 original public sources, check outcomes and all 421 accepted canonical AIR outputs are unchanged; four diagnostic outputs gain source positions, one also recovering a previously suppressed error. Independent read-only Claude review found no remaining issues.
|
||||
|
||||
Next P6-2 follow-up: capture full parser spans after parsing block/unary operands. Current annotated ranges can end before an `if` starts; this is separate from the primary-position correction above.
|
||||
The parser-range follow-up is resolved in the P6-2 increment below.
|
||||
|
||||
## P6-2 complete parser ranges (2026-10-07)
|
||||
|
||||
Twelve parser sites now finish parsing their bodies/operands before capturing the node's end. Nested type closers track the consumed first half of `>>` independently of the token cursor. These changes restore complete block, prefix, `move` and `if` ranges, including cancellation arms; syntax, acceptance rules, primary diagnostic positions and canonical AIR are unchanged.
|
||||
|
||||
Three unit regressions failed before the correction and pass afterwards. They check exact ranges, AST containment, file/namespace provenance, comments, CRLF and nested closers. The existing CI formatter suite also validates nonempty ordered annotation ranges and reconstruction of canonical AIR across successful public lowerings. No normative document, bundle or evaluation input changes; P6-2 remains open for its remaining grammar work.
|
||||
|
||||
Validation: unit tests, formatting checks and full conformance pass, 1,225/1,225. Across 940 public sources, all check/lower outputs and exit codes remain unchanged, including 606 successful canonical lowerings. The formatter passes 4,139 checks; lifetime and related-position CLI suites pass 188/301 checks. Independent read-only Claude review found no remaining issues.
|
||||
Reference in new issue
Block a user