From 59f7f4ccb71eb489690ada8821977455ab377699 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Mon, 30 Sep 2019 23:19:04 -0400 Subject: Fix search now uses scope->ret_var Allows for the scope to contain the function without having to worry about multiple nodes with the same name. --- pc.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pc.y') diff --git a/pc.y b/pc.y index 32be027..72ac10b 100644 --- a/pc.y +++ b/pc.y @@ -222,7 +222,7 @@ sub_prog_head /* Need to duplicate ID.name so it is not freed with inner * scope*/ - cur_scope->ret_var = scope_insert(cur_scope, strdup($2)); + cur_scope->ret_var = mknode(strdup($2)); cur_scope->ret_var->var_type = $5; $$ = $2; -- cgit v1.1