diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-15 13:12:07 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-15 13:12:07 +0200 |
| commit | ea921aca5d6268474383b6bac8fdd78de1f23c5a (patch) | |
| tree | 797aa10f026abab2c9bde6fef17026f83338dd11 /src/eval/mod.rs | |
| parent | 5de791d9e6a1006dc6a017ec8e20a1c70a91a780 (diff) | |
Blocks directly in template also scope
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index 9fe86ebe..58f7e4d7 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -269,9 +269,7 @@ impl Eval for BlockExpr { type Output = Value; fn eval(&self, ctx: &mut EvalContext) -> TypResult<Self::Output> { - if self.scoping { - ctx.scopes.enter(); - } + ctx.scopes.enter(); let mut output = Value::None; for expr in &self.exprs { @@ -279,9 +277,7 @@ impl Eval for BlockExpr { output = ops::join(output, value).at(expr.span())?; } - if self.scoping { - ctx.scopes.exit(); - } + ctx.scopes.exit(); Ok(output) } |
