diff --git a/src/root.zig b/src/root.zig index 27d2be8..4ea96eb 100644 --- a/src/root.zig +++ b/src/root.zig @@ -1,13 +1,23 @@ -//! By convention, root.zig is the root source file when making a library. If -//! you are making an executable, the convention is to delete this file and -//! start with main.zig instead. const std = @import("std"); -const testing = std.testing; -pub export fn add(a: i32, b: i32) i32 { - return a + b; -} +const Raw = union(enum) { + string: []u8, + binary: []u8, +}; -test "basic add functionality" { - try testing.expect(add(3, 7) == 10); +const Object = union(enum) { + nil, + bool: bool, + integer: i64, + float: f64, + raw: Raw, + array: []Object, + map: []struct { key: Object, value: Object }, + extension: struct { type: u8, bytes: []u8 }, +}; + +test { + const o: Object = .nil; + + _ = o; }