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