From 4516c901ccbabfba9115c87237996dc9acdc7590 Mon Sep 17 00:00:00 2001 From: geno Date: Thu, 27 Jun 2024 20:58:29 +0200 Subject: fix additional useless errors --- src/ast/nodes/AssignmentNode.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ast/nodes/AssignmentNode.java b/src/ast/nodes/AssignmentNode.java index 07966c3..35c47b3 100644 --- a/src/ast/nodes/AssignmentNode.java +++ b/src/ast/nodes/AssignmentNode.java @@ -31,15 +31,16 @@ public class AssignmentNode implements Node { int lsize = lhr.getSize(); int rsize = rhr.getSize(); - if (lsize == rsize) { - for (int i = 0; i < lsize; i++) { - ExprNode latom = (ExprNode) lhr.getElem(i); - ExprNode ratom = (ExprNode) rhr.getElem(i); - ST.insert(latom.getId(), ratom.typeCheck(), _nesting, ""); - } - } else { - errors.add(new SemanticError("ValueError: different size of left or right side assignment")); + // if (lsize == rsize) { + for (int i = 0; i < lsize; i++) { + ExprNode latom = (ExprNode) lhr.getElem(i); + ST.insert(latom.getId(), new AtomType(), _nesting, ""); + // ExprNode ratom = (ExprNode) rhr.getElem(i); } + // } else { + // FIX: sgravata da piĆ¹ problemi che altro + // errors.add(new SemanticError("ValueError: different size of left or right side assignment")); + // } return errors; } -- cgit v1.2.3-18-g5258