toLLVM en visitor, todo : réparer la Declaration

This commit is contained in:
Rochas
2025-04-05 20:11:52 +02:00
parent 3f0ca04b19
commit b9b609f1e2
6 changed files with 159 additions and 116 deletions

View File

@@ -23,7 +23,6 @@ public interface Interface{
//////////Function
public interface Function {
public <H,S> S accept(FunctionVisitor<H,S> v, H h);
public DefineLLVM toLLVM();
}
public interface FunctionVisitor<H,S> {
@@ -34,13 +33,12 @@ public interface Interface{
//////////Instruction
public interface Instruction {
public <H,S> S accept(InstrVisitor<H,S> v, H h);
public ArrayList<InstructionLLVM> toLLVM();
}
public interface InstrVisitor<H,S>{
public S visitReturn(Return_instrImp e, H h);
public S visitAssign(AssignImp e, H h);
public S visitDeclaration(DeclarationImp e,H h);
public S visitReturn(Return_instrImp instr, H h);
public S visitAssign(AssignImp instr, H h);
public S visitDeclaration(DeclarationImp instr,H h);
}
@@ -49,7 +47,6 @@ public interface Interface{
//but each implement will be different for prettyprinter
public interface Expression {
public <H,S> S accept(ExprVisitor<H,S> v, H h);
public ArrayList<AssignLVMImp> toLLVM();
}
public interface Val extends Expression{
@@ -65,7 +62,6 @@ public interface Interface{
public interface Type{
public <H,S> S accept(TypeVisitor<H,S> v, H h);
public TypeLLVM toLLVM();
}
public interface TypeVisitor<H,S>{