Skip to content

docs: add ~= to operator precedence table#6056

Open
prql-bot wants to merge 1 commit into
mainfrom
docs/operators-regex-precedence
Open

docs: add ~= to operator precedence table#6056
prql-bot wants to merge 1 commit into
mainfrom
docs/operators-regex-precedence

Conversation

@prql-bot

@prql-bot prql-bot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The ~= (regex search) operator has its own Regex expressions section in operators.md, but was missing from the operator-precedence table at the top of the same page. This adds it to the compare row.

In the parser it is part of operator_compare() (prqlc/prqlc-parser/src/parser/expr.rs:581), so it shares precedence and left-to-right associativity with == != <= >= < > — which is where the table now lists it.

Found during the nightly code-quality survey. No test is included as this is a documentation-only change; the surrounding book examples that use ~= are already exercised by the book's doc-tests in CI.

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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant