Returns the next two non-trivia tokens without consuming it. Use [`peek`] to only get the next token. [`peek`]: TokenSource::peek
(&mut self)
| 106 | /// |
| 107 | /// [`peek`]: TokenSource::peek |
| 108 | pub(crate) fn peek2(&mut self) -> (TokenKind, TokenKind) { |
| 109 | let checkpoint = self.lexer.checkpoint(); |
| 110 | let first = self.next_non_trivia_token(); |
| 111 | let second = self.next_non_trivia_token(); |
| 112 | self.lexer.rewind(checkpoint); |
| 113 | (first, second) |
| 114 | } |
| 115 | |
| 116 | /// Bumps the token source to the next non-trivia token. |
| 117 | /// |
nothing calls this directly
no test coverage detected