Skip to main content

Module analyze

Module analyze 

Source
Expand description

Collect-all suite analysis: the LSP’s whole-suite recompute in one function.

Where front::run fails fast and emits artifacts, analyze_suite accumulates every diagnostic and emits the relations editors need (bindings for go-to-def/references, macros for completion/def targets). A parse-failed unit reports its own diagnostic and is skipped downstream — no cascade of bogus follow-on errors.

Structs§

AnalyzeCtx
Everything analyze_suite needs, injected at the IO edge (sans-IO core).
Binding
One prose step bound to a macro — powers go-to-definition and references.
MacroRef
A macro definition — powers completion and is the go-to-definition target.
SuiteAnalysis
The product of one wholesale recompute: every feature’s read from here.

Functions§

analyze_suite
Recompute the whole suite in one pass: read every pack and feature through the provider, accumulate every diagnostic per source name, and record the binding and macro relations editors need. Broken packs short-circuit feature binding (no cascade); a parse-failed feature is skipped, not fatal.
validate_artifact
Parse-validate the exact emitted artifact text with the claiming engine’s real parser (--dry-run = §4.1–4.5 including artifact parse-validation). The diagnostic’s source is the emitted text itself, span at the broken line.