summaryrefslogtreecommitdiff
path: root/src/grammar_util.rs
diff options
context:
space:
mode:
authorNanoTech2016-12-06 09:10:15 +0000
committerNanoTech2017-03-10 23:48:27 -0600
commitd6240a4b184cac1fbf61ab35f9f3813efb780d31 (patch)
tree94f4df613beeefe72ada1d55c9f25de03bcdd448 /src/grammar_util.rs
Initial commit
Diffstat (limited to 'src/grammar_util.rs')
-rw-r--r--src/grammar_util.rs8
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)
+}