Sibling articles under this feature previously restated requirements in inconsistent forms.
Analysis, query, and diagnostics facades - Examples
Platform spec article
Analysis, query, and diagnostics facades - Examples
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Analysis, query, and diagnostics facades.
Context
Decision
This feature hub owns normative MUST/SHOULD contract text. Sibling articles must not redefine hub requirements and should link here for authority.
Consequences
Contract changes start on the hub or in linked ADRs, then propagate to articles and implementation anchors.
Verification anchors
site/website/src/content/docs/platform-spec/compiler/compiler-mods/analysis-query-diagnostics-facade/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Analysis, query, and diagnostics facades.
Context
Implementation crates accumulated informal notes that diverged from published contracts.
Decision
Normative platform-spec prose and ADRs under this feature supersede informal comments in implementation crates until explicitly migrated into spec text.
Consequences
Engineers file spec/ADR updates when behavior changes; crate comments are non-authoritative for conformance arguments.
Verification anchors
compiler/crates/beskid_analysis/src/analysis/compiler/crates/beskid_analysis/src/resolve/compiler/crates/beskid_lsp/src/diagnostics.rs
-
This feature hub defines the normative contract for **`Beskid.Compiler.Query`** and **`Beskid.Compiler.Diagnostics`** (a
Context
This feature hub defines the normative contract for
Beskid.Compiler.QueryandBeskid.Compiler.Diagnostics(and related analysis facades) and links detailed articles.Decision
The reference compiler must implement Analysis, query, and diagnostics facades as documented in this feature hub and its article bundle.
Consequences
Changes require hub/ADR updates and verification anchor extensions.
Verification anchors
compiler/crates/beskid_analysis/src/analysis/compiler/crates/beskid_analysis/src/resolve/compiler/crates/beskid_lsp/src/diagnostics.rs
- Analysis, query, and diagnostics facades - Contracts and edge cases Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
- Analysis, query, and diagnostics facades - Design model Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
- Analysis, query, and diagnostics facades - Examples Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
- Analysis, query, and diagnostics facades - FAQ and troubleshooting Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
- Analysis, query, and diagnostics facades - Flow and algorithm Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
- Analysis, query, and diagnostics facades - Verification and traceability Semantic queries, symbol handles, and diagnostic transport available inside meta execution.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
This article collects examples for Analysis, query, and diagnostics facades (informative sketches aligned with contracts).
Example A — Descendants and parent (informative)
Section titled “Example A — Descendants and parent (informative)”// Find first function under program; walk to enclosing module item.let query = Beskid.Compiler.Query.AtProgram(program);let funcRef = Beskid.Compiler.Query.FindFirst(query, Beskid.Syntax.Nodes.NodeKind.FunctionDefinition);if funcRef is some(ref) { let parent = Beskid.Compiler.Query.Parent(ref); // parent is NodeRef of enclosing item, not a variant match on enum Node}Example B — Minimal diagnostic query
Section titled “Example B — Minimal diagnostic query”A compile-time module reads a syntax attribute using OfKind + AsAttributeDeclaration, then emits a diagnostic without mutating syntax.
Example C — Emitter sketch
Section titled “Example C — Emitter sketch”A contributor constructs a new method declaration through Beskid.Compiler.Emit, attaches trivia, and registers it with the incremental graph.
Executable snippets will track the reference implementation as mod host execution lands in the compiler; until then, treat these as specification fixtures.