-
Notifications
You must be signed in to change notification settings - Fork 445
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
error message caret position is slightly off in at least one case #792
Comments
This could be a "fun" one for someone to dig into. It's reasonably self-contained inside of |
Hello! I started taking a look at this, and I have to say that it's a pleasure to read the code. I am learning so much just by reading 👌🏻 . I have a question. When reading the following doc comments I don't understand what is meant by "Similarly for /// Parses the opening of a character class set. This includes the opening
/// bracket along with `^` if present to indicate negation. This also
/// starts parsing the opening set of unioned items if applicable, since
/// there are special rules applied to certain characters in the opening
/// of a character class. For example, `[^]]` is the class of all
/// characters not equal to `]`. (`]` would need to be escaped in any other
/// position.) Similarly for `-`.
///
/// In all cases, the op inside the returned `ast::ClassBracketed` is an
/// empty union. This empty union should be replaced with the actual item
/// when it is popped from the parser's stack.
///
/// This assumes the parser is positioned at the opening `[` and advances
/// the parser to the first non-special byte of the character class.
///
/// An error is returned if EOF is found.
#[inline(never)]
fn parse_set_class_open( This section seems relevant to the issue, so I wanted it to be clear to me. |
From: https://stackoverflow.com/questions/68228762/regex-wont-compile-because-of-unclosed-character-class-in-named-capture-group
Here's what the output looks like:
The positioning of the
^^
in the error message looks off. I think there should be only one^
and it should be under the opening[
.The text was updated successfully, but these errors were encountered: