Skip to content

🎨 Fix precedence table rendering #19950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 32 additions & 20 deletions reference/formats/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -436,26 +436,38 @@ parentheses in your expressions (e.g. ``(1 + 2) * 4`` or ``1 + (2 * 4)``.
The following table summarizes the operators and their associativity from the
**highest to the lowest precedence**:

======================================================= =============
Operators associativity
======================================================= =============
``-``, ``+`` (unary operators that add the number sign) none
``**`` right
``*``, ``/``, ``%`` left
``not``, ``!`` none
``~`` left
``+``, ``-`` left
``..`` left
``==``, ``===``, ``!=``, ``!==``, \ left
``<``, ``>``, ``>=``, ``<=``, \
``not in``, ``in``, ``contains``, \
``starts with``, ``ends with``, ``matches``
``&`` left
``^`` left
``|`` left
``and``, ``&&`` left
``or``, ``||`` left
======================================================= =============
+----------------------------------------------------------+---------------+
| Operators | Associativity |
+==========================================================+===============+
| ``-`` , ``+`` (unary operators that add the number sign) | none |
+----------------------------------------------------------+---------------+
| ``**`` | right |
+----------------------------------------------------------+---------------+
| ``*``, ``/``, ``%`` | left |
+----------------------------------------------------------+---------------+
| ``not``, ``!`` | none |
+----------------------------------------------------------+---------------+
| ``~`` | left |
+----------------------------------------------------------+---------------+
| ``+``, ``-`` | left |
+----------------------------------------------------------+---------------+
| ``..`` | left |
+----------------------------------------------------------+---------------+
| ``==``, ``===``, ``!=``, ``!==``, | left |
| ``<``, ``>``, ``>=``, ``<=``, | |
| ``not in``, ``in``, ``contains``, | |
| ``starts with``, ``ends with``, ``matches`` | |
+----------------------------------------------------------+---------------+
| ``&`` | left |
+----------------------------------------------------------+---------------+
| ``^`` | left |
+----------------------------------------------------------+---------------+
| ``|`` | left |
+----------------------------------------------------------+---------------+
| ``and``, ``&&`` | left |
+----------------------------------------------------------+---------------+
| ``or``, ``||`` | left |
+----------------------------------------------------------+---------------+

Built-in Objects and Variables
------------------------------
Expand Down
Loading