diff options
Diffstat (limited to 'include/parser.h')
-rw-r--r-- | include/parser.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/parser.h b/include/parser.h index 81895e1..ae5cfa6 100644 --- a/include/parser.h +++ b/include/parser.h @@ -4,7 +4,6 @@ #include "std/buffer_view.h" #include "std/arena_allocator.h" #include "std/thread.h" -#include "bytecode/bytecode.h" #include "tokenizer.h" #include "ast.h" #include "defs.h" @@ -36,7 +35,14 @@ struct Parser { TokenizerError error; ErrorContext error_context; jmp_buf parse_env; - Bytecode bytecode; + Bytecode *bytecode; + Buffer/*<ParserFileScopeReference*>*/ imports; + HashMapType(BufferView, usize) imports_by_name; /* The value is an index inside @imports */ + /* + Index in the compilers list of parsers. Used by bytecodes import header + to point to the index that contains references to another files variables. + */ + u32 index; }; CHECK_RESULT int parser_init(Parser *self, amal_compiler *compiler, ArenaAllocator *allocator); |