diff options
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index e04879d2..cadffef5 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -210,10 +210,19 @@ impl Eval for Spanned<&ExprBlock> { type Output = Value; fn eval(self, ctx: &mut EvalContext) -> Self::Output { + if self.v.scopes { + ctx.scopes.push(); + } + let mut output = Value::None; for expr in &self.v.exprs { output = expr.eval(ctx); } + + if self.v.scopes { + ctx.scopes.pop(); + } + output } } |
