diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 12:40:16 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 12:40:16 -0400 |
commit | e9ae811ffaa08caef0acca643ca1e7a1ff72396f (patch) | |
tree | d43fd26e134f91e3814f48506234396fbc199453 /pc.y | |
parent | 596bc33348e2daa5af8a0168f015e850aeccf0fc (diff) |
Add update types during declaration
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -2,6 +2,7 @@ #include <stdlib.h> #include <stddef.h> +#include "node.h" #include "tree.h" #include "y.tab.h" #include "pc.h" @@ -108,10 +109,7 @@ id_list var_declarations :var_declarations VAR id_list ':' type ';' { - ptree *tmp; - for(tmp = $3; tmp; tmp = tmp->l) { - tmp->type = $5; - } + update_type_info($3, $5); } |/*empty*/ ; |