27 lines
632 B
Java
Raw Normal View History

2024-05-08 10:10:44 +02:00
package abstractSyntaxTree;
import TypeCheck.TypeCheckResult;
import abstractSyntaxTree.Datatype.RefType;
2024-05-08 11:22:12 +02:00
import java.util.HashMap;
2024-05-08 10:10:44 +02:00
import java.util.List;
public class Program {
public List<RefType> classes;
2024-05-08 11:22:12 +02:00
public HashMap<String, HashMap<String, String>> classTypeIndentifierTable; // (class, (type, identifier))
2024-05-08 10:10:44 +02:00
public TypeCheckResult typeCheck() throws Exception{
2024-05-08 11:22:12 +02:00
for(RefType oneClass : classes){
oneClass.typeCheck();
}
2024-05-08 10:10:44 +02:00
return null;
}
2024-05-08 11:22:12 +02:00
public void codeGen() throws Exception{
for(RefType oneClass : classes){
oneClass.codeGen();
}
}
2024-05-08 10:10:44 +02:00
}