summaryrefslogtreecommitdiff
path: root/src/libzisp/value.zig
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2025-03-28 21:14:12 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2025-03-28 21:14:12 +0100
commit5025f9acf31cd880bbff62ff47ed03b69a0025ee (patch)
tree866f9365ae87315b0d5e41a8fe27435b803ce706 /src/libzisp/value.zig
parent615e400ff150a3c355086664c7f9de512b5859dc (diff)
parent2cbfacaedcc77e28e0a0473045cac689fb43a8ef (diff)
Merge branch 'new-parser'
Diffstat (limited to 'src/libzisp/value.zig')
-rw-r--r--src/libzisp/value.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libzisp/value.zig b/src/libzisp/value.zig
index 2561ca7..fbe907a 100644
--- a/src/libzisp/value.zig
+++ b/src/libzisp/value.zig
@@ -285,6 +285,10 @@ pub const Value = packed union {
std.debug.dumpHex(std.mem.asBytes(&v));
}
+ pub fn eq(v1: Value, v2: Value) bool {
+ return v1.bits == v2.bits;
+ }
+
// The following aren't type predicates per se, but rather determine which
// general category the value is in. The exceptions are fixnum and double,
// since those aren't sub-categorized into further types.