From 7ee9051a56ca0c04e6b60f53b9dfe47c75596496 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 27 May 2018 10:49:14 +0100 Subject: IR now builds with the new package system --- src/parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 7e3a79613..1a7ba68a3 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3831,7 +3831,6 @@ ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) { isize init_token_cap = cast(isize)gb_max(next_pow2(cast(i64)(file_size/2ll)), 16); array_init(&f->tokens, heap_allocator(), 0, gb_max(init_token_cap, 16)); - if (err == TokenizerInit_Empty) { Token token = {Token_EOF}; token.pos.file = fullpath; @@ -4166,6 +4165,9 @@ ParseFileError parse_imported_file(Parser *p, AstPackage *package, FileInfo *fi, AstFile *file = gb_alloc_item(heap_allocator(), AstFile); file->package = package; + p->file_index += 1; + file->id = p->file_index; + TokenPos err_pos = {0}; ParseFileError err = init_ast_file(file, fi->fullpath, &err_pos); -- cgit v1.2.3