Return last value out of function

This commit is contained in:
greg 2016-01-24 12:10:34 -08:00
parent f8a521fc9b
commit 1ffbeb6472

View File

@ -225,11 +225,12 @@ impl Evaluator {
} }
self.frames.push(frame); self.frames.push(frame);
let mut retval = Null;
for expr in function.body.iter() { for expr in function.body.iter() {
self.reduce_expr(expr.clone()); retval = self.reduce_expr(expr.clone());
} }
self.frames.pop(); self.frames.pop();
Null retval
} }
} }