Struct malk_lexer::TokensRef
[−]
[src]
pub struct TokensRef<'t, 's: 't> { pub tokens: &'t [Token<'s>], pub end: TextPos, }
Fields
tokens: &'t [Token<'s>]
end: TextPos
Methods
impl<'t, 's: 't> TokensRef<'t, 's>
[src]
fn range(&self, start_index: usize, end_index: usize) -> TokensRef<'t, 's>
Slice a range of tokens between start_index
(inclusive) and end_index
(exclusive).
fn range_from(&self, start_index: usize) -> TokensRef<'t, 's>
Slice a range of tokens between start_index
and the end.
fn split_around(&self, index: usize) -> (TokensRef<'t, 's>, TokensRef<'t, 's>)
Split around the token at index
returning all the tokens before it and all the tokens
after it.
fn trim_whitespace(&self) -> TokensRef<'t, 's>
Trim whitespace tokens from both sides.
fn span(&self) -> Span
Get the span of this TokensRef
Trait Implementations
impl<'t, 's: 't> Debug for TokensRef<'t, 's>
[src]
impl<'t, 's: 't> Clone for TokensRef<'t, 's>
[src]
fn clone(&self) -> TokensRef<'t, '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