Skip to content
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

Remove sub-expressions from parsing error #396

Merged
merged 3 commits into from
Oct 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions regex-syntax/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1574,9 +1574,8 @@ impl fmt::Display for ErrorKind {
write!(f, "Invalid character class range '{}-{}'. \
Character class ranges must start with the smaller \
character, but {} > {}", start, end, start, end),
InvalidClassEscape(ref e) =>
write!(f, "Invalid escape sequence in character \
class: '{}'.", e),
InvalidClassEscape(_) =>
write!(f, "Invalid escape sequence in character class."),
InvalidRepeatRange { min, max } =>
write!(f, "Invalid counted repetition range: {{{}, {}}}. \
Counted repetition ranges must start with the \
Expand All @@ -1588,9 +1587,8 @@ impl fmt::Display for ErrorKind {
write!(f, "Missing maximum in counted repetition operator."),
RepeaterExpectsExpr =>
write!(f, "Missing expression for repetition operator."),
RepeaterUnexpectedExpr(ref e) =>
write!(f, "Invalid application of repetition operator to: \
'{}'.", e),
RepeaterUnexpectedExpr(_) =>
write!(f, "Invalid application of repetition operator."),
UnclosedCaptureName(ref s) =>
write!(f, "Capture name group for '{}' is not closed. \
(Missing a '>'.)", s),
Expand Down