Enum oftlisp::reader::lexer::Lexeme
[−]
[src]
pub enum Lexeme<'a> { BracketClose, BracketOpen, Comment(usize, &'a str), Dot, ParenClose, ParenOpen, Quote, Quasiquote, String(Gc<String>), Symbolish(&'a str), Unquote(bool), }
The unit of lexical syntax.
Variants
BracketClose
An closing bracket.
BracketOpen
An opening bracket.
Comment(usize, &'a str)
A comment. The numeric parameter is the number of "extra" semicolons used.
For example, the comment
;; foo
would become:
Lexeme::Comment(1, " foo")
Dot
A center dot (U+2022), which is used for dotted pairs.
ParenClose
An closing parenthesis.
ParenOpen
An opening parenthesis.
Quote
A single quote.
Quasiquote
A backtick.
String(Gc<String>)
A string.
Symbolish(&'a str)
A symbol or number. The disambiguation is performed when constructing
the CST (the Vec<Value>
).
Unquote(bool)
A comma, possibly followed by an at-sign. The value is true
if ,@
was read, false
for just ,
.
Trait Implementations
impl<'a> Clone for Lexeme<'a>
[src]
fn clone(&self) -> Lexeme<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for Lexeme<'a>
[src]
impl<'a> Eq for Lexeme<'a>
[src]
impl<'a> PartialEq for Lexeme<'a>
[src]
fn eq(&self, __arg_0: &Lexeme<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Lexeme<'a>) -> bool
[src]
This method tests for !=
.