little progress

This commit is contained in:
julian 2024-04-22 22:12:55 +02:00
parent cb7c81c41b
commit e9722e595c
5 changed files with 9 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -30,8 +30,7 @@ import java.lang.Boolean;
public class FunNClass extends ClassOrInterface { public class FunNClass extends ClassOrInterface {
public FunNClass(funNParams) { public FunNClass(funNParams) {
super(0, new JavaClassName("Fun" + (funNParams.size() - 1).toString()), new ArrayList<>(), Optional.empty(), Optional.empty() /* eingefuegt PL 2018-11-24 */, null, new ArrayList<>(), createGenerics(funNParams), ASTFactory.createObjectType(), true, false, new ArrayList<>(), new ArrayList<>(), new NullToken(), null); super(0, new JavaClassName("Fun" + (funNParams.size() - 1).toString()), new ArrayList<>(), Optional.empty(), Optional.empty() /* eingefuegt PL 2018-11-24 */, createMethods(funNParams), new ArrayList<>(), createGenerics(funNParams), ASTFactory.createObjectType(), true, false, new ArrayList<>(), new ArrayList<>(), new NullToken(), null);
} }
private static createGenerics(funNParams) { private static createGenerics(funNParams) {
@ -44,7 +43,7 @@ public class FunNClass extends ClassOrInterface {
return new GenericDeclarationList(generics, new NullToken()); return new GenericDeclarationList(generics, new NullToken());
} }
// private static createMethods(funNParams) { private static createMethods(funNParams) {
// return null; return null;
// } }
} }

View File

@ -24,20 +24,19 @@ public class TypeInferenceBlockInformation extends TypeInferenceInformation {
private TypeScope methodContext; private TypeScope methodContext;
private ClassOrInterface currentClass; private ClassOrInterface currentClass;
public TypeInferenceBlockInformation(Collection<ClassOrInterface> availableClasses, public TypeInferenceBlockInformation(availableClasses, currentClass, methodContext) {
ClassOrInterface currentClass, TypeScope methodContext) {
super(availableClasses); super(availableClasses);
this.methodContext = new TypeScopeContainer(currentClass, methodContext); this.methodContext = new TypeScopeContainer(currentClass, methodContext);
this.currentClass = currentClass; this.currentClass = currentClass;
} }
public TypeInferenceBlockInformation(TypeInferenceBlockInformation oldScope, TypeScope newScope) { public TypeInferenceBlockInformation(oldScope, newScope) {
this(oldScope.getAvailableClasses(), oldScope.currentClass, new TypeScopeContainer(oldScope.methodContext, newScope)); this(oldScope.getAvailableClasses(), oldScope.currentClass, new TypeScopeContainer(oldScope.methodContext, newScope));
} }
public ClassOrInterface getCurrentClass() { public getCurrentClass() {
return currentClass; return currentClass;
} }
public TypeScope getCurrentTypeScope() { public getCurrentTypeScope() {
return methodContext; return methodContext;
} }
} }

View File

@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
/* /*
Anmerkung: Anmerkung: