mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 15:27:53 +02:00
* Update #4202: Add shift operator bshl and bshr for integers * Add more tests
This commit is contained in:
@ -35,6 +35,7 @@ impl Expression {
|
||||
| Operator::Modulo
|
||||
| Operator::FloorDivision => 95,
|
||||
Operator::Plus | Operator::Minus => 90,
|
||||
Operator::ShiftLeft | Operator::ShiftRight => 85,
|
||||
Operator::NotRegexMatch
|
||||
| Operator::RegexMatch
|
||||
| Operator::StartsWith
|
||||
|
@ -26,6 +26,8 @@ pub enum Operator {
|
||||
Pow,
|
||||
StartsWith,
|
||||
EndsWith,
|
||||
ShiftLeft,
|
||||
ShiftRight,
|
||||
}
|
||||
|
||||
impl Display for Operator {
|
||||
@ -48,6 +50,8 @@ impl Display for Operator {
|
||||
Operator::And => write!(f, "&&"),
|
||||
Operator::Or => write!(f, "||"),
|
||||
Operator::Pow => write!(f, "**"),
|
||||
Operator::ShiftLeft => write!(f, "bshl"),
|
||||
Operator::ShiftRight => write!(f, "bshr"),
|
||||
Operator::LessThanOrEqual => write!(f, "<="),
|
||||
Operator::GreaterThanOrEqual => write!(f, ">="),
|
||||
Operator::StartsWith => write!(f, "starts-with"),
|
||||
|
Reference in New Issue
Block a user