Module stack_graphs::paths[][src]

Expand description

Paths represent name bindings in a source language.

With the set of rules we have for constructing stack graphs, bindings between references and definitions are represented by paths within the graph. Each edge in the path must leave the symbol and scopes stacks in a valid state — otherwise we have violated some name binding rule in the source language. The symbol and scope stacks must be empty at the beginning and end of the path. The reference’s push symbol node “seeds” the symbol stack with the first thing that we want to look for, and once we (hopefully) reach the definition that reference refers to, its pop node will remove that symbol from the symbol stack, leaving both stacks empty.

Structs

A sequence of edges from a stack graph. A complete path represents a full name binding in a source language.

Details about one of the edges in a name-binding path

The edges in a path keep track of precedence information so that we can correctly handle shadowed definitions.

Manages the state of a collection of paths built up as part of the path-finding algorithm.

A sequence of exported scopes, used to pass name-binding context around a stack graph.

A symbol with a possibly empty list of exported scopes attached to it.

A sequence of symbols that describe what we are currently looking for while in the middle of the path-finding algorithm.

Enums

Errors that can occur during the path resolution process.

Traits

A collection that can be used to receive the results of the Path::extend method.