27 lines
632 B
Java
27 lines
632 B
Java
package abstractSyntaxTree;
|
|
|
|
import TypeCheck.TypeCheckResult;
|
|
import abstractSyntaxTree.Datatype.RefType;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
public class Program {
|
|
public List<RefType> classes;
|
|
|
|
public HashMap<String, HashMap<String, String>> classTypeIndentifierTable; // (class, (type, identifier))
|
|
|
|
public TypeCheckResult typeCheck() throws Exception{
|
|
for(RefType oneClass : classes){
|
|
oneClass.typeCheck();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public void codeGen() throws Exception{
|
|
for(RefType oneClass : classes){
|
|
oneClass.codeGen();
|
|
}
|
|
}
|
|
}
|