implements PLN-0092

This commit is contained in:
2026-07-15 06:55:26 +01:00
parent ad2ae00f39
commit 917b0e1b9a
19 changed files with 955 additions and 18 deletions
@@ -76,10 +76,18 @@ Mandatory declaration metadata on required declaration nodes includes:
2. declared signature/surface when applicable (parameters/return),
3. declaration-level syntactic flags/attributes required by later phases,
4. stable `file/start/end` attribution,
5. lifecycle-marker metadata when a declaration carries `[Init]` or `[Frame]`.
5. lifecycle-marker metadata when a declaration carries `[Init]` or `[Frame]`,
6. documentation attribute metadata when a declaration carries `[Doc(markdown = """...""")]`.
Missing required attribution or metadata on mandatory nodes is non-conformant.
Documentation metadata rules:
- The AST MUST preserve the `Doc` attribute name, the `markdown` argument name, the raw documentation text block payload, and source attribution for the whole attribute and payload.
- The AST MUST distinguish documentation text block payloads from ordinary string literals.
- The AST MUST preserve enough attribution for later diagnostics to point at malformed or invalid `Doc` usage.
- AST construction MUST NOT normalize documentation text block content in a way that loses source-observable parse meaning before the semantic normalization step.
## 8. Mandatory Declaration Families
The v1 AST must represent, at minimum, declaration families for:
@@ -104,6 +112,8 @@ Lifecycle-observable declarations must preserve marker metadata explicitly:
- top-level `fn` marked with `[Frame]`,
- and host method signatures marked with `[InitAllowed]`.
Documentation-observable declarations must preserve `Doc` metadata explicitly on every accepted named API declaration surface that carries `[Doc(markdown = """...""")]`.
## 9. Mandatory Statement and Expression Families
The v1 AST must represent statement/expression families for the supported core syntax slice, including at minimum: