blob: ef5064121da37836eac21f10edd1d8b400e1f5a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package ast.types;
/**
* A Function type.
*/
public class FunctionType extends Type {
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;
}
public Type getReturnType() {
return returnType;
}
public String toPrint(String prefix) {
return prefix + "Function\n";
}
}
|