diff options
Diffstat (limited to 'src/semantic')
-rw-r--r-- | src/semantic/translate.rs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/semantic/translate.rs b/src/semantic/translate.rs index 9da6411..cf1dcf8 100644 --- a/src/semantic/translate.rs +++ b/src/semantic/translate.rs @@ -31,18 +31,19 @@ fn trans_exp<'a>(venv: &mut TypeEnvironment<'a>, exp: &WithLocation<ast::Express match &exp.value { &Let(ref decls, ref body) => { - let mut new_env = TypeEnvironment::new(None); - for decl in decls.iter() { - let decl_ty = trans_exp(venv, &*decl.value.value)?; - if let Some(_) = decl.value.type_ { - return err!(decl, TypeError::Unimplemented); - } - else { - new_env.add_binding(decl.value.name.value.clone(), decl_ty); - } - } - new_env.set_parent(venv); - trans_exp(&mut new_env, &*body) + err!(exp, TypeError::Unimplemented) + // let mut new_env = TypeEnvironment::new(None); + // for decl in decls.iter() { + // let decl_ty = trans_exp(venv, &*decl.value.value)?; + // if let Some(_) = decl.value.type_ { + // return err!(decl, TypeError::Unimplemented); + // } + // else { + // new_env.add_binding(decl.name.clone(), decl_ty); + // } + // } + // new_env.set_parent(venv); + // trans_exp(&mut new_env, &*body) }, &UnaryOp(ref op, ref operand) => { use ast::UnaryOp::*; |