retest non block with if then else

This commit is contained in:
Vu Tuan Minh
2025-04-10 12:43:08 +02:00
parent 28e0517f23
commit 754e12a9e5
4 changed files with 13 additions and 22 deletions

View File

@@ -102,21 +102,21 @@ public class Program{
}
}
public static record IfThenImp(Expression e, ArrayList<Instruction> i1) implements Instruction {
public static record IfThenImp(Expression e, Instruction i1) implements Instruction {
@Override
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
return v.visitIfThen(this, h);
}
}
public static record IfThenElseImp(Expression e, ArrayList<Instruction> i1, ArrayList<Instruction> i2) implements Instruction {
public static record IfThenElseImp(Expression e, Instruction i1, Instruction i2) implements Instruction {
@Override
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
return v.visitIfThenElse(this, h);
}
}
public static record WhileImp(Expression e, ArrayList<Instruction> i1) implements Instruction {
public static record WhileImp(Expression e, Instruction i1) implements Instruction {
@Override
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
return v.visitWhile(this, h);