MCPcopy Index your code
hub / github.com/python/cpython / getnext

Method getnext

Tools/peg_generator/pegen/tokenizer.py:38–45  ·  view source on GitHub ↗

Return the next token and updates the index.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 11

diagnoseMethod · 0.95
nameMethod · 0.80
numberMethod · 0.80
stringMethod · 0.80
fstring_startMethod · 0.80
fstring_middleMethod · 0.80
fstring_endMethod · 0.80
opMethod · 0.80
type_commentMethod · 0.80
soft_keywordMethod · 0.80
expectMethod · 0.80

Calls 2

peekMethod · 0.95
reportMethod · 0.95

Tested by

no test coverage detected