diff --git a/doc/site/expressions.markdown b/doc/site/expressions.markdown index b77cb640..9648d8e6 100644 --- a/doc/site/expressions.markdown +++ b/doc/site/expressions.markdown @@ -264,15 +264,187 @@ When you mix these all together, you need to worry about follows C, except that it fixes the bitwise operator mistake. The full precedence table, from lowest to highest, is: - :::dart - = // Assignment. - && || ?: // Logic. - is // Type test. - == != // Equality. - < > <= >= // Comparison. - .. ... // Range. - | & // Bitwise. - + - // Terms. - * / % // Factors. - - ~ ! // Unary. - . [] // Call. +
| Precedence | +Operator | +Description | +Associativity | +
|---|---|---|---|
| 1 | +() | +Call | +Left-to-right | +
| 1 | +[] | +Subscript | +Left-to-right | +
| 1 | +. | +Selection | +Left-to-right | +
| 2 | +- | +Unary minus | +Right-to-left | +
| 2 | +! | +Logical not | +Right-to-left | +
| 2 | +~ | +Bitwise not | +Right-to-left | +
| 3 | +* | +Multiplication | +Left-to-right | +
| 3 | +/ | +Division | +Left-to-right | +
| 3 | +% | +Modulo | +Left-to-right | +
| 4 | ++ | +Addition | +Left-to-right | +
| 4 | +- | +Subtraction | +Left-to-right | +
| 5 | +.. | +Range (inclusive) | +Left-to-right | +
| 5 | +... | +Range (half-inclusive) | +Left-to-right | +
| 6 | +<< | +Bitwise left shift | +Left-to-right | +
| 6 | +>> | +Bitwise right shift | +Left-to-right | +
| 7 | +< | +Less than | +Left-to-right | +
| 7 | +<= | +Less than or equal to | +Left-to-right | +
| 7 | +> | +Greater than | +Left-to-right | +
| 7 | +>= | +Greater than or equal to | +Left-to-right | +
| 8 | +== | +Equal to | +Left-to-right | +
| 8 | +!= | +Not equal to | +Left-to-right | +
| 9 | +& | +Bitwise AND | +Left-to-right | +
| 10 | +^ | +Bitwise XOR | +Left-to-right | +
| 11 | +| | +Bitwise OR | +Left-to-right | +
| 12 | +is | +Type test | +Left-to-right | +
| 13 | +&& | +Logical AND | +Left-to-right | +
| 14 | +|| | +Logical OR | +Left-to-right | +
| 15 | +?: | +Ternary Conditional | +Right-to-left | +
| 16 | += | +Assignment | +Right-to-left | +