pub enum Literal {
Str(String),
Int(i64),
Float(f64),
Bool(bool),
DotCount(i64),
None,
}Expand description
A literal payload carried by a value token. value for STRING/NUMBER/
BOOLEAN/NULL, the dot count for DOT_DOT, the identifier text for IDENTIFIER;
None for everything else.
Variants§
Str(String)
Decoded string content (STRING) or identifier text (IDENTIFIER).
Int(i64)
Integer number literal (the fixture keeps integers as integers).
Float(f64)
Decimal number literal.
Bool(bool)
Boolean keyword literal.
DotCount(i64)
Dot count for a DOT_DOT token.
None
No literal payload.
Trait Implementations§
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnsafeUnpin for Literal
impl UnwindSafe for Literal
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