Enum ezno_parser::operators::BinaryOperator
source · pub enum BinaryOperator {
Show 28 variants
StrictEqual,
StrictNotEqual,
Equal,
NotEqual,
Add,
Subtract,
Multiply,
Divide,
Modulo,
Exponent,
GreaterThan,
LessThan,
LessThanEqual,
GreaterThanEqual,
InstanceOf,
In,
BitwiseShiftLeft,
BitwiseShiftRight,
BitwiseShiftRightUnsigned,
BitwiseAnd,
BitwiseXOr,
BitwiseOr,
LogicalAnd,
LogicalOr,
NullCoalescing,
Divides,
Pipe,
Compose,
}
Expand description
Comma operator is on [crate::MultipleExpression]
Variants§
StrictEqual
StrictNotEqual
Equal
NotEqual
Add
Subtract
Multiply
Divide
Modulo
Exponent
GreaterThan
LessThan
LessThanEqual
GreaterThanEqual
InstanceOf
In
BitwiseShiftLeft
BitwiseShiftRight
BitwiseShiftRightUnsigned
BitwiseAnd
BitwiseXOr
BitwiseOr
LogicalAnd
LogicalOr
NullCoalescing
Divides
Non standard
Pipe
Compose
Implementations§
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 TODO might be more
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<BinaryOperator> for BinaryOperator
impl PartialEq<BinaryOperator> 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