diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-12 19:50:14 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-12 19:50:14 -0400 |
commit | 11b46650941f54bf7b95648de04c897656b9867b (patch) | |
tree | ba91e63ad94530905439f7daf7f2e8281efe8ada /pc.y | |
parent | 6130381c23c2ca4e050e83b7a20e3ba56d0fc283 (diff) |
Fix setting type for multiple declared arrays
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -81,7 +81,7 @@ extern scope *cur_scope; %type <tval> proc_statement %type <tval> var -%type <ival> type +%type <tval> type %type <ival> standard_type %type <ival> TD @@ -131,11 +131,11 @@ var_declarations type :standard_type { - $$ = $1; + $$ = mktree($1, NULL, NULL); } |ARRAY '[' INUM DOTS INUM ']' OF standard_type { - $$ = ARRAY - $8; + $$ = mktree(ARRAY - $8, mkinum($3), mkinum($5)); } ; |