2.5 KiB
2.5 KiB
| id | ticket | title | status | created | ref_decisions | tags | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0094 | pbs-symbol-documentation-and-hover-markdown | Extend PBS attribute parser and AST for Doc markdown payloads | done | 2026-07-15 |
|
|
Briefing
Extend parsing and AST representation so [Doc(markdown = """...""")] can be represented structurally before semantic validation.
Objective
Parse documentation text block attribute values and expose them in AST without accepting alternate Doc shapes as valid semantics.
Dependencies
- Depends on
PLN-0092. - Depends on
PLN-0093for lexer support.
Scope
- Extend attribute values to carry documentation text block payloads.
- Preserve raw payload and spans needed for normalization and diagnostics.
- Keep parser recovery consistent with existing attribute parsing.
Non-Goals
- Validate whether
Docis allowed on a declaration. - Normalize the text block.
- Attach documentation to semantic symbols.
Execution Method
- Update
PbsAst.AttributeValuevariants inprometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/ast/PbsAst.javato include a documentation text block value or equivalent typed payload. - Update
PbsAttributeParserso attribute arguments can parsemarkdown = """...""". - Keep existing string, int, and bool attribute argument parsing unchanged.
- Ensure parser diagnostics remain syntax-level: malformed attribute structure is parse error; invalid
Docshape is left to semantic validation where possible. - Add parser tests proving
Docattributes parse on top-level and nested declaration forms that already support attributes.
Acceptance Criteria
[Doc(markdown = """...""")]parses into a distinct AST value or unambiguous attribute value representation.- Existing attributes such as
[Init],[Frame],[Host(...)], and[InitAllowed]continue to parse. - Invalid generic attribute syntax still recovers at the same boundaries as before.
Tests
- Targeted parser tests under
prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs/parser. - Existing PBS parser test suite.
Affected Artifacts
prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/ast/PbsAst.javaprometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/pbs/parser/PbsAttributeParser.javaprometeu-compiler/frontends/prometeu-frontend-pbs/src/test/java/p/studio/compiler/pbs/parser/PbsParserTest.java