777e5b9c5b
# Conflicts: # Source/abstractSyntaxTree/Program.java
31 lines
937 B
Java
31 lines
937 B
Java
package abstractSyntaxTree.Class;
|
|
|
|
import TypeCheck.TypeCheckResult;
|
|
import abstractSyntaxTree.Program;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
public class MethodDecl implements IClass {
|
|
|
|
// name
|
|
|
|
private HashMap<String, HashMap<String, HashMap<String, String>>> methodContext;
|
|
private HashMap<String, HashMap<String, String>> typeContext;
|
|
|
|
//TODO: Move this into the typeCheck
|
|
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;
|
|
}
|
|
|
|
}
|