From 20cd84586cb6f62f15411d47e7e17ef65ef336a3 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 13 Mar 2026 19:38:27 -0700 Subject: [PATCH] use nprint as new replacement fallback --- src/lib.zig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lib.zig b/src/lib.zig index 92afa4c85e79b5cd9c2fb8dac80426272d82ea82..2d36cc7ee9b4d04d475e55eb00e7aee61d6c3994 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -122,13 +122,6 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val try writer.print("{d}", .{x}); return; } - if (comptime extras.hasFn("format")(TO)) { - return std.fmt.format(writer, "{}", .{x}); - } - if (comptime extras.hasFn("toString")(TO)) { - try writer.writeAll(try x.toString(alloc)); - return; - } if (comptime isArrayOf(u8)(TO)) { if (repl.raw) { try writer.writeAll(&x); @@ -145,7 +138,7 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val if (!opts.escaped) try writer.writeAll(s); return; } - @compileError(std.fmt.comptimePrint("pek: print {s}: unsupported type: {s}", .{ v, @typeName(TO) })); + return x.nprint(writer); }, .block => |v| { const body = astgen.Value{ .body = v.body }; -- 2.54.0