pub enum Tok {
Num(f64),
Str(String),
Template {
quasis: Vec<String>,
exprs: Vec<String>,
},
Ident(String),
Punct(String),
Eof,
}Expand description
A lexical token.
Variants§
Num(f64)
Str(String)
Template
A template literal: quasis.len() == exprs.len() + 1. Each exprs
entry is the raw source text between ${ and its matching }.
Ident(String)
Punct(String)
An operator or delimiter, e.g. +, ===, =>, (, {, ., ?..
Eof
Trait Implementations§
impl StructuralPartialEq for Tok
Auto Trait Implementations§
impl Freeze for Tok
impl RefUnwindSafe for Tok
impl Send for Tok
impl Sync for Tok
impl Unpin for Tok
impl UnsafeUnpin for Tok
impl UnwindSafe for Tok
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