MCPcopy Create free account
hub / github.com/davidblewett/rure-python / auxiliary_span

Method auxiliary_span

regex/regex-syntax/src/ast/mod.rs:66–74  ·  view source on GitHub ↗

Return an auxiliary span. This span exists only for some errors that benefit from being able to point to two locations in the original regular expression. For example, "duplicate" errors will have the main error position set to the duplicate occurrence while its auxiliary span will be set to the initial occurrence.

(&self)

Source from the content-addressed store, hash-verified

64 /// main error position set to the duplicate occurrence while its
65 /// auxiliary span will be set to the initial occurrence.
66 pub fn auxiliary_span(&self) -> Option<&Span> {
67 use self::ErrorKind::*;
68 match self.kind {
69 FlagDuplicate { ref original } => Some(original),
70 FlagRepeatedNegation { ref original, .. } => Some(original),
71 GroupNameDuplicate { ref original, .. } => Some(original),
72 _ => None,
73 }
74 }
75}
76
77/// The type of an error that occurred while building an AST.

Callers 1

fromMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected