diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-06-23 17:26:10 +0200 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-06-23 17:26:10 +0200 |
| commit | 8794bca597b6c115a0c3b4b1e7a449c45dfeca1d (patch) | |
| tree | ab9bc9b7e56faf9d07a8897b39eecb948f3aebb1 /src/zisp/io/Encoder.zig | |
| parent | 257a051f05deaeb11ec0bc3fdc516620e80dccc6 (diff) | |
Decoder infra.
Diffstat (limited to 'src/zisp/io/Encoder.zig')
| -rw-r--r-- | src/zisp/io/Encoder.zig | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/zisp/io/Encoder.zig b/src/zisp/io/Encoder.zig index eb27e20..fb05e22 100644 --- a/src/zisp/io/Encoder.zig +++ b/src/zisp/io/Encoder.zig @@ -1 +1,23 @@ -// wip +const std = @import("std"); + +const Alloc = std.mem.Allocator; + +const io = @import("../io.zig"); +const value = @import("../value.zig"); + +const Value = value.Value; + +const Encoder = @This(); + +alloc: Alloc, + +pub fn init(alloc: Alloc) !Encoder { + return .{ .alloc = alloc }; +} + +pub fn encode(e: *Encoder, v: Value) !Value { + std.debug.print("encode: ", .{}); + try io.printStdout(v); + _ = e; + return v; +} |
