blocks en cours

This commit is contained in:
trochas
2025-04-10 12:04:42 +02:00
8 changed files with 144 additions and 42 deletions

View File

@@ -93,6 +93,18 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImpl>
return result;
}
@Override
public ArrayList<InstructionLLVM> visitBloc(BlocImp instr, SymTable h) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'visitBloc'");
}
@Override
public ArrayList<InstructionLLVM> visitBlocDec(BlocDecImp instr, SymTable h) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'visitBlocDec'");
}
@Override
public ArrayList<InstructionLLVM> visitAssign(AssignImp instr, SymTable h) {
InstrAndVal res = instr.e().accept(this,h);
@@ -132,11 +144,10 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImpl>
throw new UnsupportedOperationException("Unimplemented method 'visitIfThenElse'");
}
@Override
public ArrayList<InstructionLLVM> visitWhile(WhileImp instr, SymTable h) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'visitWhile'");
ArrayList<InstructionLLVM> l = new ArrayList<>();
return l;
}
//EXPRESSION
@@ -149,7 +160,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImpl>
@Override
public InstrAndVal visitVar(VarImp e, SymTable h) {
ValLLVM val = new VarLLVMImpl(new IntLLVMImpl(), h.getVar(e.name()));
ValLLVM val = new VarLLVMImpl(new IntLLVMImpl(), e.name());
return new InstrAndVal(new ArrayList<>(), val);
}