| ... | @@ -170,6 +170,9 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V | ... | @@ -170,6 +170,9 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V |
| 170 | if (@typeInfo(@TypeOf(x)) == .Enum and comptime std.meta.trait.isZigString(@TypeOf(y))) { | 170 | if (@typeInfo(@TypeOf(x)) == .Enum and comptime std.meta.trait.isZigString(@TypeOf(y))) { |
| 171 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, @tagName(x), y)); | 171 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, @tagName(x), y)); |
| 172 | } | 172 | } |
| | 173 | if (comptime std.meta.trait.isSlice(@TypeOf(x, y))) { |
| | 174 | return try doif(alloc, writer, body, bottom, data, ctx, opts, std.mem.eql(u8, x, y)); |
| | 175 | } |
| 173 | try doif(alloc, writer, body, bottom, data, ctx, opts, x == y); | 176 | try doif(alloc, writer, body, bottom, data, ctx, opts, x == y); |
| 174 | }, | 177 | }, |
| 175 | .ifnotequal => { | 178 | .ifnotequal => { |
| ... | @@ -178,6 +181,9 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V | ... | @@ -178,6 +181,9 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V |
| 178 | if (@typeInfo(@TypeOf(x)) == .Enum and comptime std.meta.trait.isZigString(@TypeOf(y))) { | 181 | if (@typeInfo(@TypeOf(x)) == .Enum and comptime std.meta.trait.isZigString(@TypeOf(y))) { |
| 179 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, @tagName(x), y)); | 182 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, @tagName(x), y)); |
| 180 | } | 183 | } |
| | 184 | if (comptime std.meta.trait.isSlice(@TypeOf(x, y))) { |
| | 185 | return try doif(alloc, writer, body, bottom, data, ctx, opts, !std.mem.eql(u8, x, y)); |
| | 186 | } |
| 181 | try doif(alloc, writer, body, bottom, data, ctx, opts, x != y); | 187 | try doif(alloc, writer, body, bottom, data, ctx, opts, x != y); |
| 182 | }, | 188 | }, |
| 183 | } | 189 | } |