| ... | @@ -236,6 +236,9 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val | ... | @@ -236,6 +236,9 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val |
| 236 | if (@typeInfo(@TypeOf(x)) == .@"enum" and comptime extras.isZigString(@TypeOf(y))) { | 236 | if (@typeInfo(@TypeOf(x)) == .@"enum" and comptime extras.isZigString(@TypeOf(y))) { |
| 237 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, @tagName(x), y)); | 237 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, @tagName(x), y)); |
| 238 | } | 238 | } |
| | 239 | if (TI == .@"enum" and @typeInfo(@TypeOf(y)) == .int) { |
| | 240 | return doif(alloc, writer, body, bottom, data, ctx, opts, @intFromEnum(x) == y); |
| | 241 | } |
| 239 | if (comptime extras.isSlice(@TypeOf(x, y))) { | 242 | if (comptime extras.isSlice(@TypeOf(x, y))) { |
| 240 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, x, y)); | 243 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, x, y)); |
| 241 | } | 244 | } |
| ... | @@ -250,6 +253,9 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val | ... | @@ -250,6 +253,9 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val |
| 250 | if (@typeInfo(@TypeOf(x)) == .@"enum" and comptime extras.isZigString(@TypeOf(y))) { | 253 | if (@typeInfo(@TypeOf(x)) == .@"enum" and comptime extras.isZigString(@TypeOf(y))) { |
| 251 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, @tagName(x), y)); | 254 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, @tagName(x), y)); |
| 252 | } | 255 | } |
| | 256 | if (TI == .@"enum" and @typeInfo(@TypeOf(y)) == .int) { |
| | 257 | return doif(alloc, writer, body, bottom, data, ctx, opts, @intFromEnum(x) != y); |
| | 258 | } |
| 253 | if (comptime extras.isSlice(@TypeOf(x, y))) { | 259 | if (comptime extras.isSlice(@TypeOf(x, y))) { |
| 254 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, x, y)); | 260 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, x, y)); |
| 255 | } | 261 | } |