aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolim <bobq4582@gmail.com>2024-04-25 11:45:23 +0100
committerolim <bobq4582@gmail.com>2024-05-09 22:42:35 +0100
commit79ded04ec6834ad28f23f9db0f205689deda467d (patch)
tree1eabd5a6dda6d00ba9bc207ce3a01a93784c83f3
parent0619e195661f4ed285786ea679a27e1f28f9dd6e (diff)
downloadSkyblocker-79ded04ec6834ad28f23f9db0f205689deda467d.tar.gz
Skyblocker-79ded04ec6834ad28f23f9db0f205689deda467d.tar.bz2
Skyblocker-79ded04ec6834ad28f23f9db0f205689deda467d.zip
be more lenient with brackets
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/Calculator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/Calculator.java b/src/main/java/de/hysky/skyblocker/utils/Calculator.java
index fb2b8b11..c8dcb6d8 100644
--- a/src/main/java/de/hysky/skyblocker/utils/Calculator.java
+++ b/src/main/java/de/hysky/skyblocker/utils/Calculator.java
@@ -132,7 +132,8 @@ public class Calculator {
while (!operatorStack.isEmpty()) {
Token leftToken = operatorStack.pop();
if (leftToken.type == TokenType.L_PARENTHESIS) {
- throw new UnsupportedOperationException("Unbalanced left parenthesis");
+ //technically unbalanced left parenthesis error but just assume they are close after the equation and ignore them from here
+ continue;
}
outputQueue.add(leftToken);
}