X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c86fb362329a2b980ed94200e0652f9c74d56bbd..c6c8ef76a4d991cd8a7a3b00a816b6db72ecdf04:/blib2to3/pgen2/tokenize.py?ds=inline diff --git a/blib2to3/pgen2/tokenize.py b/blib2to3/pgen2/tokenize.py index 9a7664b..1f51ff0 100644 --- a/blib2to3/pgen2/tokenize.py +++ b/blib2to3/pgen2/tokenize.py @@ -516,13 +516,14 @@ def generate_tokens(readline): stashed = tok continue - if token == 'def': + if token in ('def', 'for'): if (stashed and stashed[0] == NAME and stashed[1] == 'async'): - async_def = True - async_def_indent = indents[-1] + if token == 'def': + async_def = True + async_def_indent = indents[-1] yield (ASYNC, stashed[1], stashed[2], stashed[3],