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
Asas
DotDot.. range
DotDotEq..= range
Colon:
Methods
impl AssocOp[src] 
impl AssocOppub 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) -> SelfCreate a new AssocOp from ast::BinOpKind.
pub fn precedence(&self) -> usize[src] 
pub fn precedence(&self) -> usizeGets the precedence of this operator
pub fn fixity(&self) -> Fixity[src] 
pub fn fixity(&self) -> FixityGets the fixity of this operator
pub fn is_comparison(&self) -> bool[src] 
pub fn is_comparison(&self) -> boolpub fn is_assign_like(&self) -> bool[src] 
pub fn is_assign_like(&self) -> boolpub 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 AssocOpfn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for AssocOp[src] 
impl PartialEq for AssocOpfn eq(&self, other: &AssocOp) -> bool[src] 
fn eq(&self, other: &AssocOp) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for AssocOp[src] 
impl Eq for AssocOp