From 68c4f617edc2afd4f9b201b6b67248d6cb80e69d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 14 Jan 2016 15:27:42 -0700 Subject: fix next_node_index on wrong struct no more nondeterministic error messages closes #65 --- src/codegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 4d52dd2d2e..b6736a4475 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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); -- cgit v1.2.3