Skip to content

Commit

Permalink
fix $if
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it committed Aug 30, 2024
1 parent 8afc8d0 commit 15e2efb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/template.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn SuperTemplate(comptime ScriptyVM: type, comptime OutWriter: type) type {

const IfFrame = struct {
node_idx: u32,
value: Value,
value: *const Value.Optional,
};

const LoopFrame = struct {
Expand Down Expand Up @@ -333,7 +333,7 @@ pub fn SuperTemplate(comptime ScriptyVM: type, comptime OutWriter: type) type {
.optional => |opt| if (opt) |v| {
try tpl.if_stack.append(tpl.arena, .{
.node_idx = ev.idx,
.value = v.value,
.value = v,
});
} else {
skip_body = true;
Expand Down Expand Up @@ -548,7 +548,7 @@ pub fn SuperTemplate(comptime ScriptyVM: type, comptime OutWriter: type) type {
.optional => |opt| if (opt) |v| {
try tpl.if_stack.append(tpl.arena, .{
.node_idx = ev.idx,
.value = v.value,
.value = v,
});
} else {
skip_body = true;
Expand Down Expand Up @@ -794,7 +794,7 @@ pub fn SuperTemplate(comptime ScriptyVM: type, comptime OutWriter: type) type {
.optional => |opt| if (opt) |v| {
try tpl.if_stack.append(tpl.arena, .{
.node_idx = ev.idx,
.value = v.value,
.value = v,
});
} else {
skip_body = true;
Expand Down

0 comments on commit 15e2efb

Please sign in to comment.