From ba41bb5deb5c1be0c5ddcb0792406ac7cb615dfb Mon Sep 17 00:00:00 2001 From: geno Date: Sun, 14 Jul 2024 18:33:24 +0200 Subject: [PATCH] test updated --- src/ast/Python3VisitorImpl.java | 3 --- test/2a.py | 2 +- test/2c.py | 6 +++--- test/2d.py | 1 + 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/ast/Python3VisitorImpl.java b/src/ast/Python3VisitorImpl.java index e0111f7..aa03682 100644 --- a/src/ast/Python3VisitorImpl.java +++ b/src/ast/Python3VisitorImpl.java @@ -4,13 +4,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.AbstractMap.SimpleEntry; import ast.nodes.*; import ast.types.*; import codegen.Label; -import java.lang.reflect.Array; -import java.security.interfaces.EdECKey; import parser.Python3Lexer; import parser.Python3ParserBaseVisitor; import parser.Python3Parser.*; diff --git a/test/2a.py b/test/2a.py index bf7648f..f45041a 100644 --- a/test/2a.py +++ b/test/2a.py @@ -6,7 +6,7 @@ m = m * tmp n = n - 1 c = 0 -for i in m: +for i in range(m): g = 2 * m c = c + i + g print(m + c) diff --git a/test/2c.py b/test/2c.py index cabe8be..459cf8c 100644 --- a/test/2c.py +++ b/test/2c.py @@ -3,10 +3,10 @@ y = 7 c = 0 m = 1 -while n > 1: - tmp = 2 * x + n +while y > 1: + tmp = 2 * x + y m = m * tmp - n = n - 1 + y = y - 1 for i in n: g = 2 * m + i c = c + i + g diff --git a/test/2d.py b/test/2d.py index 71df91b..a418aab 100644 --- a/test/2d.py +++ b/test/2d.py @@ -6,6 +6,7 @@ c = y * n + g y = y - 1 +y = 5 for i in range(y): g = 2 * y c = c + i + g