From d6240a4b184cac1fbf61ab35f9f3813efb780d31 Mon Sep 17 00:00:00 2001 From: NanoTech Date: Tue, 6 Dec 2016 09:10:15 +0000 Subject: Initial commit --- src/grammar_util.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/grammar_util.rs (limited to 'src/grammar_util.rs') 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>; +pub type ExprOpFn = fn(BoxExpr, BoxExpr) -> Expr<(), ()>; + +pub fn bx(x: T) -> Box { + Box::new(x) +} -- cgit v1.2.3