aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-25 09:46:30 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-25 09:46:30 +0100
commita80872b60d730d76c4253e7c27eb735dfd13e635 (patch)
treeba27c107ed092a2184bdd751190fb5ba9f2bd7c9 /src/parser.c
parent822bb51b55bc62f9d406db80e9d5a71d3a300a19 (diff)
Fix checking if a procedure terminates for `for` loops.
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c
index 277d4069c..962a04afd 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -17,6 +17,8 @@ typedef enum ParseFileError {
typedef Array(AstNode *) AstNodeArray;
+gb_global i32 global_file_id = 0;
+
typedef struct AstFile {
i32 id;
gbArena arena;
@@ -3639,6 +3641,7 @@ ParseFileError init_ast_file(AstFile *f, String fullpath) {
gb_arena_init_from_allocator(&f->arena, heap_allocator(), arena_size);
f->curr_proc = NULL;
+ f->id = ++global_file_id;
return ParseFile_None;
}