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 |
|
As |
|
DotDot |
|
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