summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/expr/Shunter.java
diff options
context:
space:
mode:
Diffstat (limited to 'dice-lang/src/bjc/dicelang/expr/Shunter.java')
-rw-r--r--dice-lang/src/bjc/dicelang/expr/Shunter.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/dice-lang/src/bjc/dicelang/expr/Shunter.java b/dice-lang/src/bjc/dicelang/expr/Shunter.java
index bbece0f..3b2bee2 100644
--- a/dice-lang/src/bjc/dicelang/expr/Shunter.java
+++ b/dice-lang/src/bjc/dicelang/expr/Shunter.java
@@ -41,10 +41,11 @@ public class Shunter {
int leftPriority = tok.type.operatorPriority;
int rightPriority;
- if(curOp == null)
+ if(curOp == null) {
rightPriority = 0;
- else
+ } else {
rightPriority = curOp.type.operatorPriority;
+ }
boolean isHigherPrec = leftPriority >= rightPriority;
@@ -59,10 +60,11 @@ public class Shunter {
leftPriority = tok.type.operatorPriority;
- if(curOp == null)
+ if(curOp == null) {
rightPriority = 0;
- else
+ } else {
rightPriority = curOp.type.operatorPriority;
+ }
isHigherPrec = leftPriority >= rightPriority;
}