Commit Graph

7 Commits

Author SHA1 Message Date
harupy c0f390ebc6 Fix IfExp location 2022-12-25 00:33:02 +09:00
harupy ff00460ff4 Fix locations of parethesized expressions 2022-12-18 20:53:30 +09:00
Dimitris Fasarakis Hilliard 6e89b3ab1a Fix end location in with statements. 2022-12-13 13:28:17 +02:00
Jim Fasarakis-Hilliard 6a174dae45 Merge pull request #4327 from harupy/fix-end-location-body
Fix end location of compound statements
2022-12-13 12:30:21 +02:00
Charlie Marsh 8936ab2f8d Set ExprContext::Store on parenthesized with expressions 2022-12-12 09:09:15 -05:00
harupy 06c92bb899 Update snapshot 2022-12-12 22:26:03 +09:00
Anders Kaseorg 052dee72b8 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>
2022-12-12 00:47:33 -08:00