tree-sitter / tree-sitter-python

Python grammar for tree-sitter
MIT License
360 stars 132 forks source link

Support named Unicode escapes #205

Closed tausbn closed 1 year ago

tausbn commented 1 year ago

Adds support for named Unicode escapes, e.g. \N{LATIN SMALL LETTER A}. Previously, these were simply ignored, which worked fine for normal strings, but would break for format strings, as the curly braces would be interpreted as interpolations.

By adding this as a recognised escape sequence, we are able to parse these correctly again.


Fixes #111.

calumgrant commented 1 year ago

I just noticed that octal escapes don't seem to be supported either.