We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f93fa66 commit d105f21Copy full SHA for d105f21
shared/src/main/scala/io/kaitai/struct/translators/CommonOps.scala
@@ -14,16 +14,16 @@ trait CommonOps extends AbstractTranslator {
14
* @see https://docs.python.org/3/reference/expressions.html#operator-precedence
15
*/
16
val OPERATOR_PRECEDENCE = Map[Ast.operator, Int](
17
- Ast.operator.Mult -> 13,
18
- Ast.operator.Div -> 13,
19
- Ast.operator.Mod -> 13,
20
- Ast.operator.Add -> 12,
21
- Ast.operator.Sub -> 12,
22
- Ast.operator.LShift -> 11,
23
- Ast.operator.RShift -> 11,
24
- Ast.operator.BitAnd -> 10,
25
- Ast.operator.BitXor -> 9,
26
- Ast.operator.BitOr -> 8,
+ Ast.operator.Mult -> 130,
+ Ast.operator.Div -> 130,
+ Ast.operator.Mod -> 130,
+ Ast.operator.Add -> 120,
+ Ast.operator.Sub -> 120,
+ Ast.operator.LShift -> 110,
+ Ast.operator.RShift -> 110,
+ Ast.operator.BitAnd -> 100,
+ Ast.operator.BitXor -> 90,
+ Ast.operator.BitOr -> 80,
27
)
28
29
def genericBinOp(left: Ast.expr, op: Ast.operator, right: Ast.expr, extPrec: Int): String =
0 commit comments