commit | 8fb307cd650511ba019c4493275cb6684ad308bc | [log] [tgz] |
---|---|---|
author | Yury Selivanov <yselivanov@sprymix.com> | Wed Jul 22 13:33:45 2015 +0300 |
committer | Yury Selivanov <yselivanov@sprymix.com> | Wed Jul 22 13:33:45 2015 +0300 |
tree | dc1138644436a3e2c0592f096c6b8d0e47aec5ef | |
parent | 80acc3ebbc4c81f9c1bff864eca076d6bdbe9ec6 [diff] |
Issue #24619: New approach for tokenizing async/await. 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()