Skip to content

Commit 052dee7

Browse files
committed
Parse Python 3.9+ parenthesized context managers
Since the upstream grammar for this is not LR(1), we abuse LALRPOP macros and the Into/TryInto traits to build a cover grammar that converts to either tuples or `with` items after additional validation. It’s annoying and ugly, but something like this is basically our only option short of switching to a more powerful parser algorithm. Fixes #4145. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent 751f9d3 commit 052dee7

4 files changed

Lines changed: 2413 additions & 86 deletions

File tree

0 commit comments

Comments
 (0)