More work on evaluating applications

for later testing + to kill a compiler warning
This commit is contained in:
greg 2018-02-22 03:34:36 -08:00
parent a1b874c891
commit 61795b0331
2 changed files with 4 additions and 0 deletions

View File

@ -42,3 +42,5 @@ struct CompilerPass {
} }
-change "Type...." names in parser.rs to "Anno..." for non-collision with names in typechecking.rs -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

View File

@ -137,6 +137,8 @@ impl ReplState {
Expression(Value(identifier, _), _) => { Expression(Value(identifier, _), _) => {
match self.values.get(&identifier) { match self.values.get(&identifier) {
Some(&ValueEntry::Function { ref body }) => { Some(&ValueEntry::Function { ref body }) => {
let new_state = ReplState::new();
let sub_ast = AST(body.clone());
println!("LOL ALL FUNCTIONS EVALUATE TO 2!"); println!("LOL ALL FUNCTIONS EVALUATE TO 2!");
Ok(FullyEvaluatedExpr::UnsignedInt(2)) Ok(FullyEvaluatedExpr::UnsignedInt(2))
}, },