Return the nth token that has not yet been processed.
(&self, n: usize)
| 1774 | |
| 1775 | /// Return the nth token that has not yet been processed. |
| 1776 | fn peek_nth_token(&self, n: usize) -> Option<Token> { |
| 1777 | self.tokens |
| 1778 | .get(self.index + n) |
| 1779 | .map(|token| token.kind.clone()) |
| 1780 | } |
| 1781 | |
| 1782 | /// Return the next token that has not yet been processed, or None if |
| 1783 | /// reached end-of-file, and mark it as processed. OK to call repeatedly |
no test coverage detected