From b93d6f5c81866aceffa597e5eb5fa6574ed6f7b4 Mon Sep 17 00:00:00 2001 From: "Lucas F." Date: Wed, 14 Jan 2026 14:20:56 -0300 Subject: [PATCH] update: passing allocator to evaluateCondition --- src/renderer.zig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/renderer.zig b/src/renderer.zig index 04d8dac..d60649a 100644 --- a/src/renderer.zig +++ b/src/renderer.zig @@ -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,8 +232,10 @@ pub const Renderer = struct { try self.renderNode(alloc, nodes, child, writer, &ctx, null); } - for (node.@"for".?.empty_body) |child| { - 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); + } } } },