docs: add ~= to operator precedence table#6056
Open
prql-bot wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
~=(regex search) operator has its own Regex expressions section inoperators.md, but was missing from the operator-precedence table at the top of the same page. This adds it to thecomparerow.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.