aboutsummaryrefslogtreecommitdiff
path: root/pc.y
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-30 23:19:04 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-30 23:28:25 -0400
commit59f7f4ccb71eb489690ada8821977455ab377699 (patch)
treee23b192f57e5bc836b733e5eea19637c9f700b19 /pc.y
parent6b3e004224ccba39199606f2683265c9e4606e43 (diff)
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.
Diffstat (limited to 'pc.y')
-rw-r--r--pc.y2
1 files changed, 1 insertions, 1 deletions
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;