diff --git a/doc/langref.html.in b/doc/langref.html.in index df9af26b30173ad8dbf4aae164918fd14ee2781b..0a57deea52f9ea3917336304810decddae6516ee 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1906,47 +1906,66 @@ const B = error{Two}; {#code|ambiguous_precedence_orelse.zig#}
- Simplified operator precedence tables are provided below, each tailored to a general group of - operators. For all of the groups shown below, the operators that have higher precedence are - the same, and themselves have the following precedence table: + There is a set of operators (prefix operators, suffix operators, etc) that have unambiguously + higher precedence than all other operators. That set of operators has the following precedence table:
{#syntax#}x() x[] x.y x.* x.?
a!b
x{}
-!x -x -%x ~x &x ?x try{#endsyntax#}
+!x -x -%x ~x &x ?x try
+// lower precedence operators omitted{#endsyntax#}
- For the tables below, the operators that have ambiguous precedence or semantic errors with the - given operators have been omitted, as have operators with higher precedence. - The operators colored red and - blue have ambiguous precedence with the other operators - on the same line. Those colored red also have ambiguous + For the other operators, simplified operator precedence tables are provided below, each containing only + the information that you'll need to know when reading/writing code that uses that particular category of operators. + The operators that have ambiguous precedence or semantic errors with the relevant operators have been omitted, + as have the operators with higher precedence (those shown above). +
+ + + +For arithmetic operators:
-* / *% *| %
+ * / *% *| %
+ - +% -% +| -|
-== != < > <= >=
-and or
+== != < > <= >=
+and or
For bitwise operators:
-<< <<| >> & ^ |
-== != < > <= >=
-and or
+ << <<| >> & ^ |
+== != < > <= >=
+and or
For null and error recovery operators:
-catch orelse
+ catch orelse
For error set operators: