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