aboutsummaryrefslogtreecommitdiff
path: root/pc.y
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-12 19:50:14 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-12 19:50:14 -0400
commit11b46650941f54bf7b95648de04c897656b9867b (patch)
treeba91e63ad94530905439f7daf7f2e8281efe8ada /pc.y
parent6130381c23c2ca4e050e83b7a20e3ba56d0fc283 (diff)
Fix setting type for multiple declared arrays
Diffstat (limited to 'pc.y')
-rw-r--r--pc.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/pc.y b/pc.y
index c144043..26d766f 100644
--- a/pc.y
+++ b/pc.y
@@ -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));
}
;