update: passing allocator to evaluateCondition
This commit is contained in:
parent
c14a92e7ab
commit
b93d6f5c81
1 changed files with 5 additions and 3 deletions
|
|
@ -187,7 +187,7 @@ pub const Renderer = struct {
|
|||
try writer.writeAll(buf.items);
|
||||
},
|
||||
.if_block => {
|
||||
const condition = self.evaluateCondition(node.@"if".?.condition) catch return false;
|
||||
const condition = try self.evaluateCondition(alloc, node.@"if".?.condition);
|
||||
|
||||
if (condition) {
|
||||
for (node.@"if".?.true_body) |child| {
|
||||
|
|
@ -232,10 +232,12 @@ pub const Renderer = struct {
|
|||
try self.renderNode(alloc, nodes, child, writer, &ctx, null);
|
||||
}
|
||||
|
||||
if (node.@"for".?.body.len == 0) {
|
||||
for (node.@"for".?.empty_body) |child| {
|
||||
try self.renderNode(alloc, nodes, child, writer, &ctx, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
.super => {
|
||||
if (parent_block_nodes) |parent| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue