From 85994d17bb296c2041ac1eee03fc83087118a4fb Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Wed, 9 Oct 2019 07:39:30 -0400 Subject: Fix func/proc calls with 0 args parse correctly --- pc.y | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pc.y b/pc.y index 1783ccd..ec7f1e5 100644 --- a/pc.y +++ b/pc.y @@ -444,6 +444,15 @@ proc_statement free($1); } + |ID '(' ')' + { + node *tmp; + + tmp = check_exists(cur_scope, $1); + $$ = mktree(PCALL, mkid(tmp), NULL); + + free($1); + } /*calls checked with proc_statement*/ ; @@ -519,6 +528,16 @@ factor free($1); } + | ID '(' ')' + { + node *tmp; + + tmp = check_exists(cur_scope, $1); + $$ = mktree(FCALL, mkid(tmp), NULL); + check_call($$); + + free($1); + } |INUM { $$ = mkinum($1); -- cgit v1.1