mirror of
https://github.com/python/cpython
synced 2026-09-28 19:55:29 +03:00
This commit fixes how one-line async-defs and defs are tracked by tokenizer. It allows to correctly parse invalid code such as: >>> async def f(): ... def g(): pass ... async = 10 and valid code such as: >>> async def f(): ... async def g(): pass ... await z As a consequence, is is now possible to have one-line 'async def foo(): await ..' functions: >>> async def foo(): return await bar() |
||
|---|---|---|
| .. | ||
| acceler.c | ||
| asdl.py | ||
| asdl_c.py | ||
| bitset.c | ||
| firstsets.c | ||
| grammar.c | ||
| grammar1.c | ||
| listnode.c | ||
| metagrammar.c | ||
| myreadline.c | ||
| node.c | ||
| parser.c | ||
| parser.h | ||
| parsetok.c | ||
| parsetok_pgen.c | ||
| pgen.c | ||
| pgenmain.c | ||
| printgrammar.c | ||
| Python.asdl | ||
| tokenizer.c | ||
| tokenizer.h | ||
| tokenizer_pgen.c | ||