Return the next token and updates the index.
(self)
| 36 | self.report(False, False) |
| 37 | |
| 38 | def getnext(self) -> tokenize.TokenInfo: |
| 39 | """Return the next token and updates the index.""" |
| 40 | cached = not self._index == len(self._tokens) |
| 41 | tok = self.peek() |
| 42 | self._index += 1 |
| 43 | if self._verbose: |
| 44 | self.report(cached, False) |
| 45 | return tok |
| 46 | |
| 47 | def peek(self) -> tokenize.TokenInfo: |
| 48 | """Return the next token *without* updating the index.""" |
no test coverage detected