And other
This commit is contained in:
parent
90edb94f7a
commit
78213df3ff
@ -26,7 +26,7 @@ const State = enum {
|
|||||||
add_struct,
|
add_struct,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Parser = struct {
|
pub const Parser = @This();
|
||||||
toker: *Toker,
|
toker: *Toker,
|
||||||
allocator: Allocator,
|
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 {
|
pub fn parse(self: *Parser, struct_array: *std.ArrayList(SchemaStruct)) !void {
|
||||||
var state: State = .expect_struct_name_OR_end;
|
var state: State = .expect_struct_name_OR_end;
|
||||||
var keep_next = false;
|
var keep_next = false;
|
||||||
@ -240,6 +238,3 @@ pub const Parser = struct {
|
|||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: Some test, weird that there isn't any yet
|
|
||||||
|
@ -55,7 +55,8 @@ pub const ThreadSyncContext = struct {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ThreadEngine = struct {
|
pub const ThreadEngine = @This();
|
||||||
|
|
||||||
thread_arena: *std.heap.ThreadSafeAllocator,
|
thread_arena: *std.heap.ThreadSafeAllocator,
|
||||||
thread_pool: *Pool,
|
thread_pool: *Pool,
|
||||||
|
|
||||||
@ -78,4 +79,3 @@ pub const ThreadEngine = struct {
|
|||||||
pub fn deinit(_: ThreadEngine) void {
|
pub fn deinit(_: ThreadEngine) void {
|
||||||
thread_pool.deinit();
|
thread_pool.deinit();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pub const Loc = struct {
|
pub const Loc = @This();
|
||||||
|
|
||||||
start: usize,
|
start: usize,
|
||||||
end: usize,
|
end: usize,
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user