| ... | @@ -1907,6 +1907,34 @@ and | ... | @@ -1907,6 +1907,34 @@ and |
| 1907 | or | 1907 | or |
| 1908 | = *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |={#endsyntax#}</pre> | 1908 | = *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |={#endsyntax#}</pre> |
| 1909 | {#header_close#} | 1909 | {#header_close#} |
| | 1910 | <p> |
| | 1911 | However, understanding the full ambiguity rules are not necessary for reading or writing code. Instead, having an understanding of the unambiguous cases for the operators, you're using is more practical. To that end, some simplified versions, of the precedence table are provided below, tailored to understanding particular groups of operator groups. The operators that have ambiguous precedence with the given operators in question have been omitted, as have operators with higher precedence. The operators colored <span style="color: orange">orange</span> have ambiguous precedence with other operators on the same line. |
| | 1912 | |
| | 1913 | For arithmetic and error set operators, the simplfied precedence table would look like this. |
| | 1914 | </p> |
| | 1915 | |
| | 1916 | <pre><code>* / *% *| || <span style="color: orange">%</span> |
| | 1917 | + - ++ +% -% +| -| |
| | 1918 | == != &lt; > &lt;= >= |
| | 1919 | <span style="color: orange">and or</span> |
| | 1920 | = *= *%= *|= /= %= += +%= +|= -= -%= -|= &lt;&lt;= &lt;&lt;|= >>= &= ^= |=</code></pre> |
| | 1921 | |
| | 1922 | <p> |
| | 1923 | For bitwise operators, it would look like this: |
| | 1924 | </p> |
| | 1925 | |
| | 1926 | <pre><code><span style="color: orange">&lt;&lt; &lt;&lt;| >> & ^ |</span> |
| | 1927 | == != &lt; > &lt;= >= |
| | 1928 | <span style="color: orange">and or</span> |
| | 1929 | = *= *%= *|= /= %= += +%= +|= -= -%= -|= &lt;&lt;= &lt;&lt;|= >>= &= ^= |=</code></pre> |
| | 1930 | |
| | 1931 | <p> |
| | 1932 | For null and error recovery, it would look like this: |
| | 1933 | </p> |
| | 1934 | |
| | 1935 | <pre><code><span style="color: orange">catch orelse</span> |
| | 1936 | = *= *%= *|= /= %= += +%= +|= -= -%= -|= &lt;&lt;= &lt;&lt;|= >>= &= ^= |=</code></pre> |
| | 1937 | |
| 1910 | {#header_close#} | 1938 | {#header_close#} |
| 1911 | {#header_close#} | 1939 | {#header_close#} |
| 1912 | | 1940 | |