aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
Diffstat (limited to 'askama_derive/src')
-rw-r--r--askama_derive/src/generator.rs6
-rw-r--r--askama_derive/src/heritage.rs8
2 files changed, 8 insertions, 6 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 66f1b1c..5308c02 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -762,7 +762,7 @@ impl<'a> Generator<'a> {
buf.writeln(" {")?;
- arm_size += self.handle(ctx, &cond.block, buf, AstLevel::Nested)?;
+ arm_size += self.handle(ctx, &cond.nodes, buf, AstLevel::Nested)?;
arm_sizes.push(arm_size);
}
self.handle_ws(ws);
@@ -809,7 +809,7 @@ impl<'a> Generator<'a> {
self.visit_target(buf, true, true, &arm.target);
buf.writeln(" => {")?;
- arm_size = self.handle(ctx, &arm.block, buf, AstLevel::Nested)?;
+ arm_size = self.handle(ctx, &arm.nodes, buf, AstLevel::Nested)?;
}
self.handle_ws(ws2);
@@ -881,7 +881,7 @@ impl<'a> Generator<'a> {
buf.writeln("if !_did_loop {")?;
self.locals.push();
- let mut size_hint2 = self.handle(ctx, &loop_block.else_block, buf, AstLevel::Nested)?;
+ let mut size_hint2 = self.handle(ctx, &loop_block.else_nodes, buf, AstLevel::Nested)?;
self.handle_ws(loop_block.ws3);
size_hint2 += self.write_buf_writable(buf)?;
self.locals.pop();
diff --git a/askama_derive/src/heritage.rs b/askama_derive/src/heritage.rs
index 342416e..9ef7aeb 100644
--- a/askama_derive/src/heritage.rs
+++ b/askama_derive/src/heritage.rs
@@ -84,18 +84,20 @@ impl Context<'_> {
}
Node::Cond(branches, _) => {
for cond in branches {
- nested.push(&cond.block);
+ nested.push(&cond.nodes);
}
}
Node::Loop(Loop {
- body, else_block, ..
+ body,
+ else_nodes: else_block,
+ ..
}) => {
nested.push(body);
nested.push(else_block);
}
Node::Match(_, _, arms, _) => {
for arm in arms {
- nested.push(&arm.block);
+ nested.push(&arm.nodes);
}
}
_ => {}