NichtHaskell/Source/Compiler.java

25 lines
684 B
Java
Raw Normal View History

2024-05-08 13:14:58 +00:00
import abstractSyntaxTree.Class.FieldDecl;
import abstractSyntaxTree.Class.MethodDecl;
import abstractSyntaxTree.Class.RefType;
import abstractSyntaxTree.Program;
import java.util.ArrayList;
import java.util.List;
public class Compiler {
2024-05-09 12:20:55 +00:00
public static void main(String[] args) throws Exception{
2024-05-08 13:14:58 +00:00
// get file
Program abstractSyntaxTree = new Program();
List<FieldDecl> emptyFieldDecl = new ArrayList<>();
List<MethodDecl> emptyMethodDecl = new ArrayList<>();
abstractSyntaxTree.classes.add(new RefType(emptyFieldDecl, emptyMethodDecl, null, null));
abstractSyntaxTree.typeCheck();
abstractSyntaxTree.codeGen();
}
}