cli: add deterministic source formatter

This commit is contained in:
dev committed 2026-10-07 18:21:06 +03:00
1 parent d901d5227b
commit 462ddd2c5c
14 files changed
+787 -13

No files matched your search

+4
View File
@@ -291,3 +291,7 @@ STD-6d.2 needs to return allocation-size validation failure without allocating.
General collections and algorithms need explicit typed hash/equality/order operations, while current generics carry only types.
**Resolved contract (RFC 0029 Implemented):** spec 15 §18 permits explicitly selected source functions as static parameters with exact typed/effect contracts. Selection is part of nominal specialization identity and lowers to existing named AIR calls/workers. No function pointers, capture environment, inferred effects or runtime dispatch are introduced. Q-037 is resolved by the implemented and verified generic map/set contracts (RFCs 0030/0031).
## Q-040 — Block statements followed by unary-leading expressions
P6-8 review found an existing parser ambiguity: `if true { *p = 2u64; } *p = *p + 1u64;` is consumed as an expression continued by multiplication and then rejects E7006 at the assignment. The same failure is reproduced after a standalone block or `match`; `while` dispatches separately and is not affected. Source whitespace is insignificant; spec 15 §4 and the grammar admit both block statements and expressions beginning with block/control-flow forms. The intended disambiguation must be specified before changing which previously parsed expressions are accepted. Decide how a standalone block statement ends before a dereference/other unary-leading statement while preserving block-valued expressions in explicit expression contexts. Add positive/rejected parser and lowering cases for the chosen rule. The formatter preserves the current tokens/AST and MUST NOT insert semicolons or infer the intended statement boundary. This question is separate from P6-8.