summaryrefslogtreecommitdiffstats
path: root/src/ast/types/Type.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/types/Type.java')
-rw-r--r--src/ast/types/Type.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ast/types/Type.java b/src/ast/types/Type.java
new file mode 100644
index 0000000..4756255
--- /dev/null
+++ b/src/ast/types/Type.java
@@ -0,0 +1,41 @@
+package com.clp.project.ast.types;
+
+import java.util.ArrayList;
+
+import com.clp.project.semanticanalysis.SemanticError;
+import com.clp.project.semanticanalysis.SymbolTable;
+import com.clp.project.ast.nodes.*;
+
+/**
+ * A node which represents a type class.
+ */
+public class Type implements Node {
+ public boolean isEqual(Type A, Type B) {
+ if (A.getClass().equals(B.getClass()))
+ return true;
+ else
+ return false;
+ }
+
+ public String toPrint(String s) {
+ return s;
+ }
+
+ public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
+ // It is never invoked
+ return null;
+ }
+
+ @Override
+ public Type typeCheck() {
+ // It is never invoked
+ return null;
+ }
+
+ @Override
+ public String codeGeneration() {
+ // It is never invoked
+ return "";
+ }
+
+}