From efb43f7c6f9b191ea8a880dc4b209e835495846a Mon Sep 17 00:00:00 2001 From: Roman / Nea Date: Sat, 16 Jul 2022 11:31:15 +0200 Subject: Use left to right association order (#188) --- src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java index 45d7c051..7d378a03 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java @@ -172,7 +172,7 @@ public class Calculator { break; assert (l.type == TokenType.BINOP); int pl = getPrecedence(l); - if (pl > p) { + if (pl >= p) { // Association order out.add(op.pop()); } else { break; -- cgit