From 197f7ee6d248a004763d5bb640a14dc4117d5a70 Mon Sep 17 00:00:00 2001 From: CMDRZero Date: Fri, 24 Jul 2026 16:14:42 -0500 Subject: [PATCH] Update langref to include simplified operator tables. --- doc/langref.html.in | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/langref.html.in b/doc/langref.html.in index e8c1c675ed7b40bacc7f72e2ad2d68892ac81ca4..9265b41fe3bff1fa02c032a5dd11cfc50a653bbf 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1907,6 +1907,34 @@ and or = *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |={#endsyntax#} {#header_close#} +

+ 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 orange have ambiguous precedence with other operators on the same line. + + For arithmetic and error set operators, the simplfied precedence table would look like this. +

+ +
* / *% *| || %
++ - ++ +% -% +| -|
+== != < > <= >=
+and or
+= *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |=
+ +

+ For bitwise operators, it would look like this: +

+ +
<< <<| >> & ^ |
+== != < > <= >=
+and or
+= *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |=
+ +

+ For null and error recovery, it would look like this: +

+ +
catch orelse
+= *= *%= *|= /= %= += +%= +|= -= -%= -|= <<= <<|= >>= &= ^= |=
+ {#header_close#} {#header_close#} -- 2.54.0