From e9ae811ffaa08caef0acca643ca1e7a1ff72396f Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sat, 27 Jul 2019 12:40:16 -0400 Subject: Add update types during declaration --- pc.y | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pc.y') diff --git a/pc.y b/pc.y index 495f64a..050aedc 100644 --- a/pc.y +++ b/pc.y @@ -2,6 +2,7 @@ #include #include +#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*/ ; -- cgit v1.1