From ce49d20a5fe3726e1800bc495a25c7617212abf4 Mon Sep 17 00:00:00 2001 From: Emanuele Grasso <96300448+L0P0P@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:48:09 +0200 Subject: Reaching definition analysis (#17) Co-authored-by: Santo Cariotti Co-authored-by: geno Co-authored-by: geno --- src/ast/nodes/ParamlistNode.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/ast/nodes/ParamlistNode.java') diff --git a/src/ast/nodes/ParamlistNode.java b/src/ast/nodes/ParamlistNode.java index 9e8d75c..2cb6c89 100644 --- a/src/ast/nodes/ParamlistNode.java +++ b/src/ast/nodes/ParamlistNode.java @@ -42,15 +42,29 @@ public class ParamlistNode implements Node { } @Override - public String toPrint(String prefix) { + public String printAST(String prefix) { String str = prefix + "Paramlist\n"; prefix += " "; - for (var param : params) { - str += param.toPrint(prefix); + for (Node param : params) { + str += param.printAST(prefix); } return str; } + @Override + public String toPrint(String prefix) { + String str = prefix; + + for (int i = 0; i < params.size(); i++) { + str += params.get(i).toPrint(""); + if (i != params.size() - 1) { + str += ", "; + } + } + + return str; + } + } -- cgit v1.2.3-18-g5258