Operators

Meta: lead with the precedence table — it's what people scroll back to. Per-operator notes can be terse if the table is precise.

Precedence (low → high)

Precedence follows the DefaultExpr → … → MultiplicativeExpr → Term chain in pkg/dang/dang.peg.

level operators assoc
1 ?? right
2 or left
3 and left
4 ==, != left
5 <, <=, >, >= left
6 +, - left
7 *, /, % left
8 !, - (unary), & (prefix)
9 ., [], () left

Arithmetic

Comparison

Logical

Default (??)

Compound assignment

Cast / type hint: ::

Unary

Meta: it's worth a paragraph on why and/or are keywords (readability) rather than &&/||. Same for != vs <>.