Expand description
Cross-file semantic analysis for inkle’s ink narrative scripting language.
The analyzer merges per-file SymbolManifests from brink-ir into a
unified SymbolIndex, then runs validation passes (name resolution,
duplicate detection, type checking). Both brink-compiler and brink-lsp
consume the analysis result.
Structs§
- Analysis
Options - Tooling options for analysis: the registered host manifest and the severity policy for its external checks. Defaults to no manifest.
- Analysis
Result - The output of cross-file semantic analysis.
- FileId
- Opaque identifier for a source file within a multi-file project.
- Resolved
Param - A merged parameter: name (from the ink declaration) and resolved type.
- Resolved
Type - A resolved type reference: the written name, its base type (if resolvable), and any closed-domain constraint (from a semantic type definition).
- Symbol
Meta - Per-symbol merged metadata (docs, types, values), surfaced to the IDE and
used by the call-site checks. Keyed by the symbol’s
DefinitionIdon theAnalysisResult. For externals this merges inline docs with the registered host manifest; knots/stitches carry inline docs only; VAR/CONST add an inferred initializer value. - Value
Meta - Initializer-derived metadata for a VAR or CONST declaration. Purely presentational — ink variables are dynamically retyped at runtime, so this never drives diagnostics.
Enums§
- External
Check Severity - Severity policy for manifest-driven external checks. Configurable as a
compiler/IDE flag; defaults to
Error(a registered manifest is binding). - Inferred
Type - The type of a VAR/CONST initializer literal. Deliberately separate from
the host-manifest
BaseTypevocabulary —Divert/Listare ink runtime concepts that must not leak into the manifest serialization schema.
Functions§
- analyze
- Run cross-file semantic analysis with default options (no host manifest).
- analyze_
with_ options - Run cross-file semantic analysis with explicit tooling options, including an optional host-capability manifest and its external-check severity.
Type Aliases§
- Resolution
Map - Maps reference use-sites to their resolved definitions, with file provenance.