diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedMethodCall.java b/src/main/java/de/maishai/typedast/typedclass/TypedMethodCall.java index 5488610..2fa716a 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedMethodCall.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedMethodCall.java @@ -1,5 +1,6 @@ package de.maishai.typedast.typedclass; +import de.maishai.ast.records.MethodCall; import de.maishai.typedast.*; import lombok.Data; import org.objectweb.asm.MethodVisitor; @@ -9,10 +10,15 @@ import java.util.Map; @Data public class TypedMethodCall implements TypedExpression, TypedStatement { - private TypedExpression recipient; + private TypedFieldVarAccess recipient; private List args; + private Type returnType; - @Override + public TypedMethodCall convertToTypedMethodCall(MethodCall unTypedMethodCall) { + //TODO: Implement this + return null; + } + @Override public Type typeCheck(Map localVar, Map classes) { //TODO: Implement typeCheck for MethodCall return null; diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedNew.java b/src/main/java/de/maishai/typedast/typedclass/TypedNew.java index 40fe0c8..fd4d006 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedNew.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedNew.java @@ -12,6 +12,11 @@ import java.util.Map; public class TypedNew implements TypedExpression, TypedStatement { private Type type; private List args; + + public TypedNew convertToTypedNew(New unTypedNew) { + //TODO: Implement this + return null; + } @Override public Type typeCheck(Map localVar, Map classes) { // new A(1, 2, 3) diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedParameter.java b/src/main/java/de/maishai/typedast/typedclass/TypedParameter.java index b6a13b2..fa0afb4 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedParameter.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedParameter.java @@ -17,6 +17,11 @@ public class TypedParameter implements TypedNode { private String paraName; private Type type; + public TypedParameter convertToTypedParameter(Parameter unTypedParameter) { + //TODO: implement + return null; + } + @Override public Type typeCheck(Map localVar, Map classes) { if (localVar.containsKey(paraName)) { @@ -25,6 +30,7 @@ public class TypedParameter implements TypedNode { localVar.put(paraName, type); return type; } + @Override public TypedNode convertToTypedAST(Map localVar, Map classes, de.maishai.ast.records.Node unTypedAST) { Parameter untyped = (Parameter) unTypedAST;