params function

This commit is contained in:
trochas
2025-04-25 15:05:27 +02:00
parent a86f3433be
commit c281229dbf
3 changed files with 15 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ public class Program{
}
//Prototype
public static record PrototypeImp(Type type, String nom, ArrayList<String> s) implements Prototype{
public static record PrototypeImp(Type type, String nom, ArrayList<String> params) implements Prototype{
@Override
public <H, S> S accept(PrototypeVisitor<H, S> v, H h) {
return v.visitPrototype(this,h);
@@ -34,7 +34,7 @@ public class Program{
}
//Fonction
public static record FunctionImp(Type type, String nom, ArrayList<String> s,Instruction instruction)implements Function {
public static record FunctionImp(Type type, String nom, ArrayList<VarImp> params,Instruction instruction)implements Function {
//public FunctionImp(Type type, String name, Instruction instruction) {
// this(type, name, new ArrayList<>() {{ add(instruction); }}); C KOI ?
//}
@@ -62,7 +62,7 @@ public class Program{
return v.visitVar(this, h);
}
}
//Declaration
public static record DeclarationImp(Type t, ArrayList<String> s) implements Declaration{