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, ObsoleteInPlace, AssignOp(BinOpToken), As, DotDot, DotDotEq, Colon, }
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
=
ObsoleteInPlace
<-
AssignOp(BinOpToken)
?=
where ? is one of the BinOpToken
As
as
DotDot
..
range
DotDotEq
..=
range
Colon
:
Methods
impl AssocOp
[src]
impl AssocOp
pub fn from_token(t: &Token) -> Option<AssocOp>
[src]
pub fn from_token(t: &Token) -> Option<AssocOp>
Create a new AssocOP from a token
pub fn from_ast_binop(op: BinOpKind) -> Self
[src]
pub fn from_ast_binop(op: BinOpKind) -> Self
Create a new AssocOp from ast::BinOpKind.
pub fn precedence(&self) -> usize
[src]
pub fn precedence(&self) -> usize
Gets the precedence of this operator
pub fn fixity(&self) -> Fixity
[src]
pub fn fixity(&self) -> Fixity
Gets the fixity of this operator
pub fn is_comparison(&self) -> bool
[src]
pub fn is_comparison(&self) -> bool
pub fn is_assign_like(&self) -> bool
[src]
pub fn is_assign_like(&self) -> bool
pub fn to_ast_binop(&self) -> Option<BinOpKind>
[src]
pub fn to_ast_binop(&self) -> Option<BinOpKind>
Trait Implementations
impl Debug for AssocOp
[src]
impl Debug for AssocOp
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for AssocOp
[src]
impl PartialEq for AssocOp
fn eq(&self, other: &AssocOp) -> bool
[src]
fn eq(&self, other: &AssocOp) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &AssocOp) -> bool
[src]
fn ne(&self, other: &AssocOp) -> bool
This method tests for !=
.
impl Eq for AssocOp
[src]
impl Eq for AssocOp