blob: f9d99e04e5fd3c177bf3707f8c2d3eda21e2d686 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
const builtin = @import("builtin");
const std = @import("std");
const Alloc = std.mem.Allocator;
const io = @import("../io.zig");
const value = @import("../value.zig");
const Value = value.Value;
const Decoder = @This();
alloc: Alloc,
pub fn init(alloc: Alloc) !Decoder {
return .{ .alloc = alloc };
}
pub fn decodeInPlace(d: *Decoder, v: Value) !Value {
if (!builtin.is_test) {
std.debug.print("decode: ", .{});
io.printStdout(v) catch @panic("print error");
}
_ = d;
return v;
}
|