Expressions¶
Precedence¶
The operator precedence and expression ordering is as follows, going from strong to weak. Binary operators at the same precedence level are grouped in the order given by their associativity.
| Expression type | Associativity |
|---|---|
| Name | |
Unary +, -, &, * |
|
as |
|
*, /, % |
Left |
+, - |
Left |
>>, >>>, << |
Left |
& |
Left |
^ |
Left |
| |
Left |
==, !=, >, <, >=, <= |
Left |
&& |
Left |
|| |
Left |
.. |
Not allowed together1 |
..= |
Not allowed together1 |
=, +=, -=,*=, /=, %=,>>=, >>>=, <<=,&=, ^=, |= |
Right |