error 3
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
package TP2.asd;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import TP2.asd.Interface.*;
|
||||
|
||||
public class Program{
|
||||
public static record ProgramImp(ArrayList<Instruction> instructions){
|
||||
public <H, S> S accept(ProgramVisitor<H, S> v, H h) {
|
||||
return v.visitProgram(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record Function(Type type, String nom, ArrayList<Instruction> instructions){
|
||||
public Function(Type type, String name, Instruction instruction) {
|
||||
this(type, name, new ArrayList<>() {{ add(instruction); }});
|
||||
|
||||
Reference in New Issue
Block a user