Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/main/java/TP2/asd/toLLVM_Visitor.java
This commit is contained in:
Vu Tuan Minh
2025-04-29 14:06:55 +02:00

View File

@@ -251,9 +251,9 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
@Override
public ArrayList<InstructionLLVM> visitIfThen(IfThenImp instr, SymTable h) {
ArrayList<InstructionLLVM> l = new ArrayList<>();
String labelIf= "if"+h.getNewIdLabel();
String labelThen= "then"+h.getNewIdLabel();
String labelFin= "fi"+h.getNewIdLabel();
String labelIf= "if"+h.getNewIdLabel()+":";
String labelThen= "then"+h.getNewIdLabel()+":";
String labelFin= "fin"+h.getNewIdLabel();
l.add(new LabelLLVMImp(labelIf));
InstrAndVal temp = instr.e().accept(this,h);
@@ -316,8 +316,8 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
public ArrayList<InstructionLLVM> visitWhile(WhileImp instr, SymTable h) {
ArrayList<InstructionLLVM> l = new ArrayList<>();
String labelWhile = "while"+h.getNewIdLabel()+":";
String labelDo = "do"+h.getNewIdLabel()+":";
String labelWhile = "while"+h.getNewIdLabel();
String labelDo = "do"+h.getNewIdLabel();
String labelDone = "done"+h.getNewIdLabel();
l.add(new LabelLLVMImp(labelWhile));