• Yury Selivanov's avatar
    Issue #24619: New approach for tokenizing async/await. · 8fb307cd
    Yury Selivanov yazdı
    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()
    8fb307cd
Adı
Son kayıt (commit)
Son güncelleme
..
fixes Loading commit data...
pgen2 Loading commit data...
tests Loading commit data...
Grammar.txt Loading commit data...
PatternGrammar.txt Loading commit data...
__init__.py Loading commit data...
__main__.py Loading commit data...
btm_matcher.py Loading commit data...
btm_utils.py Loading commit data...
fixer_base.py Loading commit data...
fixer_util.py Loading commit data...
main.py Loading commit data...
patcomp.py Loading commit data...
pygram.py Loading commit data...
pytree.py Loading commit data...
refactor.py Loading commit data...