-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\p\
interacts poorly with error reporting
#594
Comments
Nice find. Yeah, this is indeed quite odd. It looks like the problem is here: regex/regex-syntax/src/ast/parse.rs Lines 2086 to 2090 in df23d5a
Which is triggered when a I think it is true that a |
This is best explained with examples:
It seems that
\p\
is treated as "whole" for the bracket-based followers, and that error preempts the prior error about the missing Unicode property.Why I noticed this
Trying out tree-sitter, which uses regex-syntax for parsing regex terminals but for some reason preprocesses curly brackets in regex. I wrote the regex
\p{XID_Start}
which it translated into\p\{XID_Start\}
which then gave me the very confusing error ofThe text was updated successfully, but these errors were encountered: