Skip to main content

Module mapper

Module mapper 

Source
Expand description

Deterministic symbol-level mapper (spec §7.1): manifest glob → contract, refined to the exported contract symbols a written file actually references. Resolution happens once at the boundary into canonical contract names; ambiguity and misses are structured errors with candidates. Deterministic by crate contract — tree-sitter parsing only, no retrieval, never load-bearing for gates: a file that cannot be parsed degrades to an empty symbol list, which means “deliver the full contract”, never a lost gate decision.

Structs§

ContractSlice
The symbol-level slice of one contract for one write.

Enums§

ReferenceError

Functions§

resolve_reference
Resolves a shorthand contract reference (canonical name, source path, or source basename) to the declared name, once, at the boundary.
slices_for_write
Symbol-level slices for a write of content at path. contract_sources supplies each declared contract’s authoring source text (the mapper is pure — callers own file access).