Lines Matching refs:tok
10 def shorttok(tok: tokenize.TokenInfo) -> str:
11 return "%-25.25s" % f"{tok.start[0]}.{tok.start[1]}: {token.tok_name[tok.type]}:{tok.string!r}"
37 tok = self.peek()
41 return tok
46 tok = next(self._tokengen)
47 if tok.type in (tokenize.NL, tokenize.COMMENT):
49 if tok.type == token.ERRORTOKEN and tok.string.isspace():
52 tok.type == token.NEWLINE
57 self._tokens.append(tok)
59 self._lines[tok.start[0]] = tok.line
68 for tok in reversed(self._tokens[: self._index]):
69 if tok.type != tokenize.ENDMARKER and (
70 tok.type < tokenize.NEWLINE or tok.type > tokenize.DEDENT
73 return tok
117 tok = self._tokens[self._index - 1]
118 print(f"{fill} {shorttok(tok)}")