TypeVariableFactory implementieren

This commit is contained in:
Johanna Stuber 2021-01-27 20:17:30 +01:00
parent 70a97b4c83
commit 5dd3f0f969
2 changed files with 11 additions and 3 deletions

View File

@ -7,11 +7,15 @@ import edu.kit.typicalc.model.type.TypeVariable;
*/ */
public class TypeVariableFactory { public class TypeVariableFactory {
private static final int FIRST_VARIABLE_INDEX = 1;
private int nextVariableIndex;
/** /**
* Initializes a new type variable factory. * Initializes a new type variable factory.
*/ */
protected TypeVariableFactory() { protected TypeVariableFactory() {
// TODO nextVariableIndex = FIRST_VARIABLE_INDEX;
} }
/** /**
@ -20,7 +24,8 @@ public class TypeVariableFactory {
* @return a new unique type variable * @return a new unique type variable
*/ */
public TypeVariable nextTypeVariable() { public TypeVariable nextTypeVariable() {
return null; TypeVariable nextTypeVariable = new TypeVariable(nextVariableIndex);
// TODO nextVariableIndex++;
return nextTypeVariable;
} }
} }

View File

@ -1,4 +1,7 @@
package edu.kit.typicalc.model.type; package edu.kit.typicalc.model.type;
public class TypeVariable { public class TypeVariable {
public TypeVariable(int index) {
}
} }