Trait boa::syntax::ast::op::Operator

source ·
pub trait Operator {
    fn get_assoc(&self) -> bool;
    fn get_precedence(&self) -> u64;

    fn get_precedence_and_assoc(&self) -> (u64, bool) { ... }
}
Expand description

Represents an operator

Required Methods

Get the associativity as a boolean that is true if it goes rightwards

Get the precedence as an unsigned integer, where the lower it is, the more precedence/priority it has

Provided Methods

Get the precedence and associativity of this operator

Implementors