From 2aa793357f8e18d666d781a5ef99e2b3159b5a86 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Tue, 8 Oct 2019 23:56:16 -0400 Subject: Fix change tree type when parsing func/proc for clarity --- pc.y | 6 +++--- 1 file 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); } ; -- cgit v1.1