pub enum OperatorPrecedence {
Show 23 variants
Comma = 0,
Yield = 1,
Assignment = 2,
Conditional = 3,
Coalesce = 4,
LogicalOr = 5,
LogicalAnd = 6,
BitwiseOr = 7,
BitwiseXor = 8,
BitwiseAnd = 9,
Equality = 10,
Relational = 11,
Shift = 12,
Additive = 13,
Multiplicative = 14,
Exponential = 15,
Unary = 16,
Update = 17,
NewWithoutArguments = 18,
LeftHandSide = 19,
Member = 20,
Primary = 21,
Group = 22,
}
Expand description
Variants§
Comma = 0
Yield = 1
Assignment = 2
Conditional = 3
Coalesce = 4
LogicalOr = 5
LogicalAnd = 6
BitwiseOr = 7
BitwiseXor = 8
BitwiseAnd = 9
Equality = 10
Relational = 11
Shift = 12
Additive = 13
Multiplicative = 14
Exponential = 15
Unary = 16
Update = 17
NewWithoutArguments = 18
LeftHandSide = 19
Member = 20
Primary = 21
Group = 22
Implementations§
source§impl OperatorPrecedence
impl OperatorPrecedence
sourcepub fn is_right_to_left(&self) -> bool
pub fn is_right_to_left(&self) -> bool
Returns true
if this operator has right to left associativity
sourcepub fn try_from_binary_operator(
kind: JsSyntaxKind
) -> Option<OperatorPrecedence>
pub fn try_from_binary_operator( kind: JsSyntaxKind ) -> Option<OperatorPrecedence>
Returns the precedence for a binary operator token or None if the token isn’t a binary operator
pub const fn is_bitwise(&self) -> bool
pub const fn is_shift(&self) -> bool
pub const fn is_additive(&self) -> bool
pub const fn is_equality(&self) -> bool
pub const fn is_multiplicative(&self) -> bool
pub const fn is_exponential(&self) -> bool
Trait Implementations§
source§impl Clone for OperatorPrecedence
impl Clone for OperatorPrecedence
source§fn clone(&self) -> OperatorPrecedence
fn clone(&self) -> OperatorPrecedence
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OperatorPrecedence
impl Debug for OperatorPrecedence
source§impl Hash for OperatorPrecedence
impl Hash for OperatorPrecedence
source§impl Ord for OperatorPrecedence
impl Ord for OperatorPrecedence
source§fn cmp(&self, other: &OperatorPrecedence) -> Ordering
fn cmp(&self, other: &OperatorPrecedence) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for OperatorPrecedence
impl PartialEq for OperatorPrecedence
source§fn eq(&self, other: &OperatorPrecedence) -> bool
fn eq(&self, other: &OperatorPrecedence) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OperatorPrecedence
impl PartialOrd for OperatorPrecedence
source§fn partial_cmp(&self, other: &OperatorPrecedence) -> Option<Ordering>
fn partial_cmp(&self, other: &OperatorPrecedence) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for OperatorPrecedence
impl Eq for OperatorPrecedence
impl StructuralPartialEq for OperatorPrecedence
Auto Trait Implementations§
impl Freeze for OperatorPrecedence
impl RefUnwindSafe for OperatorPrecedence
impl Send for OperatorPrecedence
impl Sync for OperatorPrecedence
impl Unpin for OperatorPrecedence
impl UnwindSafe for OperatorPrecedence
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.