Returns the next non-trivia token without consuming it. Use [`peek2`] to get the next two tokens. [`peek2`]: TokenSource::peek2
(&mut self)
| 94 | /// |
| 95 | /// [`peek2`]: TokenSource::peek2 |
| 96 | pub(crate) fn peek(&mut self) -> TokenKind { |
| 97 | let checkpoint = self.lexer.checkpoint(); |
| 98 | let next = self.next_non_trivia_token(); |
| 99 | self.lexer.rewind(checkpoint); |
| 100 | next |
| 101 | } |
| 102 | |
| 103 | /// Returns the next two non-trivia tokens without consuming it. |
| 104 | /// |
nothing calls this directly
no test coverage detected