summaryrefslogtreecommitdiffstats
path: root/src/ast/types/FunctionType.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/types/FunctionType.java')
-rw-r--r--src/ast/types/FunctionType.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ast/types/FunctionType.java b/src/ast/types/FunctionType.java
new file mode 100644
index 0000000..464bb9c
--- /dev/null
+++ b/src/ast/types/FunctionType.java
@@ -0,0 +1,27 @@
+package ast.types;
+
+/**
+ * An tom type. TODO: do I need to use this one?
+ */
+public class FunctionType extends Type {
+
+ private final int paramNumber;
+ private final Type returnType;
+
+ public FunctionType(int paramNumber, Type returnType) {
+ this.paramNumber = paramNumber;
+ this.returnType = returnType;
+ }
+
+ public int getParamNumber() {
+ return paramNumber;
+ }
+
+ public Type getReturnType() {
+ return returnType;
+ }
+
+ public String toPrint(String prefix) {
+ return prefix + "Atom\n";
+ }
+}