| ... | ... | @@ -101,6 +101,10 @@ fn do(alloc: *std.mem.Allocator, writer: anytype, comptime value: astgen.Value, |
| 101 | 101 | }, |
| 102 | 102 | .@"if" => { |
| 103 | 103 | comptime assertEqual(v.args.len, 1); |
| 104 | if (comptime std.meta.trait.isIndexable(T)) { |
| 105 | try doif(alloc, writer, body, bottom, data, ctx, indent, flag1, x.len > 0); |
| 106 | return; |
| 107 | } |
| 104 | 108 | switch (comptime TI) { |
| 105 | 109 | .Bool => try doif(alloc, writer, body, bottom, data, ctx, indent, flag1, x), |
| 106 | 110 | .Optional => try docap(alloc, writer, body, bottom, data, ctx, indent, flag1, x), |