aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/parser.c b/src/parser.c
index 03b835e..85165d7 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -30,31 +30,6 @@ static void parser_parse_var_type(Parser *self, VariableType *result);
static void parser_parse_var_type_def(Parser *self, VariableType *result);
static void parser_queue_file(Parser *self, BufferView path, FileScopeReference **file_scope);
-int parser_thread_data_init(ParserThreadData *self) {
- am_memset(&self->allocator, 0, sizeof(self->allocator));
- am_memset(&self->thread, 0, sizeof(self->thread));
- self->status = PARSER_THREAD_STATUS_NEW;
- return arena_allocator_init(&self->allocator);
-}
-
-void parser_thread_data_deinit(ParserThreadData *self) {
- ignore_result_int(amal_thread_deinit(&self->thread));
- arena_allocator_deinit(&self->allocator);
-}
-
-int parser_thread_data_start(ParserThreadData *self, AmalThreadCallbackFunc callback_func, void *userdata) {
- return_if_error(amal_thread_deinit(&self->thread));
- return_if_error(amal_thread_create(&self->thread, AMAL_THREAD_JOINABLE, "Parser", callback_func, userdata));
- self->status = PARSER_THREAD_STATUS_RUNNING;
- return 0;
-}
-
-int parser_thread_data_join(ParserThreadData *self, void **result) {
- if(self->status == PARSER_THREAD_STATUS_NEW)
- return 0;
- return amal_thread_join(&self->thread, result);
-}
-
int parser_init(Parser *self, amal_compiler *compiler, ArenaAllocator *allocator) {
self->allocator = allocator;
self->compiler = compiler;