fix next_node_index on wrong struct

no more nondeterministic error messages

closes #65
This commit is contained in:
Andrew Kelley
2016-01-14 15:27:42 -07:00
parent 1645fa681f
commit 68c4f617ed
4 changed files with 12 additions and 6 deletions

View File

@@ -2658,7 +2658,8 @@ static ImportTableEntry *codegen_add_code(CodeGen *g, Buf *abs_full_path,
import_entry->path = full_path;
import_entry->fn_table.init(32);
import_entry->root = ast_parse(source_code, tokenization.tokens, import_entry, g->err_color);
import_entry->root = ast_parse(source_code, tokenization.tokens, import_entry, g->err_color,
&g->next_node_index);
assert(import_entry->root);
if (g->verbose) {
ast_print(import_entry->root, 0);