pub enum Token {
OpenParen(Loc),
CloseParen(Loc),
Quote(Loc),
Quasiquote(Loc),
Unquote(Loc),
UnquoteSplicing(Loc),
Num(f64, Span),
Str(String, Span),
Sym(String, Span),
}Expand description
The enum that represents a lexical unit of the source code in Rusche.
Variants§
OpenParen(Loc)
Open parenthesis (.
CloseParen(Loc)
Close parenthesis ).
Quote(Loc)
Quote '.
Quasiquote(Loc)
Quasiquote `.
Unquote(Loc)
Unquote ,.
UnquoteSplicing(Loc)
Unquote-splicing ,@.
Num(f64, Span)
A number literal.
Str(String, Span)
A string literal.
Sym(String, Span)
A symbol.
Implementations§
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 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