pub trait NthToken: TokenSource {
    // Required methods
    fn nth(&mut self, n: usize) -> Self::Kind;
    fn has_nth_preceding_line_break(&mut self, n: usize) -> bool;
}
Expand description

Token source that supports inspecting the ‘nth’ token (lookahead)

Required Methods§

source

fn nth(&mut self, n: usize) -> Self::Kind

Gets the kind of the nth non-trivia token

source

fn has_nth_preceding_line_break(&mut self, n: usize) -> bool

Returns true if the nth non-trivia token is preceded by a line break

Implementors§