summaryrefslogtreecommitdiffstats
path: root/src/ast/types
diff options
context:
space:
mode:
authorgeno <gabriele.genovese2@studio.unibo.it>2024-06-28 10:23:28 +0000
committergeno <gabriele.genovese2@studio.unibo.it>2024-06-28 10:23:28 +0000
commit37665fb6d0bc1eb29396ae949354cf7d6f9d54ca (patch)
tree058204d723fb31b3b30bf8d141cf621c6f42c0c6 /src/ast/types
parent1d5c4862e136419ab1ed3fcf8d8edaa0ee5fda10 (diff)
resolving all the comments santo made
Diffstat (limited to 'src/ast/types')
-rw-r--r--src/ast/types/FunctionType.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ast/types/FunctionType.java b/src/ast/types/FunctionType.java
index 464bb9c..ef50641 100644
--- a/src/ast/types/FunctionType.java
+++ b/src/ast/types/FunctionType.java
@@ -1,18 +1,19 @@
package ast.types;
/**
- * An tom type. TODO: do I need to use this one?
+ * A Function type.
*/
public class FunctionType extends Type {
- private final int paramNumber;
- private final Type returnType;
+ private int paramNumber;
+ private Type returnType;
public FunctionType(int paramNumber, Type returnType) {
this.paramNumber = paramNumber;
this.returnType = returnType;
}
+ // Return the length of the parameters
public int getParamNumber() {
return paramNumber;
}
@@ -22,6 +23,6 @@ public class FunctionType extends Type {
}
public String toPrint(String prefix) {
- return prefix + "Atom\n";
+ return prefix + "Function\n";
}
}