Deferred Triple Diagnostics Refactor
We temporarily disabled structured TRPL00x diagnostics (TRPL001, TRPL004, TRPL006) and one disambiguation test.
Rationale
- Left-recursive legacy expression grammar made capturing malformed triple literal shapes brittle.
- Valid and malformed forms currently produce generic
SYNTAXdiagnostics; this is acceptable short-term because malformed shapes do not silently compile. - Unblocking downstream work (expansion, graph features) took priority.
Follow-up Plan
- Introduce precedence-based expression grammar (primary -> postfix -> unary -> power -> mult -> add -> rel -> eq -> and -> or -> assign).
- Move
tripleLiteralintoprimary(non-left-recursive) so malformed variants parse as a single node. - Ensure unified permissive rule still accepts: missing object, trailing comma, extra components.
- Re-enable
VisitTripleLiteralto produceMalformedTripleExpand restoreTripleDiagnosticsVisitoremission of TRPL codes. - Re-enable tests:
TripleDiagnosticsTests(all methods)DISAMBIG_01_Simple_Triple_Token_Sequence_Contains_Commas- Remove
DISABLE_TRIPLE_DIAGNOSTIC_TESTSsymbol and commented test blocks.
Risks if Deferred Too Long
- Users get low-quality syntax-only errors for common authoring mistakes.
- Harder to differentiate malformed vs semantic errors in later phases.
- Potential future expansion logic may need to re-implement malformed detection heuristics (duplication).
Acceptance Criteria
- All previously disabled tests green without altering their assertions.
- No generic
SYNTAXdiagnostics for the malformed triple cases; they carry specific TRPL00x Codes. - Precedence grammar passes existing non-triple expression tests.
Owner
Assign in upcoming milestone after current feature branch merges.
Tracking file created automatically.