From 7432cf0c5a91c73b90a18a6fe333867c9e3b191a Mon Sep 17 00:00:00 2001 From: prql-bot <107324867+prql-bot@users.noreply.github.com> Date: Wed, 1 Jul 2026 07:58:09 +0000 Subject: [PATCH] docs: add `~=` to operator precedence table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `~=` (regex search) operator is parsed at the same precedence as the other comparison operators — it is part of `operator_compare()` in prqlc-parser (expr.rs) alongside `==` `!=` `<=` `>=` `<` `>` — and has its own "Regex expressions" section further down operators.md, but was missing from the operator-precedence table. Co-Authored-By: Claude Opus 4.8 --- web/book/src/reference/syntax/operators.md | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/web/book/src/reference/syntax/operators.md b/web/book/src/reference/syntax/operators.md index f8817e1a5479..35e1646f41c2 100644 --- a/web/book/src/reference/syntax/operators.md +++ b/web/book/src/reference/syntax/operators.md @@ -21,20 +21,20 @@ operations and for function calls (see the discussion below.) -| Group | Operators | Precedence | Associativity | -| -------------: | --------------------------- | :--------: | :-----------: | -| parentheses | `()` | 0 | see below | -| identifier dot | `.` | 1 | | -| unary | `-` `+` `!` `==` | 2 | | -| range | `..` | 3 | | -| pow | `**` | 4 | right-to-left | -| mul | `*` `/` `//` `%` | 5 | left-to-right | -| add | `+` `-` | 6 | left-to-right | -| compare | `==` `!=` `<=` `>=` `<` `>` | 7 | left-to-right | -| coalesce | `??` | 8 | left-to-right | -| and | `&&` | 9 | left-to-right | -| or | \|\| | 10 | left-to-right | -| function call | | 11 | | +| Group | Operators | Precedence | Associativity | +| -------------: | -------------------------------- | :--------: | :-----------: | +| parentheses | `()` | 0 | see below | +| identifier dot | `.` | 1 | | +| unary | `-` `+` `!` `==` | 2 | | +| range | `..` | 3 | | +| pow | `**` | 4 | right-to-left | +| mul | `*` `/` `//` `%` | 5 | left-to-right | +| add | `+` `-` | 6 | left-to-right | +| compare | `==` `!=` `<=` `>=` `~=` `<` `>` | 7 | left-to-right | +| coalesce | `??` | 8 | left-to-right | +| and | `&&` | 9 | left-to-right | +| or | \|\| | 10 | left-to-right | +| function call | | 11 | | ## Division and integer division