mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
style(syntax): improve formatting (#7349)
Style nit. Adjust formatting.
This commit is contained in:
parent
bf839c1dfa
commit
b5a202711c
1 changed files with 13 additions and 6 deletions
|
|
@ -78,16 +78,20 @@ impl AssignmentOperator {
|
|||
/// Returns `true` for `+=`, `-=`, `*=`, `/=`, `%=`, and `**=`.
|
||||
#[rustfmt::skip]
|
||||
pub fn is_arithmetic(self) -> bool {
|
||||
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
|
||||
| Self::Division | Self::Remainder | Self::Exponential
|
||||
matches!(
|
||||
self,
|
||||
Self::Addition | Self::Subtraction | Self::Multiplication
|
||||
| Self::Division | Self::Remainder | Self::Exponential
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns `true` for `|=`, `^=`, `&=`, `<<=`, `>>=`, and `>>>=`.
|
||||
#[rustfmt::skip]
|
||||
pub fn is_bitwise(self) -> bool {
|
||||
matches!(self, Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
|
||||
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
|
||||
matches!(
|
||||
self,
|
||||
Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
|
||||
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -209,8 +213,11 @@ impl BinaryOperator {
|
|||
/// Returns `true` for arithmetic operators
|
||||
#[rustfmt::skip]
|
||||
pub fn is_arithmetic(self) -> bool {
|
||||
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
|
||||
| Self::Division | Self::Remainder | Self::Exponential)
|
||||
matches!(
|
||||
self,
|
||||
Self::Addition | Self::Subtraction | Self::Multiplication
|
||||
| Self::Division | Self::Remainder | Self::Exponential
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns `true` for multiplication (`*`), division (`/`), and remainder
|
||||
|
|
|
|||
Loading…
Reference in a new issue