pub enum Token {
Show 15 variants
Comment,
Constant,
Delim,
Escape,
Field,
Key,
ModuleName,
ModuleItem,
Keyword,
Literal,
Number,
Operator,
StringDelim,
Variable,
Sigil,
}Expand description
Syntactic token
Variants§
Comment
Comment
Constant
Non-numeric, non-string constant such as nil or false
Delim
Delimiter such as (, [, etc
Escape
Escape within a string
Field
Field, e.g. bar in foo.bar
Key
Key such as foo:
ModuleName
Module name
ModuleItem
Module item
Keyword
Keyword such as while, for, do, import
Literal
Literal string, including non-escape, non-interpolated portions of quoted strings
Number
Numeric constant
Operator
Unary or binary operator such as + or -
StringDelim
A string delimeter (")
Variable
A variable
Sigil
A sigil like $ or ...
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin 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