diff options
Diffstat (limited to 'src/ast/nodes/AssignmentNode.java')
-rw-r--r-- | src/ast/nodes/AssignmentNode.java | 17 |
1 files 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; } |