From e72192c0c1825f36f054263437029d05d717c957 Mon Sep 17 00:00:00 2001 From: NanoTech Date: Thu, 8 Dec 2016 03:12:38 -0600 Subject: Begin implementing type checking --- src/grammar_util.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/grammar_util.rs') diff --git a/src/grammar_util.rs b/src/grammar_util.rs index cf0ee59..6927d33 100644 --- a/src/grammar_util.rs +++ b/src/grammar_util.rs @@ -1,15 +1,11 @@ -use core::Expr; +use core::{Expr, X}; use lexer::Builtin; -pub type ParsedExpr<'i> = Expr<'i, (), ()>; +pub type ParsedExpr<'i> = Expr<'i, X, X>; // FIXME Parse paths and replace the second X with Path pub type BoxExpr<'i> = Box>; pub type ExprOpFn<'i> = fn(BoxExpr<'i>, BoxExpr<'i>) -> ParsedExpr<'i>; pub type ExprListFn<'i> = fn(BoxExpr<'i>, Vec>) -> ParsedExpr<'i>; -pub fn bx(x: T) -> Box { - Box::new(x) -} - pub fn builtin_expr<'i, S, A>(b: Builtin) -> Expr<'i, S, A> { match b { Builtin::Natural => Expr::Natural, -- cgit v1.2.3