Macro holmes::clause_match
[−]
[src]
macro_rules! clause_match { ($vars:ident, $m:ident, $n:ident, {$start:tt, $end:tt, $v:ident}) => { ... }; ($vars:ident, $m:ident, $n:ident, [_]) => { ... }; ($vars:ident, $m:ident, $n:ident, ($v:expr)) => { ... }; ($vars:ident, $b:ident, $n:ident, $m:ident) => { ... }; }
Generates a MatchExpr
from a representation
Args:
$vars:ident
is a mutableHashMap
from variable name to variable number, to be updated as more variables are created, or referenced to re-use existing variable numberings.$n:ident
is a mutable Var, intended to be used as an allocator for the next unused variable. It should have a value equal to the next unallocated variable- Clause representation:
[_]
-> unbound(val)
-> constant matchx
-> variable bind