| ... | @@ -158,8 +158,7 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val | ... | @@ -158,8 +158,7 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val |
| 158 | 1 => { | 158 | 1 => { |
| 159 | for (x) |item| { | 159 | for (x) |item| { |
| 160 | if (@hasField(@TypeOf(ctx), "this")) { | 160 | if (@hasField(@TypeOf(ctx), "this")) { |
| 161 | // handle nested loops, should be temporary | 161 | try do(alloc, writer, body, null, extras.join(.{ extras.omit(ctx, "this"), .{ .@"^this" = ctx.this, .this = item } }), opts); |
| 162 | try do(alloc, writer, body, null, extras.join(.{ extras.omit(ctx, "this"), .{ .this = item } }), opts); | | |
| 163 | } else { | 162 | } else { |
| 164 | try do(alloc, writer, body, null, extras.join(.{ ctx, .{ .this = item } }), opts); | 163 | try do(alloc, writer, body, null, extras.join(.{ ctx, .{ .this = item } }), opts); |
| 165 | } | 164 | } |