mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
gh-107015: Remove async_hacks from the tokenizer (#107018)
This commit is contained in:
parent
b0202a4e5d
commit
da8f87b7ea
20 changed files with 404 additions and 499 deletions
|
|
@ -102,7 +102,7 @@ class PythonCallMakerVisitor(GrammarVisitor):
|
|||
if name in ("NAME", "NUMBER", "STRING", "OP", "TYPE_COMMENT"):
|
||||
name = name.lower()
|
||||
return name, f"self.{name}()"
|
||||
if name in ("NEWLINE", "DEDENT", "INDENT", "ENDMARKER", "ASYNC", "AWAIT"):
|
||||
if name in ("NEWLINE", "DEDENT", "INDENT", "ENDMARKER"):
|
||||
# Avoid using names that can be Python keywords
|
||||
return "_" + name.lower(), f"self.expect({name!r})"
|
||||
return name, f"self.{name}()"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue