Struct stack_graphs::partial::SymbolStackBindings [−][src]
pub struct SymbolStackBindings { /* fields omitted */ }
Expand description
A mapping from symbol stack variables to symbol stacks.
Implementations
Creates a new, empty set of symbol stack bindings.
Returns the symbol stack that a particular symbol stack variable matched. Returns an error if that variable didn’t match anything.
pub fn add(
&mut self,
variable: SymbolStackVariable,
symbols: SymbolStack
) -> Result<(), PathResolutionError>
pub fn add(
&mut self,
variable: SymbolStackVariable,
symbols: SymbolStack
) -> Result<(), PathResolutionError>
Adds a new binding from a symbol stack variable to the symbol stack that it matched. Returns an error if you try to bind a particular variable more than once.