5.2.7. Operator Precedence

In Spicy, operator precedence is generally pretty similar to other languages, with some Spicy-specific operators added. The following table summarizes Spicy’s operator precedence, from highest to lowest:

Operator Precedence

Associativity

Operators

Left

., [, ?., .?

Right

!, * (unary), ~, - (unary), |...|, --, ++

Right

**

Left

%, *, /

Left

+, -

Left

<<, >>

Left

&

Left

^

Left

|

Left

<, >, >=, <=

Left

==, !=

Left

in, !in

Left

&&

Left

||

Left

?, :

Left

=, -=, +=, *=, /=