cli: parse control flow with shared continuations
This commit is contained in:
5 files changed
+1442
-345
No files matched your search
@@ -34,6 +34,7 @@ Status values: `open`, `resolved`.
|
||||
| Q-038 | resolved | STD-6d.2 | Pure construction of built-in errors |
|
||||
| Q-039 | resolved | STD-6d | Explicit static function parameters |
|
||||
| Q-041 | resolved | P6-2 task block forms | Source scope-handle value bindings |
|
||||
| Q-062 | open | P6-2 | Parenthesized block constructs without a statement terminator |
|
||||
|
||||
## Q-001 — Text AIR grammar
|
||||
|
||||
@@ -574,3 +575,42 @@ The [mutex make/take increment](source-expression-depth-audit.md#mutex-maketake-
|
||||
The [scalar index operand increment](source-expression-depth-audit.md#scalar-index-operand-continuations) preserves base/type/operand priority, usize hints, bounds facts, unchecked state, loans, load/end order, spans and host OOM. Build/units/format and store-mode/array-argument/lifetime/CFG suites pass; exact ordinary conformance (1,793), public frozen parity (1,423/506), the original focused run passes 318 CLI checks (check through 32,768 then existing E5101 at 65,536; lower/fmt through 65,536; runtime/fuel through 1,024), and separate overlapping 30-call fuel/28-call CFG/deref/proven-context subsets pass. Read-only Claude core/final reviews found no production defect and their fixture/wording suggestions are covered. At that scalar-operand checkpoint the recorded nested-array base-index probe still aborted at 1,024 before/after; its subsequent repair is recorded below. Other place/control/liveness callbacks, Q-060 and Phase 6 remain open. No semantic or new depth-limit change.
|
||||
|
||||
The [raw-place base increment](source-expression-depth-audit.md#raw-place-base-continuations) repairs the recorded 1,024-level nested-array base failure using iterative field/index projections and one ancestor-name list. Borrow modes, parents, child-first ends, range ordering, facts, unchecked selection, spans and host OOM separation are preserved. Exact ordinary conformance coverage, public check/lower parity and 159 focused CLI calls pass; expanded units pass, and scoped read-only Claude core/final reviews found no production defect. Follow-up block/if probes confirm remaining parser aborts at 1,024 before/after. Q-061, Q-060 full GC validation and Phase 6 remain open; no semantic or depth-limit change.
|
||||
|
||||
|
||||
The [shared control-parser increment](source-expression-depth-audit.md#shared-control-parser-continuations)
|
||||
removes native expression/control re-entry through blocks/statements, conditions,
|
||||
if/else-if, match/arms, select, loops, scopes, shield and lock. Deep mixed,
|
||||
ungrouped-condition and wide ASTs, token EOF/deletion sweeps, scope/advice,
|
||||
scratch and recovering/persistent OOM tests pass. All 1,793 ordinary conformance
|
||||
files have exact successful coverage; public check/lower parity (1,423/506),
|
||||
grammar/format/error/advice suites and 127 focused CLI calls pass. Scoped
|
||||
read-only Claude reviews found no production defect. Arena backing/RSS figures
|
||||
are informational, not an efficiency gate. Full block/if checks still abort at
|
||||
1,024 in lowering; control/liveness and remaining callbacks, Q-060 full GC and
|
||||
Phase 6 stay open. Q-062 separately logs a preserved grouped-statement gap.
|
||||
|
||||
|
||||
## Q-062 — Parenthesized block constructs without a statement terminator
|
||||
|
||||
**Open; existing source-parser behavior, not a new rule.** Spec 15 §4 makes
|
||||
unparenthesized block constructs self-delimiting and requires semicolons for
|
||||
ordinary expression statements; the reference grammar includes `expr ";"` in
|
||||
`statement`. The parser also accepts a parenthesized block/if/match followed by another
|
||||
statement without `;`, through the ordinary expression path's block-kind
|
||||
fallback. Claude identified this during the Q-061 control-parser review.
|
||||
|
||||
A frozen HEAD `9534359` binary and the shared-control-parser candidate both
|
||||
accept this complete source with exit 0 and no diagnostics:
|
||||
|
||||
```aji
|
||||
module grouped
|
||||
fn g() -> void effects [] {}
|
||||
fn main() -> u64 effects [] {
|
||||
(if true {} else {}) g();
|
||||
return 0u64;
|
||||
}
|
||||
```
|
||||
|
||||
The Q-061 traversal repair deliberately preserves this behavior. A separate
|
||||
spec/parser decision and positive/negative boundary tests are needed before
|
||||
changing acceptance. This does not add a semantic rule or close Q-061.
|
||||
Reference in new issue
Block a user