LLVM + interface visitor
This commit is contained in:
@@ -2,15 +2,10 @@ package TP2.asd;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import org.antlr.grammar.v3.ANTLRParser.defaultNodeOption_return;
|
||||
|
||||
import TP2.asd.Interface.*;
|
||||
import TP2.llvm.ProgramLLVM.*;
|
||||
import TP2.llvm.Interface.*;
|
||||
|
||||
|
||||
|
||||
public class Program{
|
||||
|
||||
static String INDENT = " ";
|
||||
@@ -35,10 +30,10 @@ public class Program{
|
||||
for(int i = 0; i<fonctions.size(); i++){
|
||||
fonctionLLVM.add(fonctions.get(i).toLLVM());
|
||||
}
|
||||
return new ProgramLLVMImpl(0,new ArrayList<>(),fonctionLLVM);
|
||||
return new ProgramLLVMImpl(new ArrayList<>(),fonctionLLVM);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static record FunctionImp(Type type, String nom, ArrayList<Instruction> instructions)implements Function {
|
||||
@@ -65,7 +60,8 @@ public class Program{
|
||||
for(int i = 0; i<instructions.size(); i++){
|
||||
instrLLVM.add(instructions.get(i).toLLVM());
|
||||
}
|
||||
return new DefineLLVMImpl(nom, 32, instrLLVM);
|
||||
//return new DefineLLVMImpl(nom, "int", instrLLVM);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user