[−][src]Trait hinku::TokenStream
Token stream with backtracking support.
Required methods
fn advance(&mut self) -> Option<(T, Span)>
Returns the token and it's span from the current position in the token stream.
fn backtrack(&mut self, n: usize)
Backtracks n
tokens in the stream.
fn commit(&mut self)
Mark the tokens before the current position in the stream as unneeded. The stream cannot be backtracked past this in the future.
Trait Implementations
impl<'a, '_, T> TokenStream<T> for &'_ mut dyn TokenStream<T>
[src]
Implementors
impl<'a, '_, T> TokenStream<T> for &'_ mut dyn TokenStream<T>
[src]
fn advance(&mut self) -> Option<(T, Span)>
[src]
fn backtrack(&mut self, n: usize)
[src]
fn commit(&mut self)
[src]
impl<'a, S, T> TokenStream<T> for SpanningStream<'a, S> where
S: TokenStream<T>,
[src]
S: TokenStream<T>,
fn advance(&mut self) -> Option<(T, Span)>
[src]
fn backtrack(&mut self, n: usize)
[src]
fn commit(&mut self)
[src]
impl<'a, T> TokenStream<T> for BufferedLexer<'a, T> where
T: Logos<'a> + Clone + Debug,
[src]
T: Logos<'a> + Clone + Debug,