-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ExpressionLanguage] Add support for <<
, >>
, and ~
bitwise operators
#58052
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
Conversation
What's the use case? |
The idea it to have all necessary tools to deal with bitfields in expression language. That would allow for example to use bitfields in YAML files thanks to expressions. This is based on an idea from Nicolas, especially for the "binary not". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we already support other binary operators like &
and |
, I'm fine with adding those operators, even if it's only for the sake of completeness.
Thank you @alexandre-daubois. |
This PR was merged into the 7.2 branch. Discussion ---------- [ExpressionLanguage] Use script to generate regex | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | maybe? | New feature? | no | Deprecations? | no | Issues | - | License | MIT Fixes/uses the `generate_operator_regex.php` script for the regex added in #58052 Commits ------- 3fc2f3b [ExpressionLanguage] Use script to generate regex
In order to fully support this idea, I suggest adding to ExpressionLanguage the 3 currently missing bitwise operators, namely left shift, right shift and binary not.