add check type
This commit is contained in:
@@ -7,7 +7,7 @@ import TP2.llvm.ProgramLLVM.*;
|
||||
public class Program{
|
||||
|
||||
//Prog
|
||||
public static record ProgramImp(ArrayList<Function> fonctions) implements ProgramI{
|
||||
public static record ProgramImp(ArrayList<Function> fonctions,ArrayList<Prototype> protos) implements ProgramI{
|
||||
public <H, S> S accept(ProgramVisitor<H, S> v, H h) {
|
||||
return v.visitProgram(this, h);
|
||||
}
|
||||
@@ -23,6 +23,15 @@ public class Program{
|
||||
return this.accept(llvmVisitor,new SymTable());
|
||||
}
|
||||
}
|
||||
|
||||
//Prototype
|
||||
public static record PrototypeImp(Type type, String nom, ArrayList<String> s) implements Prototype{
|
||||
@Override
|
||||
public <H, S> S accept(PrototypeVisitor<H, S> v, H h) {
|
||||
return v.visitPrototype(this,h);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Fonction
|
||||
public static record FunctionImp(Type type, String nom, Instruction instruction)implements Function {
|
||||
|
||||
Reference in New Issue
Block a user