2.6 KiB
2.6 KiB
PBS AST Workshop 3
Status: Closed (2026-03-05)
Purpose
Close AST obligations for statement and expression surfaces, including precedence/associativity representation and unsupported-form boundaries.
Decisions To Produce
- Mandatory statement/expression node families for v1 AST.
- Representation obligations for precedence and associativity outcomes.
- Deterministic rejection policy for unsupported statement/expression forms.
- Minimum node consistency rules used by diagnostics and lowering.
Candidate Decisions
1. Parsing Outcomes Must Be Visible in AST Shape
- Precedence and associativity results are reflected by explicit tree shape.
- No hidden post-parse rewrites that change source-observable meaning.
2. Unsupported Forms Are Deterministic Reject
- Forms outside supported syntax/lowering slice must fail with stable diagnostics.
- They must not collapse into permissive placeholder AST nodes.
3. AST Consistency for Downstream Use
- Statement/expression nodes needed by static semantics and lowering must always carry coherent spans and child structure.
Questions To Resolve
- Which expression forms are mandatory in v1 AST conformance?
- Which recoveries are acceptable without masking parse errors?
- What exact AST checks should Gate U fixtures assert?
Expected Outputs
- Decision note on statement/expression AST model.
- Decision note on unsupported-form policy.
- Fixture targets for precedence/associativity and rejection cases.
Decision Outcome (2026-03-05)
Decision record: docs/pbs/decisions/AST Statements and Expressions Decision.md.
- Mandatory statement/expression node families cover the supported v1 PBS syntax slice, including
block,let,return, expression statement,identifier, literals,unary,binary,call, andgroup. - Precedence and associativity outcomes are normative via AST shape.
- Non-associative/forbidden chained forms are deterministic reject with stable diagnostics.
- AST remains structural; semantic compatibility/type rules stay in static semantics/linking.
- Unsupported forms are deterministic reject and cannot be masked by permissive placeholder nodes.
- Recovery is allowed, but recovered AST must remain structurally coherent with stable attribution.
- Gate U evidence requires positive/negative fixtures with AST-shape and diagnostics assertions.
Inputs
docs/pbs/specs/3. Core Syntax Specification.mddocs/pbs/specs/11. AST Specification.mddocs/pbs/specs/12. Diagnostics Specification.mddocs/pbs/specs/13. Lowering IRBackend Specification.mddocs/pbs/agendas/archive/11.2. AST Workshop 2 - Declarations and Type Surfaces.md