diff --git a/src/main/java/de/tla2b/types/IType.java b/src/main/java/de/tla2b/types/IType.java deleted file mode 100644 index 340817519d93be3b4e710d83db63c32978051c35..0000000000000000000000000000000000000000 --- a/src/main/java/de/tla2b/types/IType.java +++ /dev/null @@ -1,22 +0,0 @@ -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); -} diff --git a/src/main/java/de/tla2b/types/TLAType.java b/src/main/java/de/tla2b/types/TLAType.java index facb86c9d6a387f4f5eabe08709a07b26fac7174..368fc4b5f49acffc4a89bbe2edf601e54c848f44 100644 --- a/src/main/java/de/tla2b/types/TLAType.java +++ b/src/main/java/de/tla2b/types/TLAType.java @@ -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); + }