mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 10:20:41 +00:00
TypeVariableFactory implementieren
This commit is contained in:
parent
70a97b4c83
commit
5dd3f0f969
@ -7,11 +7,15 @@ import edu.kit.typicalc.model.type.TypeVariable;
|
||||
*/
|
||||
public class TypeVariableFactory {
|
||||
|
||||
private static final int FIRST_VARIABLE_INDEX = 1;
|
||||
|
||||
private int nextVariableIndex;
|
||||
|
||||
/**
|
||||
* Initializes a new type variable factory.
|
||||
*/
|
||||
protected TypeVariableFactory() {
|
||||
// TODO
|
||||
nextVariableIndex = FIRST_VARIABLE_INDEX;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -20,7 +24,8 @@ public class TypeVariableFactory {
|
||||
* @return a new unique type variable
|
||||
*/
|
||||
public TypeVariable nextTypeVariable() {
|
||||
return null;
|
||||
// TODO
|
||||
TypeVariable nextTypeVariable = new TypeVariable(nextVariableIndex);
|
||||
nextVariableIndex++;
|
||||
return nextTypeVariable;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
package edu.kit.typicalc.model.type;
|
||||
|
||||
public class TypeVariable {
|
||||
public TypeVariable(int index) {
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user