params function
This commit is contained in:
@@ -56,6 +56,11 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImpl>
|
||||
@Override
|
||||
public DefineLLVM visitFunction(FunctionImp fun, SymTable h) {
|
||||
ArrayList<InstructionLLVM> instrLLVM = new ArrayList<>();
|
||||
ArrayList<ValLLVM> paramsLLVM = new ArrayList<>();
|
||||
for(VarImp param: fun.params()){
|
||||
paramsLLVM.add(param.accept(this, h).val);
|
||||
}
|
||||
|
||||
instrLLVM.addAll(fun.instruction().accept(this, h));
|
||||
return new DefineLLVMImpl(fun.nom(), fun.type().accept(this, h), new ArrayList<>(), instrLLVM);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user