25 lines
712 B
Java
25 lines
712 B
Java
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 {
|
|
|
|
public static void main(String[] args) throws Exception{
|
|
|
|
// get file
|
|
|
|
Program abstractSyntaxTree = new Program(new ArrayList<>());
|
|
List<FieldDecl> emptyFieldDecl = new ArrayList<>();
|
|
List<MethodDecl> emptyMethodDecl = new ArrayList<>();
|
|
abstractSyntaxTree.classes.add(new RefType(emptyFieldDecl, emptyMethodDecl, null, null, "MyClass"));
|
|
|
|
abstractSyntaxTree.typeCheck();
|
|
|
|
abstractSyntaxTree.codeGen();
|
|
}
|
|
}
|