Enum xxcalc::parser::OperatorAssociativity [] [src]

pub enum OperatorAssociativity {
    Left,
    Right,
}

Defines operator associativity.

If two operators have the same precedence (priority), the order of their evaluation is defined by their associativity. A left-associative operator evaluates a left hand side before evaluating the right hand side. A right-associative operator evaluates a RHS before evaluating LHS.

Variants

Left associativity - a O b O c is evaluated as (a O b) O c

Right associativity - a O b O c is evaluated as a O (b O c)

Trait Implementations

impl PartialEq for OperatorAssociativity
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for OperatorAssociativity
[src]

Formats the value using the given formatter.