diff options
Diffstat (limited to 'include/parser.h')
-rw-r--r-- | include/parser.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/parser.h b/include/parser.h index 491815f..bc205f0 100644 --- a/include/parser.h +++ b/include/parser.h @@ -4,6 +4,7 @@ #include "std/buffer_view.h" #include "std/scoped_allocator.h" #include "std/thread.h" +#include "bytecode/bytecode.h" #include "tokenizer.h" #include "ast.h" #include "defs.h" @@ -39,17 +40,19 @@ struct Parser { LhsExpr file_decl; Scope *current_scope; bool has_func_parent; - ScopedAllocator *allocator; /* borrowed. Copied from @compiler for faster access to allocator */ + /* Borrowed from @compiler for faster access to allocator. The allocator is thread-specific */ + ScopedAllocator *allocator; amal_compiler *compiler; Ssa *ssa; bool started; TokenizerError error; ErrorContext error_context; jmp_buf parse_env; + Bytecode bytecode; }; CHECK_RESULT int parser_thread_data_init(ParserThreadData *self); -CHECK_RESULT int parser_thread_data_deinit(ParserThreadData *self); +void parser_thread_data_deinit(ParserThreadData *self); CHECK_RESULT int parser_thread_data_start(ParserThreadData *self, AmalThreadCallbackFunc callback_func, void *userdata); CHECK_RESULT int parser_thread_data_join(ParserThreadData *self, void **result); |