And other

This commit is contained in:
Adrien Bouvais 2025-01-11 18:03:36 +01:00
parent 90edb94f7a
commit 78213df3ff
3 changed files with 213 additions and 218 deletions

View File

@ -26,7 +26,7 @@ const State = enum {
add_struct,
};
pub const Parser = struct {
pub const Parser = @This();
toker: *Toker,
allocator: Allocator,
@ -37,8 +37,6 @@ pub const Parser = struct {
};
}
// Rename something better and move it somewhere else
pub fn parse(self: *Parser, struct_array: *std.ArrayList(SchemaStruct)) !void {
var state: State = .expect_struct_name_OR_end;
var keep_next = false;
@ -240,6 +238,3 @@ pub const Parser = struct {
else => unreachable,
};
}
};
// TODO: Some test, weird that there isn't any yet

View File

@ -55,7 +55,8 @@ pub const ThreadSyncContext = struct {
}
};
pub const ThreadEngine = struct {
pub const ThreadEngine = @This();
thread_arena: *std.heap.ThreadSafeAllocator,
thread_pool: *Pool,
@ -78,4 +79,3 @@ pub const ThreadEngine = struct {
pub fn deinit(_: ThreadEngine) void {
thread_pool.deinit();
}
};

View File

@ -1,4 +1,4 @@
pub const Loc = struct {
pub const Loc = @This();
start: usize,
end: usize,
};