Macro holmes::hexpr [] [src]

macro_rules! hexpr {
    ($vars:ident, $n:ident, [$hexpr_name:ident]) => { ... };
    ($vars:ident, $n:ident, ($hexpr:expr)) => { ... };
    ($vars:ident, $n:ident, {$hexpr_func:ident($($hexpr_arg:tt),*)}) => { ... };
}

Generates an expression structure

Args:

  • $vars:ident is a mutable HashMap 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
  • the expression to convert
    • [var]
    • (val)
    • {f(expr, expr, expr)}