Trait ezno_parser::operators::Operator
source · pub trait Operator: for<'a> TryFrom<&'a TSXToken> {
// Required methods
fn to_str(&self) -> &'static str;
fn precedence(&self) -> u8;
fn associativity_direction(&self) -> AssociativityDirection;
fn is_associative(&self) -> bool;
// Provided method
fn precedence_and_associativity_direction(
&self
) -> (u8, AssociativityDirection) { ... }
}
Required Methods§
sourcefn precedence(&self) -> u8
fn precedence(&self) -> u8
sourcefn 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
sourcefn is_associative(&self) -> bool
fn is_associative(&self) -> bool
Is associative with self https://en.wikipedia.org/wiki/Associative_property