diff --git a/src/asts/past.rs b/src/asts/past.rs index c2c0942..6b01db1 100644 --- a/src/asts/past.rs +++ b/src/asts/past.rs @@ -45,7 +45,6 @@ pub enum PExpr { #[derive(Clone, Debug)] pub enum PStmt { Expr(Spanned), - Let(Vec<(String, Type, Spanned)>), Func { name: String, args: Vec<(String, Type)>, diff --git a/src/trans/low.rs b/src/trans/low.rs index daffbf5..8e0b1f2 100644 --- a/src/trans/low.rs +++ b/src/trans/low.rs @@ -7,7 +7,6 @@ use crate::asts::{ pub fn translate_stmt(stmt: PStmt) -> Stmt { match stmt { PStmt::Expr(e) => Stmt::Expr(translate_expr(e.0)), - PStmt::Let(vars) => todo!(), PStmt::Func { name, args, ret, body } => Stmt::Func { name, args: args.into_iter().map(|(name, _ty)| name).collect(), @@ -20,7 +19,7 @@ pub fn translate_stmt(stmt: PStmt) -> Stmt { pub fn exprs_to_lam(es: Vec) -> Expr { let lam = Expr::Lambda { args: vec![], - body: es.into_iter().map(|e| translate_expr(e)).collect(), + body: es.into_iter().map(translate_expr).collect(), }; Expr::Call(Box::new(lam), vec![]) }