summaryrefslogtreecommitdiff
path: root/src/zisp/io/Decoder.zig
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2026-06-23 17:26:10 +0200
committerTaylan Kammer <taylan.kammer@gmail.com>2026-06-23 17:26:10 +0200
commit8794bca597b6c115a0c3b4b1e7a449c45dfeca1d (patch)
treeab9bc9b7e56faf9d07a8897b39eecb948f3aebb1 /src/zisp/io/Decoder.zig
parent257a051f05deaeb11ec0bc3fdc516620e80dccc6 (diff)
Decoder infra.
Diffstat (limited to 'src/zisp/io/Decoder.zig')
-rw-r--r--src/zisp/io/Decoder.zig22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/zisp/io/Decoder.zig b/src/zisp/io/Decoder.zig
index 95a0b68..ac39a02 100644
--- a/src/zisp/io/Decoder.zig
+++ b/src/zisp/io/Decoder.zig
@@ -1 +1,23 @@
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 {
+ std.debug.print("decode: ", .{});
+ try io.printStdout(v);
+ _ = d;
+ return v;
+}