]> git.madduck.net Git - etc/vim.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add support for always tokenizing async/await as keywords
authorBenjamin Woodruff <github@benjam.info>
Wed, 8 May 2019 19:06:44 +0000 (15:06 -0400)
committerŁukasz Langa <lukasz@langa.pl>
Thu, 9 May 2019 15:59:29 +0000 (17:59 +0200)
commitf8617f975d56e81cfb4070ce65584f7b29a77e7a
tree10a5950ea55fc3fd3b38fbb13c1f30f3d95d7c44
parent8c8adedc2a74a494c24f93e405b6418ac32f54cd
Add support for always tokenizing async/await as keywords

Fixes #593

I looked into this bug with @ambv and @carljm, and we reached the
conclusion was that it's not possible for the tokenizer to determine if
async/await is a keyword inside all possible generators without breaking
the grammar for older versions of Python.

Instead, we introduce a new tokenizer mode for Python 3.7+ that will
cause all async/await instances to get parsed as a reserved keyword,
which should fix async/await inside generators.
black.py
blib2to3/pgen2/driver.py
blib2to3/pgen2/driver.pyi
blib2to3/pgen2/tokenize.py
blib2to3/pgen2/tokenize.pyi
tests/data/async_as_identifier.py [new file with mode: 0644]
tests/data/python37.py
tests/test_black.py