aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-08 23:56:16 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-08 23:56:16 -0400
commit2aa793357f8e18d666d781a5ef99e2b3159b5a86 (patch)
treea131a63767f072eacf69d55c17f0b9295ab43558
parent04c1c13e0c6de1bebc6a8311c00cdfb72d1053b9 (diff)
Fix change tree type when parsing func/proc for clarity
-rw-r--r--pc.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/pc.y b/pc.y
index 3753cdf..9c942bd 100644
--- a/pc.y
+++ b/pc.y
@@ -193,7 +193,7 @@ sub_prog_declaration
char *name = $1->l->attr.nval->name;
$1->l->attr.nval = NULL;
- if ($1->type == FCALL)
+ if ($1->type == FUNC)
check_func_return($4, name);
free_tree($1);
@@ -249,7 +249,7 @@ sub_prog_head
cur_scope->ret_var = mknode($2);
cur_scope->ret_var->var_type = $5;
- $$ = mktree(FCALL, mkid(tmp), NULL);
+ $$ = mktree(FUNC, mkid(tmp), NULL);
}
|PROC ID arguments ';'
@@ -272,7 +272,7 @@ sub_prog_head
assert(!set_func_types($3, tmp->func_info->argv, i));
free_tree($3);
- $$ = mktree(PCALL, mkid(tmp), NULL);
+ $$ = mktree(PROC, mkid(tmp), NULL);
}
;