test unimplant

This commit is contained in:
Vu Tuan Minh
2025-04-10 10:56:11 +02:00
parent ecdb8ac687
commit 48763ff76e
8 changed files with 62 additions and 24 deletions

View File

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