aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-09 07:39:30 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-09 07:39:30 -0400
commit85994d17bb296c2041ac1eee03fc83087118a4fb (patch)
treecfc6fea38fb6f3189b5c728b30d7d94e25f2282b
parent7786d06f1866aadcbd3a077b6f1408fd2728a0bd (diff)
Fix func/proc calls with 0 args parse correctly
-rw-r--r--pc.y19
1 files changed, 19 insertions, 0 deletions
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);