we-like-parsers / pegen

PEG parser generator for Python
https://we-like-parsers.github.io/pegen/
MIT License
150 stars 32 forks source link

Added fstring Test Case and Potential Fix #96

Closed Eric-Vin closed 8 months ago

Eric-Vin commented 8 months ago

There seems to be an fstring case that is incorrect with the current Python grammar. I've added a case to fstrings.py to highlight the behavior. I think the issue is an unnecessary encode in the fstring_format_spec rule, so I removed that, but I'm not sure if that has other implications so I would appreciate any feedback.