pub enum TokenParseRule {
Precedence(u8),
Postfix(u8),
Binary(u8, u8),
Prefix(u8, u8),
PrefixBinary(u8, u8, u8),
Unary(u8, u8),
}Expand description
What a declared token does when the parser reaches it: its parsing precedence, plus the binding strengths its role needs.
Variants§
Precedence(u8)
(precedence) — takes part only through its precedence.
Postfix(u8)
(precedence)
Binary(u8, u8)
(precedence, binary_strength)
Prefix(u8, u8)
(precedence, operand_strength)
PrefixBinary(u8, u8, u8)
(precedence, binary_strength, unary_strength)
Unary(u8, u8)
(precedence, operand_strength) for a non-operator prefix.
Trait Implementations§
Source§impl Clone for TokenParseRule
impl Clone for TokenParseRule
Source§fn clone(&self) -> TokenParseRule
fn clone(&self) -> TokenParseRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TokenParseRule
Source§impl Debug for TokenParseRule
impl Debug for TokenParseRule
impl Eq for TokenParseRule
Source§impl PartialEq for TokenParseRule
impl PartialEq for TokenParseRule
impl StructuralPartialEq for TokenParseRule
Auto Trait Implementations§
impl Freeze for TokenParseRule
impl RefUnwindSafe for TokenParseRule
impl Send for TokenParseRule
impl Sync for TokenParseRule
impl Unpin for TokenParseRule
impl UnsafeUnpin for TokenParseRule
impl UnwindSafe for TokenParseRule
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