Added TODOs

This commit is contained in:
Ahmad 2024-05-09 15:43:28 +02:00
parent dea4ba1808
commit f329ad6c59
3 changed files with 19 additions and 2 deletions

View File

@ -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,9 +10,14 @@ import java.util.Map;
@Data
public class TypedMethodCall implements TypedExpression, TypedStatement {
private TypedExpression recipient;
private TypedFieldVarAccess recipient;
private List<TypedExpression> args;
private Type returnType;
public TypedMethodCall convertToTypedMethodCall(MethodCall unTypedMethodCall) {
//TODO: Implement this
return null;
}
@Override
public Type typeCheck(Map<String, Type> localVar, Map<String, TypedClass> classes) {
//TODO: Implement typeCheck for MethodCall

View File

@ -12,6 +12,11 @@ import java.util.Map;
public class TypedNew implements TypedExpression, TypedStatement {
private Type type;
private List<TypedExpression> args;
public TypedNew convertToTypedNew(New unTypedNew) {
//TODO: Implement this
return null;
}
@Override
public Type typeCheck(Map<String, Type> localVar, Map<String, TypedClass> classes) {
// new A(1, 2, 3)

View File

@ -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<String, Type> localVar, Map<String, TypedClass> 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<String, Type> localVar, Map<String, TypedClass> classes, de.maishai.ast.records.Node unTypedAST) {
Parameter untyped = (Parameter) unTypedAST;