pub enum Token<'lex> {
}Expand description
Represents a single unit of code input.
Variants§
LeftParen
Left parenthesis (
RightParen
Right parenthesis )
DocComment(&'lex str)
A series of line comments beginning with ;;,
used to document declared values.
Float(&'lex str)
Floating point literal
Integer(&'lex str, u32)
Integer literal in a given radix
Ratio(&'lex str)
Ratio literal
Char(&'lex str)
Character literal
String(&'lex str)
String literal
Byte(&'lex str)
Byte literal
Bytes(&'lex str)
Byte string literal
Path(&'lex str)
Path literal
Name(&'lex str)
Identifier name
Keyword(&'lex str)
Identifier keyword
BackQuote
Backtick quote `
Comma
Comma ,
CommaAt
Comma followed by at ,@
Quote
Single-quote '
End
End of input stream
Implementations§
Trait Implementations§
impl<'lex> Copy for Token<'lex>
impl<'lex> Eq for Token<'lex>
impl<'lex> StructuralPartialEq for Token<'lex>
Auto Trait Implementations§
impl<'lex> Freeze for Token<'lex>
impl<'lex> RefUnwindSafe for Token<'lex>
impl<'lex> Send for Token<'lex>
impl<'lex> Sync for Token<'lex>
impl<'lex> Unpin for Token<'lex>
impl<'lex> UnsafeUnpin for Token<'lex>
impl<'lex> UnwindSafe for Token<'lex>
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