authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-13 23:08:52 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-13 23:08:52 -07:00
logbd42c8bd18acf1e5548140e7e1002fd3861b045d
tree59a8e4e8bb66ef6d1fa811e408938e660181132d
parentd0308658232e7dc51983a870949ba0777fd8b501

allow runtime data in `#each` helper with regular `for`


1 files changed, 1 insertions(+), 1 deletions(-)

src/lib.zig+1-1
...@@ -88,7 +88,7 @@ fn do(writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype...@@ -88,7 +88,7 @@ fn do(writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype
88 .each => {88 .each => {
89 comptime assertEqual(v.args.len, 1);89 comptime assertEqual(v.args.len, 1);
90 const x = search(v.args[0], data);90 const x = search(v.args[0], data);
91 inline for (x) |item| try do(writer, body, item, ctx, indent, flag1);91 for (x) |item| try do(writer, body, item, ctx, indent, flag1);
92 },92 },
93 .@"if" => {93 .@"if" => {
94 comptime assertEqual(v.args.len, 1);94 comptime assertEqual(v.args.len, 1);