aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-07-28 19:50:59 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-07-28 19:50:59 -0400
commita7d28593769b094d52407c92b8e5554a3e9cd178 (patch)
tree964dfcb4bcf3ba16204f2ceb7676e6a1a573a2f5
parentf4d98d609e09ae172dbcccff742cc654d8b51a52 (diff)
Add pop scope
-rw-r--r--pc.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/pc.y b/pc.y
index dc6a05b..f00d4fe 100644
--- a/pc.y
+++ b/pc.y
@@ -159,6 +159,7 @@ sub_prog_declaration
sub_prog_declarations
compound_statement
{
+ pop_scope(&cur_scope);
}
;
@@ -171,7 +172,6 @@ sub_prog_head
cur_scope->ret_var = scope_insert(cur_scope, $2);
cur_scope->ret_var->var_type = $5;
-
}
|PROC ID arguments ';'
{