authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-13 19:38:27 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-13 19:38:27 -07:00
log20cd84586cb6f62f15411d47e7e17ef65ef336a3
tree1eaa4a464a437073537125e4d88a03eacf31a56c
parentc767c52ebf1d9ef042e3f17febebbee3582a9339
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

use nprint as new replacement fallback


1 files changed, 1 insertions(+), 8 deletions(-)

src/lib.zig+1-8
......@@ -122,13 +122,6 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val
122122 try writer.print("{d}", .{x});
123123 return;
124124 }
125 if (comptime extras.hasFn("format")(TO)) {
126 return std.fmt.format(writer, "{}", .{x});
127 }
128 if (comptime extras.hasFn("toString")(TO)) {
129 try writer.writeAll(try x.toString(alloc));
130 return;
131 }
132125 if (comptime isArrayOf(u8)(TO)) {
133126 if (repl.raw) {
134127 try writer.writeAll(&x);
......@@ -145,7 +138,7 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val
145138 if (!opts.escaped) try writer.writeAll(s);
146139 return;
147140 }
148 @compileError(std.fmt.comptimePrint("pek: print {s}: unsupported type: {s}", .{ v, @typeName(TO) }));
141 return x.nprint(writer);
149142 },
150143 .block => |v| {
151144 const body = astgen.Value{ .body = v.body };