Enum 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,
    DotDotDot,
    Colon,
}
Unstable (rustc_private)

Associative operator with precedence.

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

Variants

Add
Unstable (rustc_private)

+

Subtract
Unstable (rustc_private)

-

Multiply
Unstable (rustc_private)

*

Divide
Unstable (rustc_private)

/

Modulus
Unstable (rustc_private)

%

LAnd
Unstable (rustc_private)

&&

LOr
Unstable (rustc_private)

||

BitXor
Unstable (rustc_private)

^

BitAnd
Unstable (rustc_private)

&

BitOr
Unstable (rustc_private)

|

ShiftLeft
Unstable (rustc_private)

<<

ShiftRight
Unstable (rustc_private)

>>

Equal
Unstable (rustc_private)

==

Less
Unstable (rustc_private)

<

LessEqual
Unstable (rustc_private)

<=

NotEqual
Unstable (rustc_private)

!=

Greater
Unstable (rustc_private)

>

GreaterEqual
Unstable (rustc_private)

>=

Assign
Unstable (rustc_private)

=

Inplace
Unstable (rustc_private)

<-

AssignOp(BinOpToken)
Unstable (rustc_private)

?= where ? is one of the BinOpToken

As
Unstable (rustc_private)

as

DotDot
Unstable (rustc_private)

.. range

DotDotDot
Unstable (rustc_private)

... range

Colon
Unstable (rustc_private)

:

Methods

impl AssocOp
[src]

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

Unstable (rustc_private)

Create a new AssocOP from a token

fn from_ast_binop(op: BinOpKind) -> Self

Unstable (rustc_private)

Create a new AssocOp from ast::BinOpKind.

fn precedence(&self) -> usize

Unstable (rustc_private)

Gets the precedence of this operator

fn fixity(&self) -> Fixity

Unstable (rustc_private)

Gets the fixity of this operator

fn is_comparison(&self) -> bool

fn is_assign_like(&self) -> bool

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

Trait Implementations

Derived Implementations

impl Eq for AssocOp
[src]

impl PartialEq for AssocOp
[src]

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

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

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

This method tests for !=.

impl Debug for AssocOp
[src]

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

Formats the value using the given formatter.