diff --git a/src/main/java/org/jcnc/snow/compiler/parser/function/ASTPrinter.java b/src/main/java/org/jcnc/snow/compiler/parser/function/ASTPrinter.java index c12edb3..95b9708 100644 --- a/src/main/java/org/jcnc/snow/compiler/parser/function/ASTPrinter.java +++ b/src/main/java/org/jcnc/snow/compiler/parser/function/ASTPrinter.java @@ -86,9 +86,9 @@ public class ASTPrinter { case AssignmentNode(String variable, ExpressionNode value, NodeContext _) -> System.out.println(pad + variable + " = " + value); case IfNode( - ExpressionNode condition, List thenBranch, List elseBranch, NodeContext _ + ExpressionNode cond, List thenBranch, List elseBranch, NodeContext _ ) -> { - System.out.println(pad + "if " + condition); + System.out.println(pad + "if " + cond); for (StatementNode stmt : thenBranch) { print(stmt, indent + 1); } @@ -100,13 +100,13 @@ public class ASTPrinter { } } case LoopNode( - StatementNode initializer, ExpressionNode condition, StatementNode update, List body, + StatementNode init, ExpressionNode cond, StatementNode step, List body, NodeContext _ ) -> { System.out.println(pad + "loop {"); - print(initializer, indent + 1); - System.out.println(pad + " condition: " + condition); - System.out.println(pad + " update: " + update); + print(init, indent + 1); + System.out.println(pad + " cond: " + cond); + System.out.println(pad + " step: " + step); System.out.println(pad + " body {"); for (StatementNode stmt : body) { print(stmt, indent + 2);