#[non_exhaustive]pub enum CompileError {
Show 16 variants
InnerError(BuildError),
LookBehindNotConst,
VariableLookBehindRequiresFeature,
DfaBuildError(String, String),
InvalidGroupName,
InvalidGroupNameBackref(String),
InvalidBackref(usize),
NamedBackrefOnly,
FeatureNotYetSupported(String),
SubroutineCallTargetNotFound(String, usize),
LeftRecursiveSubroutineCall(String),
NeverEndingRecursion,
PatternTooComplex,
UnexpectedGeneralError(String),
PatternCanNeverMatch,
UnresolvedAstNode(usize, String),
}Expand description
An error as the result of compiling a regex.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InnerError(BuildError)
Regex crate error
LookBehindNotConst
Look-behind assertion without constant size
VariableLookBehindRequiresFeature
Variable-length lookbehind requires feature flag
DfaBuildError(String, String)
Error building reverse DFA (pattern, error)
InvalidGroupName
Couldn’t parse group name
InvalidGroupNameBackref(String)
Invalid group id in escape sequence
InvalidBackref(usize)
Invalid back reference
NamedBackrefOnly
Once named groups are used you cannot refer to groups by number
FeatureNotYetSupported(String)
Feature not supported yet
SubroutineCallTargetNotFound(String, usize)
Subroutine call to non-existent group
LeftRecursiveSubroutineCall(String)
Left-recursive subroutine call detected
NeverEndingRecursion
Unbounded recursive subroutine call detected
PatternTooComplex
The compiled program exceeded the configured maximum size. Subroutine calls are inlined at compile time, so a self- or mutually-recursive pattern can expand without bound even when the recursion-depth cap is respected; this bounds the emitted VM instruction vector instead.
UnexpectedGeneralError(String)
Unexpected general error
PatternCanNeverMatch
The pattern combined with the active options can never produce a match. For example,
setting find_not_empty on a pattern whose analysis shows it can only ever produce
zero-length matches.
UnresolvedAstNode(usize, String)
An unresolved AST node was encountered during analysis (internal error)