Skip to content
Snippets Groups Projects
Commit 19c9592d authored by Jan Gruteser's avatar Jan Gruteser
Browse files

remove IType interface

parent 9e525feb
No related branches found
No related tags found
No related merge requests found
package de.tla2b.types;
import de.tla2b.output.TypeVisitorInterface;
public interface IType {
int UNTYPED = 0;
int INTEGER = 1;
int BOOL = 2;
int STRING = 3;
int MODELVALUE = 4;
int POW = 5;
int PAIR = 6;
int STRUCT = 7;
int TUPLEORSEQ = 8;
int STRUCT_OR_FUNCTION = 9;
int FUNCTION = 10;
int TUPLE = 11;
int TUPLE_OR_FUNCTION = 12;
int REAL = 13;
void apply(TypeVisitorInterface visitor);
}
......@@ -2,8 +2,25 @@ package de.tla2b.types;
import de.be4.classicalb.core.parser.node.PExpression;
import de.tla2b.exceptions.UnificationException;
import de.tla2b.output.TypeVisitorInterface;
public abstract class TLAType {
static int UNTYPED = 0;
static int INTEGER = 1;
static int BOOL = 2;
static int STRING = 3;
static int MODELVALUE = 4;
static int POW = 5;
static int PAIR = 6;
static int STRUCT = 7;
static int TUPLEORSEQ = 8;
static int STRUCT_OR_FUNCTION = 9;
static int FUNCTION = 10;
static int TUPLE = 11;
static int TUPLE_OR_FUNCTION = 12;
static int REAL = 13;
public abstract class TLAType implements IType {
private final int kind;
public TLAType(int t) {
......@@ -14,8 +31,6 @@ public abstract class TLAType implements IType {
return kind;
}
public abstract String toString();
public abstract PExpression getBNode();
public abstract boolean compare(TLAType o);
......@@ -36,7 +51,6 @@ public abstract class TLAType implements IType {
return current;
}
public final String printObjectToString() {
return super.toString();
}
public abstract void apply(TypeVisitorInterface visitor);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment