summaryrefslogtreecommitdiff
path: root/src/zisp/io/Encoder.zig
blob: fb05e225cac78e5b683b63889c0a35d3b528fd5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 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;
}