| author | |
| committer | |
| log | 56919ce43dcc3ecee22eb7d51e90dcef0ce7f4bb |
| tree | 4e0e903296558f691407113d70a1f4b4006f1185 |
| parent | aaef4127e180916d1466e6598b616818a751a14c |
1 files changed, 4 insertions(+), 0 deletions(-)
src/lib.zig+4| ... | ... | @@ -88,6 +88,10 @@ fn do(alloc: *std.mem.Allocator, writer: anytype, comptime value: astgen.Value, |
| 88 | 88 | try writer.print("{d}", .{x}); |
| 89 | 89 | return; |
| 90 | 90 | } |
| 91 | if (comptime std.meta.trait.hasFn("toString")(TO)) { | |
| 92 | try writer.writeAll(try x.toString(alloc)); | |
| 93 | return; | |
| 94 | } | |
| 91 | 95 | @compileError("pek: print: unsupported type: " ++ @typeName(TO)); |
| 92 | 96 | }, |
| 93 | 97 | .block => |v| { |