pub struct Op {
pub infix_binary: Option<InfixBinaryOp>,
pub prefix_unary: Option<PrefixUnaryOp>,
pub postfix_binary: Option<PostfixBinaryOp>,
}
Expand description
Parsing information for an operator.
Fields§
§infix_binary: Option<InfixBinaryOp>
§prefix_unary: Option<PrefixUnaryOp>
§postfix_binary: Option<PostfixBinaryOp>
Implementations§
Source§impl Op
impl Op
pub fn infix_binary( self, precedence: Precedence, associativity: Associativity, name: Option<String>, required_token_ty: Option<TokenType>, ) -> Self
pub fn prefix_unary(self) -> Self
pub fn postfix_binary( self, close_token_ty: TokenType, name: Option<String>, ) -> Self
Sourcepub fn from(ty: TokenType) -> Option<Op>
pub fn from(ty: TokenType) -> Option<Op>
Constructs an operator from the given token type ty
if one exists.
pub fn is_unary_prefix(&self) -> bool
pub fn is_infix_binary(&self) -> bool
pub fn is_postfix_binary(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more