39 lines
1013 B
Java
39 lines
1013 B
Java
package abstractSyntaxTree.Class;
|
|
|
|
import TypeCheck.TypeCheckResult;
|
|
import abstractSyntaxTree.Program;
|
|
import org.objectweb.asm.ClassWriter;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
public class MethodDecl implements IClass {
|
|
|
|
public String classThatContainsMethod;
|
|
public String name;
|
|
public List<String> parameters;
|
|
public String returnType;
|
|
|
|
|
|
//TODO: Move this into the typeCheck
|
|
private HashMap<String, String> localVars; // (type, identifier) // add content here
|
|
|
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, String>>> methodContext, HashMap<String, HashMap<String, String>> typeContext, List<MethodDecl> fieldsOrMethods) throws Exception {
|
|
// write localvars
|
|
|
|
|
|
// jede methode als block statement aufrufen
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public TypeCheckResult typeCheck() throws Exception {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public void codeGen(ClassWriter cw) throws Exception {
|
|
|
|
}
|
|
}
|