summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2025-03-27 21:18:09 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2025-03-27 21:18:09 +0100
commitf2b18d64448ab09dd5e5e6a180d38d90d5aaf367 (patch)
treed83510fc892bf31feed56688af3ec350012cdeb9 /src/main.zig
parent91629014bfe50e1d45cffedd618ab28a063f7689 (diff)
new parser
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig
index c9a5404..24c7959 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1,11 +1,6 @@
-//! By convention, main.zig is where your main function lives in the case that
-//! you are building an executable. If you are making a library, the convention
-//! is to delete this file and start with root.zig instead.
-
const std = @import("std");
-/// This imports the separate module containing `root.zig`. Take a look in `build.zig` for details.
-const zisp = @import("zisp_lib");
+const zisp = @import("libzisp");
pub fn main() !void {
const T = extern union {
@@ -33,6 +28,19 @@ pub fn main() !void {
x.*.double = f1.* / f2.*;
std.debug.print("-0/0: {x}\n", .{x.*.bits});
+ for (0..1000000) |i| {
+ _ = i;
+ const p = zisp.value.pair.cons(
+ zisp.value.fixnum.pack(0),
+ zisp.value.fixnum.pack(1),
+ );
+ std.mem.doNotOptimizeAway(p);
+ // std.debug.print("fx: {}\n", .{zisp.value.pair.car(p)});
+ }
+
+ const istr = zisp.value.istr.intern("foo", false);
+ std.debug.print("istr: {s}\n", .{zisp.value.istr.getHeader(istr).bytes()});
+
// // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
// std.debug.print("All your {s} are belong to us.\n", .{"codebase"});