Expand description
Stack graph: name-resolution paths from references to their definitions.
Structs§
- Definition
- What makes a
SymbolPopa definition rather than a plain re-export. - Forward
Stitcher - Extends walks from the references of one file, phase by phase, with the stored partial paths.
- Import
Binding - How an import’s
SymbolPopbinds the module it imports from. - Import
Site - One import or re-export resolved to what it binds.
- Minimal
Partial Paths - The walks a search found, and the endpoints whose search ran out of work.
- Partial
Bindings - The symbol stack each variable of unified partial stacks stands for.
- Partial
Path - A walk from
starttoend: the symbol stack it needs on entry and the one it leaves. - Partial
Path Database - The minimal partial paths of each file, kept with the graph they walk.
- Partial
Path Id - Where a stored partial path lives: its file and its place among the file’s paths.
- Partial
Symbol Stack - A symbol stack pattern: known symbols, top first, over an optional unknown rest.
- Path
Edge - An edge a partial path follows.
- Stack
Graph - The stack graph: every push/pop/scope node plus the paths between them.
- Stack
Scope - A scope node: where name lookups stop descending further down the stack.
- Stack
State - The symbol stack a path carries through the graph, top first.
- Stitched
Path - A walk the stitcher built, and the file of the node it ends at.
- Symbol
Pop - A definition: a symbol popped off the stack, ending a reference’s search.
- Symbol
Push - A reference: a symbol pushed onto the stack to be resolved against a definition.
- Symbol
Stack Variable - Stands for the unknown rest of a partial symbol stack.
- Unify
Error - Two partial symbol stacks have no stack in common.
Enums§
- Binding
Reach - Who can look up the name an
ImportSitebinds. - Path
Error - Why two partial paths do not form one walk.
- Scope
Type - The lexical construct a
StackScopestands for. - Stack
Node - One node of a file’s stack graph: a step in the push/pop path name resolution walks to connect a reference to its definition.
- Transition
Error - Why a node cannot be applied to a
StackState.
Constants§
- DEFAULT_
MAX_ STITCH_ WORK - The stored paths a stitcher tries from one reference when no other limit is given.
- DEFAULT_
MAX_ WORK - The edges a search from one endpoint tries before it stops by default.
Functions§
- build_
stack_ graph - Builds the stack graph of one file from its finished syntax graph.
- import_
sites - Every import and re-export site in
syntax, for the languages this resolves imports for. - minimal_
partial_ paths - Every walk of
graphfrom one endpoint to the next, without passing another endpoint, trying at mostmax_workedges from each endpoint.