From 61795b03310b1a7969d3719f3c9c4388ecacb79f Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 22 Feb 2018 03:34:36 -0800 Subject: [PATCH] More work on evaluating applications for later testing + to kill a compiler warning --- TODO.md | 2 ++ src/schala_lang/eval.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/TODO.md b/TODO.md index 4cc369d..9b33ebc 100644 --- a/TODO.md +++ b/TODO.md @@ -42,3 +42,5 @@ struct CompilerPass { } -change "Type...." names in parser.rs to "Anno..." for non-collision with names in typechecking.rs + +* In eval.rs, change `ReplState` to something that assumes no repl diff --git a/src/schala_lang/eval.rs b/src/schala_lang/eval.rs index 1379852..9ca40a9 100644 --- a/src/schala_lang/eval.rs +++ b/src/schala_lang/eval.rs @@ -137,6 +137,8 @@ impl ReplState { Expression(Value(identifier, _), _) => { match self.values.get(&identifier) { Some(&ValueEntry::Function { ref body }) => { + let new_state = ReplState::new(); + let sub_ast = AST(body.clone()); println!("LOL ALL FUNCTIONS EVALUATE TO 2!"); Ok(FullyEvaluatedExpr::UnsignedInt(2)) },