[][src]Trait libslide::evaluator_rules::pattern_match::MatchRule

pub trait MatchRule<E: RcExpression> {
    fn match_rule(rule: RcExprPat, target: E) -> Option<PatternMatch<E>>;
}

Required methods

fn match_rule(rule: RcExprPat, target: E) -> Option<PatternMatch<E>>

Pattern matches a rule template against an expression. If successful, the results of the matching are returned as a mapping of rule to target expressions replacements.

A sucessful pattern matching is one that matches the target expression wholly, abiding the expression pattern matching rules.

Loading content...

Implementors

impl MatchRule<RcExprPat> for PatternMatch<RcExprPat>[src]

impl MatchRule<RcExpr> for PatternMatch<RcExpr>[src]

Loading content...