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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrecedenceOperatorDescriptionAssociativity
1()CallLeft-to-right
1[]SubscriptLeft-to-right
1.SelectionLeft-to-right
2-Unary minusRight-to-left
2!Logical notRight-to-left
2~Bitwise notRight-to-left
3*MultiplicationLeft-to-right
3/DivisionLeft-to-right
3%ModuloLeft-to-right
4+AdditionLeft-to-right
4-SubtractionLeft-to-right
5..Range (inclusive)Left-to-right
5...Range (half-inclusive)Left-to-right
6<<Bitwise left shiftLeft-to-right
6>>Bitwise right shiftLeft-to-right
7<Less thanLeft-to-right
7<=Less than or equal toLeft-to-right
7>Greater thanLeft-to-right
7>=Greater than or equal toLeft-to-right
8==Equal toLeft-to-right
8!=Not equal toLeft-to-right
9&Bitwise ANDLeft-to-right
10^Bitwise XORLeft-to-right
11|Bitwise ORLeft-to-right
12isType testLeft-to-right
13&&Logical ANDLeft-to-right
14||Logical ORLeft-to-right
15?:Ternary ConditionalRight-to-left
16=AssignmentRight-to-left
diff --git a/doc/site/style.scss b/doc/site/style.scss index 03ac17a3..49a75ec4 100644 --- a/doc/site/style.scss +++ b/doc/site/style.scss @@ -323,6 +323,23 @@ table.chart { } } +// Precedence table on expressions page. +table.precedence { + width: 100%; + padding-left: 25px; + + tr { + margin: 0; + padding: 0; + } + + th, td { + font-size: 14px; + line-height: 20px; + text-align: left; + } +} + @media only screen and (max-width: 839px) { // 36 pixel columns. .page { width: 720px; }