Enum syntex_syntax::util::parser::AssocOp [] [src]

pub enum AssocOp {
    Add,
    Subtract,
    Multiply,
    Divide,
    Modulus,
    LAnd,
    LOr,
    BitXor,
    BitAnd,
    BitOr,
    ShiftLeft,
    ShiftRight,
    Equal,
    Less,
    LessEqual,
    NotEqual,
    Greater,
    GreaterEqual,
    Assign,
    Inplace,
    AssignOp(BinOpToken),
    As,
    DotDot,
}

Associative operator with precedence.

This is the enum which specifies operator precedence and fixity to the parser.

Variants

Add

+

Subtract

-

Multiply

*

Divide

/

Modulus

%

LAnd

&&

LOr

||

BitXor

^

BitAnd

&

BitOr

|

ShiftLeft

<<

ShiftRight

>>

Equal

==

Less

<

LessEqual

<=

NotEqual

!=

Greater

>

GreaterEqual

>=

Assign

=

Inplace

<-

AssignOp

?= where ? is one of the BinOpToken

As

as

DotDot

.. range

Methods

impl AssocOp

fn from_token(t: &Token) -> Option<AssocOp>

Create a new AssocOP from a token

fn from_ast_binop(op: BinOp_) -> Self

Create a new AssocOp from ast::BinOp_.

fn precedence(&self) -> usize

Gets the precedence of this operator

fn fixity(&self) -> Fixity

Gets the fixity of this operator

fn is_comparison(&self) -> bool

fn is_assign_like(&self) -> bool

fn to_ast_binop(&self) -> Option<BinOp_>

Trait Implementations

Derived Implementations

impl Eq for AssocOp

impl PartialEq for AssocOp

fn eq(&self, __arg_0: &AssocOp) -> bool

fn ne(&self, __arg_0: &AssocOp) -> bool

impl Debug for AssocOp

fn fmt(&self, __arg_0: &mut Formatter) -> Result