pub enum Token {
}Expand description
A token that we derive from text
Variants§
None
An empty token with no meaning. These technically shouldn’t appear in the output, but just skip over them.
Whitespace
Any whitespace, such as tabs and newlines
Semicolon
A semicolon (;)
Colon
A colon (:)
Comma
A comma (,)
Pipe
A pipe / bar (|)
At
An at symbol (@)
Bang
An exclamation point (!)
Variable(String)
A variable ($var_name)
Curly(Side)
A curly brace ({ / })
Square(Side)
A square bracket ([ / ])
Paren(Side)
A parenthese (( / ))
Angle(Side)
An angle bracket (< / >)
Comment(String)
A comment
Ident(String)
An identifier (foo)
Num(i64)
An integer number (-12, 6, 128, etc.)
Str(String)
A string literal (“‘hello’ there”)
Implementations§
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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