Return last value out of function
This commit is contained in:
parent
f8a521fc9b
commit
1ffbeb6472
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user