cli: disambiguate block statement boundaries
This commit is contained in:
1 parent
462ddd2c5c
commit
911982dd1c
33 files changed
+465
-7
No files matched your search
@@ -142,3 +142,5 @@ RFC 0036 (Proposed), explicit source borrow returns (cl100k, relative to paths):
|
||||
RFC 0036 review fixes clarify reserved task borrow returns and known array bounds in unused generic signatures. These rules add 54 cl100k tokens: other source docs 64,160 → 64,214, full source 72,848 → 72,902 (+0.07%); Quick Reference stays 8,688. o200k groups are 8,723 / 64,413 / 73,136; Qwen2.5 8,954 / 65,794 / 74,748. language/ownership.md is 1,873 cl100k tokens; AIR and library/std.md stay unchanged. The additions make source rejection predictable without adding a semantic feature.
|
||||
|
||||
P6-8 source formatter (cl100k): Quick Reference 8,688 → 8,728 (+40), other source docs 64,214 → 64,677 (+463), full source 72,902 → 73,405 (+0.69%). language/tooling.md is 3,051 tokens. o200k groups are 8,763 / 64,876 / 73,639; Qwen2.5 8,994 / 66,259 / 75,253. AIR stays 179,282 bytes / 46,300 cl100k tokens, and library/std.md stays unchanged. One command with check/write modes reduces whitespace repair and diff noise while preserving tokens, comments and canonical AIR; it adds no language concept, feature, verifier/runtime state or diagnostic code. No empirical MCC benefit is claimed.
|
||||
|
||||
Q-040 block boundaries (DD-016, cl100k): Quick Reference 8,728 → 8,769 (+41), other source docs 64,677 → 65,012 (+335), full source 73,405 → 73,781 (+0.51%). o200k groups are 8,805 / 65,212 / 74,017; Qwen2.5 9,037 / 66,603 / 75,640. AIR and library/std.md are unchanged. One syntactic boundary rule and an explicit-discard guard replace an ambiguity; there is no new syntax form, diagnostic code or verifier/runtime state. No empirical MCC benefit is claimed.
|
||||
@@ -23,7 +23,7 @@ effects [io.read, io.write]
|
||||
|
||||
- `main`'s parameters are capabilities, granted by name: `aji run --grant input=io.read --grant out=io.write --stdin 'hi' main.aji`.
|
||||
- Every function lists its effects after the signature. A missing effect is `E3101`, whose `suggested_effects` field is the full list to write.
|
||||
- Statements end with `;`; `if`/`while`/`for`/`loop`/`match`/`select`/`scope`/`shield`/`lock` blocks do not.
|
||||
- Statements end with `;`; block statements do not require one. A bare `if`, `match` or `{…}` at statement/tail start ends at its final `}`. Parenthesize it to continue with an operator. Before another statement it must yield `void` or diverge; use `;` to explicitly discard a value (`E7006` otherwise). Initializers, returns and arguments use ordinary expression parsing.
|
||||
|
||||
## 2. Types
|
||||
|
||||
|
||||
Reference in new issue
Block a user