51 lines
1.7 KiB
Markdown
51 lines
1.7 KiB
Markdown
# PBS AST Workshop 3
|
|
|
|
Status: Active
|
|
|
|
## Purpose
|
|
|
|
Close AST obligations for statement and expression surfaces, including precedence/associativity representation and unsupported-form boundaries.
|
|
|
|
## Decisions To Produce
|
|
|
|
1. Mandatory statement/expression node families for v1 AST.
|
|
2. Representation obligations for precedence and associativity outcomes.
|
|
3. Deterministic rejection policy for unsupported statement/expression forms.
|
|
4. 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
|
|
|
|
1. Which expression forms are mandatory in v1 AST conformance?
|
|
2. Which recoveries are acceptable without masking parse errors?
|
|
3. What exact AST checks should Gate U fixtures assert?
|
|
|
|
## Expected Outputs
|
|
|
|
1. Decision note on statement/expression AST model.
|
|
2. Decision note on unsupported-form policy.
|
|
3. Fixture targets for precedence/associativity and rejection cases.
|
|
|
|
## Inputs
|
|
|
|
- `docs/pbs/specs/3. Core Syntax Specification.md`
|
|
- `docs/pbs/specs/11. AST Specification.md`
|
|
- `docs/pbs/specs/12. Diagnostics Specification.md`
|
|
- `docs/pbs/specs/13. Lowering IRBackend Specification.md`
|
|
- `docs/pbs/agendas/11.2. AST Workshop 2 - Declarations and Type Surfaces.md`
|