summaryrefslogtreecommitdiff
path: root/src/ast/nodes/ParamlistNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/nodes/ParamlistNode.java')
-rw-r--r--src/ast/nodes/ParamlistNode.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/nodes/ParamlistNode.java b/src/ast/nodes/ParamlistNode.java
index 144eb13..0a9696f 100644
--- a/src/ast/nodes/ParamlistNode.java
+++ b/src/ast/nodes/ParamlistNode.java
@@ -10,6 +10,7 @@ import ast.types.*;
* Node for the `param_list` statement of the grammar.
*/
public class ParamlistNode implements Node {
+
private ArrayList<Node> params;
public ParamlistNode(ArrayList<Node> _params) {
@@ -27,6 +28,10 @@ public class ParamlistNode implements Node {
return errors;
}
+ public int getParamNumber() {
+ return params.size();
+ }
+
@Override
public Type typeCheck() {
return new VoidType();