From b8eb76ef8efb2b000cb53d4d92d0c0df509cbdb8 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 18 Feb 2024 23:05:50 +0200 Subject: implement some basic generic features --- src/scope.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/scope.c') 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 && -- cgit v1.3