Enum regex_syntax::ErrorKind
[−]
[src]
pub enum ErrorKind { DoubleFlagNegation, DuplicateCaptureName(String), EmptyAlternate, EmptyCaptureName, EmptyFlagNegation, EmptyGroup, InvalidBase10(String), InvalidBase16(String), InvalidCaptureName(String), InvalidClassRange { start: char, end: char, }, InvalidClassEscape(Expr), InvalidRepeatRange { min: u32, max: u32, }, InvalidScalarValue(u32), MissingBase10, RepeaterExpectsExpr, RepeaterUnexpectedExpr(Expr), UnclosedCaptureName(String), UnclosedHex, UnclosedParen, UnclosedRepeat, UnclosedUnicodeName, UnexpectedClassEof, UnexpectedEscapeEof, UnexpectedFlagEof, UnexpectedTwoDigitHexEof, UnopenedParen, UnrecognizedEscape(char), UnrecognizedFlag(char), UnrecognizedUnicodeClass(String), // some variants omitted }
The specific type of parse error that can occur.
Variants
DoubleFlagNegation | A negation symbol is used twice in flag settings.
e.g., | ||||
DuplicateCaptureName | The same capture name was used more than once.
e.g., | ||||
EmptyAlternate | An alternate is empty. e.g., | ||||
EmptyCaptureName | A capture group name is empty. e.g., | ||||
EmptyFlagNegation | A negation symbol was not proceded by any flags. e.g., | ||||
EmptyGroup | A group is empty. e.g., | ||||
InvalidBase10 | An invalid number was used in a counted repetition. e.g., | ||||
InvalidBase16 | An invalid hexadecimal number was used in an escape sequence.
e.g., | ||||
InvalidCaptureName | An invalid capture name was used. e.g., | ||||
InvalidClassRange | An invalid class range was givien. Specifically, when the start of the
range is greater than the end. e.g., Fields
| ||||
InvalidClassEscape | An escape sequence was used in a character class where it is not
allowed. e.g., | ||||
InvalidRepeatRange | An invalid counted repetition min/max was given. e.g., Fields
| ||||
InvalidScalarValue | An invalid Unicode scalar value was used in a long hexadecimal
sequence. e.g., | ||||
MissingBase10 | An empty counted repetition operator. e.g., | ||||
RepeaterExpectsExpr | A repetition operator was not applied to an expression. e.g., | ||||
RepeaterUnexpectedExpr | A repetition operator was applied to an expression that cannot be
repeated. e.g., | ||||
UnclosedCaptureName | A capture group name that is never closed. e.g., | ||||
UnclosedHex | An unclosed hexadecimal literal. e.g., | ||||
UnclosedParen | An unclosed parenthesis. e.g., | ||||
UnclosedRepeat | An unclosed counted repetition operator. e.g., | ||||
UnclosedUnicodeName | An unclosed named Unicode class. e.g., | ||||
UnexpectedClassEof | Saw end of regex before class was closed. e.g., | ||||
UnexpectedEscapeEof | Saw end of regex before escape sequence was closed. e.g., | ||||
UnexpectedFlagEof | Saw end of regex before flags were closed. e.g., | ||||
UnexpectedTwoDigitHexEof | Saw end of regex before two hexadecimal digits were seen. e.g., | ||||
UnopenedParen | Unopened parenthesis. e.g., | ||||
UnrecognizedEscape | Unrecognized escape sequence. e.g., | ||||
UnrecognizedFlag | Unrecognized flag. e.g., | ||||
UnrecognizedUnicodeClass | Unrecognized named Unicode class. e.g., |