Files
codeql/python/extractor/tests/parser/async-await.py
Taus b4ecc7937d Python: Fix some more async parsing problems
Turns out we were not setting the `is_async` field on anything except
`async for` statements. This commit makes it so that we also do this for
`async def` and `async with`, and adds a test that this produces the
same behaviour as the old parser.
2024-10-28 14:44:02 +00:00

9 lines
147 B
Python

async def foo():
await bar() + await baz()
async with foo() as bar, baz() as quux:
pass
async for spam in eggs:
pass