28 lines
883 B
Java
28 lines
883 B
Java
package abstractSyntaxTree.Class;
|
|
|
|
import TypeCheck.TypeCheckResult;
|
|
import abstractSyntaxTree.Program;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
public class MethodDecl implements IClass {
|
|
|
|
private HashMap<String, HashMap<String, HashMap<String, String>>> methodContext;
|
|
private HashMap<String, HashMap<String, String>> typeContext;
|
|
|
|
private HashMap<String, String> localVars; // (type, identifier) // add content here
|
|
|
|
public MethodDecl(HashMap<String, HashMap<String, HashMap<String, String>>> methodContext, HashMap<String, HashMap<String, String>> typeContext){
|
|
this.methodContext = methodContext;
|
|
this.typeContext = typeContext;
|
|
}
|
|
public TypeCheckResult typeCheck(List<MethodDecl> fieldsOrMethods) throws Exception {
|
|
// write localvars
|
|
|
|
// jede methode als block statement aufrufen
|
|
return null;
|
|
}
|
|
|
|
}
|