Trait libunseemly::walk_mode::NegativeWalkMode[][src]

pub trait NegativeWalkMode: WalkMode {
    fn needs_pre_match() -> bool;

    fn qlit_mismatch_error(l: Self::Elt, r: Self::Elt) -> Self::Err { ... }
fn pre_match(
        expected: Self::Elt,
        got: Self::Elt,
        env: &Assoc<Name, Self::Elt>
    ) -> Option<(Clo<Self::Elt>, Clo<Self::Elt>)> { ... }
fn context_match(
        expected: &Ast,
        got: &Ast,
        _env: Assoc<Name, Self::Elt>
    ) -> Result<EnvMBE<Ast>, <Self as WalkMode>::Err> { ... } }

Required methods

Provided methods

What happens if destructuring fails?

Before matching, possibly adjust the two Elts to match better. (None is auto-match.) By default, a no-op.

Match the context element against the current node. Note that this should come after pre_match, so any remaining variables will be not be resolved. TODO: I should think about whether to use Ast or Elt during matches in ast_walk TODO: This should replace crate::ast::destructure TODO: Use this more

Implementors