| ... | ... | @@ -181,6 +181,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d |
| 181 | 181 | switch (comptime TI) { |
| 182 | 182 | .Bool => try doif(alloc, writer, body, bottom, data, ctx, opts, x), |
| 183 | 183 | .Optional => try docap(alloc, writer, body, bottom, data, ctx, opts, x), |
| 184 | .Int => try doif(alloc, writer, body, bottom, data, ctx, opts, x != 0), |
| 184 | 185 | else => @compileError(std.fmt.comptimePrint("pek: unable to use '{s}' in an #if block", .{@typeName(T)})), |
| 185 | 186 | } |
| 186 | 187 | }, |
| ... | ... | @@ -211,6 +212,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d |
| 211 | 212 | switch (comptime TI) { |
| 212 | 213 | .Bool => try doif(alloc, writer, body, bottom, data, ctx, opts, !x), |
| 213 | 214 | .Optional => try docap(alloc, writer, body, bottom, data, ctx, opts, !x), |
| 215 | .Int => try doif(alloc, writer, body, bottom, data, ctx, opts, x == 0), |
| 214 | 216 | else => @compileError(std.fmt.comptimePrint("pek: unable to use '{s}' in an #ifnot block", .{@typeName(T)})), |
| 215 | 217 | } |
| 216 | 218 | }, |