correction de certain nom de label qui tonenait un ':'
This commit is contained in:
@@ -250,8 +250,8 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
|||||||
@Override
|
@Override
|
||||||
public ArrayList<InstructionLLVM> visitIfThen(IfThenImp instr, SymTable h) {
|
public ArrayList<InstructionLLVM> visitIfThen(IfThenImp instr, SymTable h) {
|
||||||
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
||||||
String labelIf= "if"+h.getNewIdLabel()+":";
|
String labelIf= "if"+h.getNewIdLabel();
|
||||||
String labelThen= "then"+h.getNewIdLabel()+":";
|
String labelThen= "then"+h.getNewIdLabel();
|
||||||
String labelFin= "fin"+h.getNewIdLabel();
|
String labelFin= "fin"+h.getNewIdLabel();
|
||||||
|
|
||||||
l.add(new LabelLLVMImp(labelIf));
|
l.add(new LabelLLVMImp(labelIf));
|
||||||
@@ -278,9 +278,9 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
|||||||
@Override
|
@Override
|
||||||
public ArrayList<InstructionLLVM> visitIfThenElse(IfThenElseImp instr, SymTable h) {
|
public ArrayList<InstructionLLVM> visitIfThenElse(IfThenElseImp instr, SymTable h) {
|
||||||
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
||||||
String labelIf= "if"+h.getNewIdLabel()+":";
|
String labelIf= "if"+h.getNewIdLabel();
|
||||||
String labelThen= "then"+h.getNewIdLabel()+":";
|
String labelThen= "then"+h.getNewIdLabel();
|
||||||
String labelElse= "else"+h.getNewIdLabel()+":";
|
String labelElse= "else"+h.getNewIdLabel();
|
||||||
String labelFin= "fin"+h.getNewIdLabel();
|
String labelFin= "fin"+h.getNewIdLabel();
|
||||||
|
|
||||||
l.add(new LabelLLVMImp(labelIf));
|
l.add(new LabelLLVMImp(labelIf));
|
||||||
@@ -312,8 +312,8 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
|||||||
public ArrayList<InstructionLLVM> visitWhile(WhileImp instr, SymTable h) {
|
public ArrayList<InstructionLLVM> visitWhile(WhileImp instr, SymTable h) {
|
||||||
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
ArrayList<InstructionLLVM> l = new ArrayList<>();
|
||||||
|
|
||||||
String labelWhile = "while"+h.getNewIdLabel()+":";
|
String labelWhile = "while"+h.getNewIdLabel();
|
||||||
String labelDo = "do"+h.getNewIdLabel()+":";
|
String labelDo = "do"+h.getNewIdLabel();
|
||||||
String labelDone = "done"+h.getNewIdLabel();
|
String labelDone = "done"+h.getNewIdLabel();
|
||||||
|
|
||||||
l.add(new LabelLLVMImp(labelWhile));
|
l.add(new LabelLLVMImp(labelWhile));
|
||||||
|
|||||||
Reference in New Issue
Block a user