From 81887e01edb04938bce6aa4f72adf5437e793fd6 Mon Sep 17 00:00:00 2001 From: 2wenty1ne Date: Wed, 6 Nov 2024 15:44:28 +0100 Subject: [PATCH] Added first structure: both needed types and init function header --- LList.zig | 35 +++++++++++++++++++++++++++++++++++ main.zig | 5 ----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 LList.zig delete mode 100644 main.zig diff --git a/LList.zig b/LList.zig new file mode 100644 index 0000000..56f55b2 --- /dev/null +++ b/LList.zig @@ -0,0 +1,35 @@ +const std = @import("std"); + +pub fn LLIst (comptime T: type) type { + return struct { + const Self = @This(); + + const _: T = undefined; + + pub fn init() void { + + } + + pub fn deinit() void { + + } + }; +} + +pub fn Node () type { + return struct { + comptime T: type = undefined, + const Self = @This(); + + const next: *Self = undefined; + //var value: T = undefined; + + pub fn init(this: *Self, comptime T: type) void { + this.T = T; + } + }; +} + +pub fn main() !void { + +} \ No newline at end of file diff --git a/main.zig b/main.zig deleted file mode 100644 index a1f225f..0000000 --- a/main.zig +++ /dev/null @@ -1,5 +0,0 @@ -const std = @import("std"); - -pub fn main() !void { - -} \ No newline at end of file