Enum ezno_parser::expressions::operators::BinaryOperator
source · pub enum BinaryOperator {
Show 26 variants
Add,
Subtract,
Multiply,
Divide,
Modulo,
Exponent,
BitwiseShiftLeft,
BitwiseShiftRight,
BitwiseShiftRightUnsigned,
BitwiseAnd,
BitwiseXOr,
BitwiseOr,
StrictEqual,
StrictNotEqual,
Equal,
NotEqual,
GreaterThan,
LessThan,
LessThanEqual,
GreaterThanEqual,
LogicalAnd,
LogicalOr,
NullCoalescing,
Divides,
Pipe,
Compose,
}
Expand description
Comma operator is on [crate::MultipleExpression
]
InstanceOf
, In are special operators
Variants§
Add
Subtract
Multiply
Divide
Modulo
Exponent
BitwiseShiftLeft
BitwiseShiftRight
BitwiseShiftRightUnsigned
BitwiseAnd
BitwiseXOr
BitwiseOr
StrictEqual
StrictNotEqual
Equal
NotEqual
GreaterThan
LessThan
LessThanEqual
GreaterThanEqual
LogicalAnd
LogicalOr
NullCoalescing
Divides
Non standard
Pipe
Compose
Implementations§
source§impl BinaryOperator
impl BinaryOperator
pub fn is_non_standard(&self) -> bool
source§impl BinaryOperator
impl BinaryOperator
sourcepub fn is_rhs_conditional_evaluation(&self) -> bool
pub fn is_rhs_conditional_evaluation(&self) -> bool
Operators which return true may or may not evaluate RHS based on their own value
Trait Implementations§
source§impl Clone for BinaryOperator
impl Clone for BinaryOperator
source§fn clone(&self) -> BinaryOperator
fn clone(&self) -> BinaryOperator
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 BinaryOperator
impl Debug for BinaryOperator
source§impl From<BinaryAssignmentOperator> for BinaryOperator
impl From<BinaryAssignmentOperator> for BinaryOperator
source§fn from(val: BinaryAssignmentOperator) -> Self
fn from(val: BinaryAssignmentOperator) -> Self
Converts to this type from the input type.
source§impl Operator for BinaryOperator
impl Operator for BinaryOperator
source§fn precedence(&self) -> u8
fn precedence(&self) -> u8
source§fn associativity_direction(&self) -> AssociativityDirection
fn associativity_direction(&self) -> AssociativityDirection
Returns the associativity of the operator. Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table
source§fn is_associative(&self) -> bool
fn is_associative(&self) -> bool
Is associative with self https://en.wikipedia.org/wiki/Associative_property
fn precedence_and_associativity_direction(&self) -> (u8, AssociativityDirection)
source§impl PartialEq for BinaryOperator
impl PartialEq for BinaryOperator
source§fn eq(&self, other: &BinaryOperator) -> bool
fn eq(&self, other: &BinaryOperator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SelfRustTokenize for BinaryOperator
impl SelfRustTokenize for BinaryOperator
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl Serialize for BinaryOperator
impl Serialize for BinaryOperator
source§impl TryFrom<&TSXToken> for BinaryOperator
impl TryFrom<&TSXToken> for BinaryOperator
source§impl Visitable for BinaryOperator
impl Visitable for BinaryOperator
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _options: &VisitOptions, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _options: &VisitOptions, _chain: &mut Annex<'_, Chain> )
impl Copy for BinaryOperator
impl Eq for BinaryOperator
impl StructuralPartialEq for BinaryOperator
Auto Trait Implementations§
impl Freeze for BinaryOperator
impl RefUnwindSafe for BinaryOperator
impl Send for BinaryOperator
impl Sync for BinaryOperator
impl Unpin for BinaryOperator
impl UnwindSafe for BinaryOperator
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