summaryrefslogtreecommitdiffstats
path: root/src/ast/types/NoneType.java
diff options
context:
space:
mode:
authorgeno <gabriele.genovese2@studio.unibo.it>2024-06-27 18:49:56 +0000
committergeno <gabriele.genovese2@studio.unibo.it>2024-06-27 18:49:56 +0000
commitfd85e9980c0305c6dfb91aaeb199430a89163c3e (patch)
tree724d7184c11ad3acb8a8b0d2e15f1922f5b36059 /src/ast/types/NoneType.java
parent4898724edf343650ffb80792caf9e242e5843059 (diff)
fixed comp_for and added reseved word type
Diffstat (limited to 'src/ast/types/NoneType.java')
-rw-r--r--src/ast/types/NoneType.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ast/types/NoneType.java b/src/ast/types/NoneType.java
new file mode 100644
index 0000000..42f7fd7
--- /dev/null
+++ b/src/ast/types/NoneType.java
@@ -0,0 +1,16 @@
+package ast.types;
+
+/**
+ * A none type. None return unit.
+ */
+public class NoneType extends Type {
+
+ public String toPrint(String prefix) {
+ return prefix + "None\n";
+ }
+
+ @Override
+ public String toString() {
+ return "None";
+ }
+}