summaryrefslogtreecommitdiff
path: root/typecheck/library/TypeInstance.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-03-27 22:53:08 -0600
committerbd-912 <bdunahu@colostate.edu>2024-03-27 22:53:08 -0600
commitb01fe1e8e5541d6c11f905d7fbb949d747f29230 (patch)
treed348b6b471fa2ebb2cece61daaf672c8b27b4299 /typecheck/library/TypeInstance.java
parent8131ddc22af5d39114a55349d71bcdc467599187 (diff)
SymbolTable to separate library, Class/Method Instances
Diffstat (limited to 'typecheck/library/TypeInstance.java')
-rw-r--r--typecheck/library/TypeInstance.java43
1 files changed, 0 insertions, 43 deletions
diff --git a/typecheck/library/TypeInstance.java b/typecheck/library/TypeInstance.java
deleted file mode 100644
index 756d39b..0000000
--- a/typecheck/library/TypeInstance.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package typecheck.library;
-
-public class TypeInstance {
- TypeEnum type;
- String type_name;
-
- public String toString() {
- return "name:" + type_name + "|type:" + type;
- }
-
- public TypeInstance(String type_name, TypeEnum type) {
- this.type = type;
- this.type_name = type_name;
- }
-
- public boolean equal_type(TypeInstance other) {
- /**
- * Given a TypeInstance object other,
- * returns true if other object
- * is the same type as this one.
- *
- * We can say two types are equal, as
- * long as they are not equal on a
- * type error!
- */
-
- return this.type != TypeEnum.ERROR &&
- this.type == other.type;
- }
-
- public boolean has_checked() {
- return type != TypeEnum.ERROR;
- }
-
- public TypeEnum get_type() {
- return this.type;
- }
-
- public String get_type_name() {
- return this.type_name;
- }
-
-}