diff --git a/docsite/site/content/reference/expressions.md b/docsite/site/content/reference/expressions.md index 8435f80..02fc0cd 100644 --- a/docsite/site/content/reference/expressions.md +++ b/docsite/site/content/reference/expressions.md @@ -168,6 +168,32 @@ UCG binary operators follow the typical operator precedence for math. `*` and `/` are higher precendence than `+` and `-` which are higher precedence than any of the comparison operators. +**Precedence table** + +Higher values bind tighter than lower values. + +
Operator | Precedence | Description | +
---|---|---|
== | 1 | Equality Comparison |
!= | 1 | Inequality Comparison |
>= | 1 | Greater Than or Equal |
<= | 1 | Less Than or Equal |
< | 1 | Greater Than |
> | 1 | Less Than |
=~ | 1 | Regex Match |
!~ | 1 | Negated Regex Match |
in | 2 | Contains field or item |
is | 2 | Type check |
+ | 3 | Sum or concatenation |
- | 3 | Subtraction |
* | 4 | Product |
/ | 4 | Division |
%% | 4 | Modulus |
&& | 5 | And |
|| | 5 | Or |
. | 6 | Dot Selector |