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/CompOpNode.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ast/nodes/CompOpNode.java') diff --git a/src/ast/nodes/CompOpNode.java b/src/ast/nodes/CompOpNode.java index 7997052..761a49c 100644 --- a/src/ast/nodes/CompOpNode.java +++ b/src/ast/nodes/CompOpNode.java @@ -27,7 +27,6 @@ public class CompOpNode implements Node { return new ArrayList<>(); } - // TODO: it should be boolean, right? @Override public Type typeCheck() { return new VoidType(); @@ -42,7 +41,12 @@ public class CompOpNode implements Node { } @Override - public String toPrint(String prefix) { + public String printAST(String prefix) { return prefix + "CompOpNode(" + op + ")\n"; } + + @Override + public String toPrint(String prefix) { + return prefix + op; + } } -- cgit v1.2.3-18-g5258