Struct esparse::lex::Tok
[−]
[src]
pub struct Tok<'f, 's> { pub tt: Tt<'s>, pub span: Span<'f>, pub ws_before: &'s str, pub nl_before: bool, }
A token (an atomic parsing unit).
Tokens have a type represented by the Tt
enumeration. They also have location information and track the whitespace and comments that appeared before them in the source code.
Fields
tt: Tt<'s>
The token type.
span: Span<'f>
The source region this token covers.
ws_before: &'s str
Any whitespace and comments that appeared directly before this token.
nl_before: bool
true
if ws_before
contains a line terminator.
Methods
impl<'f, 's> Tok<'f, 's>
[src]
Trait Implementations
impl<'f, 's> Debug for Tok<'f, 's>
[src]
impl<'f, 's> Clone for Tok<'f, 's>
[src]
fn clone(&self) -> Tok<'f, 's>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'f, 's> Copy for Tok<'f, 's>
[src]
impl<'f, 's> PartialEq for Tok<'f, 's>
[src]
fn eq(&self, __arg_0: &Tok<'f, 's>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tok<'f, 's>) -> bool
This method tests for !=
.