aboutsummaryrefslogtreecommitdiff
path: root/src/scope.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-02-18 23:05:50 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-02-18 23:05:50 +0200
commitb8eb76ef8efb2b000cb53d4d92d0c0df509cbdb8 (patch)
treee928c8b6a4117cc5d683f27350866b54d26aba12 /src/scope.c
parentc62ce7a940a4d90e2b7bd8699bdfdb79f0331507 (diff)
downloadek-b8eb76ef8efb2b000cb53d4d92d0c0df509cbdb8.tar.gz
ek-b8eb76ef8efb2b000cb53d4d92d0c0df509cbdb8.zip
implement some basic generic features
Diffstat (limited to 'src/scope.c')
-rw-r--r--src/scope.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scope.c b/src/scope.c
index b5729cd..48d3bc5 100644
--- a/src/scope.c
+++ b/src/scope.c
@@ -54,6 +54,8 @@ void destroy_scope(struct scope *scope)
}
destroy_visible(scope, scope->vars);
+ destroy_visible(scope, scope->procs);
+ destroy_visible(scope, scope->macros);
destroy_visible(scope, scope->types);
struct scope *prev = scope->children, *cur;
@@ -204,6 +206,7 @@ int scope_add_proc(struct scope *scope, struct ast_node *proc)
semantic_info(scope->fctx, exists, "previously here");
return -1;
}
+
/* always add to scope, do resolve checking later */
create_proc(scope, AST_PROC(proc).id, proc);
if (scope->parent &&