diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 07:39:30 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 07:39:30 -0400 |
commit | 85994d17bb296c2041ac1eee03fc83087118a4fb (patch) | |
tree | cfc6fea38fb6f3189b5c728b30d7d94e25f2282b | |
parent | 7786d06f1866aadcbd3a077b6f1408fd2728a0bd (diff) |
Fix func/proc calls with 0 args parse correctly
-rw-r--r-- | pc.y | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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); |