diff options
Diffstat (limited to '')
-rw-r--r-- | src/grammar_util.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/grammar_util.rs b/src/grammar_util.rs new file mode 100644 index 0000000..cbd1e59 --- /dev/null +++ b/src/grammar_util.rs @@ -0,0 +1,8 @@ +use core::Expr; + +pub type BoxExpr = Box<Expr<(), ()>>; +pub type ExprOpFn = fn(BoxExpr, BoxExpr) -> Expr<(), ()>; + +pub fn bx<T>(x: T) -> Box<T> { + Box::new(x) +} |