From 785079e55464e947704fcb830a8eea973af6d7ef Mon Sep 17 00:00:00 2001 From: jeffcheasey88 <66554203+jeffcheasey88@users.noreply.github.com> Date: Sun, 10 Sep 2023 17:57:10 +0200 Subject: [PATCH] while without braces --- src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java b/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java index 7c6d862..6610774 100644 --- a/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java +++ b/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java @@ -581,6 +581,12 @@ public class JavaParser extends Parser { .unique((validator) -> validator.validate((token) -> token.getValue().equals("}"))) .end((a,b) -> a); + operation_while.then(new RedirectStateTree<>(operation, (global, local) -> global.set(null))) + .end((a,b) -> { + System.out.println("JHUGYUFKHJO"); + return a; + }); + operation_while.then((validator) -> validator.validate((token) -> token.getValue().equals(";"))) .end((a,b) -> a);