MCPcopy
hub / github.com/psf/black / emit_stashed_lazy

Function emit_stashed_lazy

src/blib2to3/pgen2/tokenize.py:155–168  ·  view source on GitHub ↗
(*, as_keyword: bool)

Source from the content-addressed store, hash-verified

153 stmt_start = True
154
155 def emit_stashed_lazy(*, as_keyword: bool) -> Iterator[TokenInfo]:
156 nonlocal lazy_stashed
157 if lazy_stashed is None:
158 return
159
160 stashed_token, stashed_str, stashed_line = lazy_stashed
161 yield (
162 LAZY if as_keyword else NAME,
163 stashed_str,
164 (stashed_token.start_line, stashed_token.start_col),
165 (stashed_token.end_line, stashed_token.end_col),
166 stashed_line,
167 )
168 lazy_stashed = None
169
170 try:
171 for token in pytokens.tokenize(source):

Callers 1

tokenizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected