diff options
author | Nadrieril | 2019-03-06 12:19:26 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-06 12:19:26 +0100 |
commit | 564a5f37b106c69d8ebe9aec2f665f5222b3dfda (patch) | |
tree | 21779d5ea3bc5daaec7fa214402868cde101cfce /dhall_core/src/grammar_util.rs | |
parent | 5b32c5bdea80a0bdf19240f3cc2b8e2ae251d51a (diff) |
Split-off core into its own crate
Diffstat (limited to 'dhall_core/src/grammar_util.rs')
-rw-r--r-- | dhall_core/src/grammar_util.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dhall_core/src/grammar_util.rs b/dhall_core/src/grammar_util.rs new file mode 100644 index 0000000..ce73444 --- /dev/null +++ b/dhall_core/src/grammar_util.rs @@ -0,0 +1,7 @@ +use crate::core::{Expr, X}; + +pub type ParsedExpr<'i> = Expr<'i, X, X>; // FIXME Parse paths and replace the second X with Path +pub type BoxExpr<'i> = Box<ParsedExpr<'i>>; +pub type ExprOpFn<'i> = fn(BoxExpr<'i>, BoxExpr<'i>) -> ParsedExpr<'i>; +pub type ExprListFn<'i> = + fn(Option<BoxExpr<'i>>, Vec<ParsedExpr<'i>>) -> ParsedExpr<'i>; |