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/BlockNode.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/ast/nodes/BlockNode.java') diff --git a/src/ast/nodes/BlockNode.java b/src/ast/nodes/BlockNode.java index 2ea0a47..86a0db6 100644 --- a/src/ast/nodes/BlockNode.java +++ b/src/ast/nodes/BlockNode.java @@ -43,15 +43,25 @@ public class BlockNode extends RootNode { } @Override - public String toPrint(String prefix) { + public String printAST(String prefix) { String str = prefix + "Block\n"; prefix += " "; for (Node child : childs) { - str += child.toPrint(prefix); + str += child.printAST(prefix); } return str; } + @Override + public String toPrint(String prefix) { + String str = ""; + + for (Node child : childs) { + str += child.toPrint(prefix); + } + + return str; + } } -- cgit v1.2.3-18-g5258