#[non_exhaustive]pub enum Node {
Show 18 variants
Dot,
LineAssertion,
PerlClass,
EscapedLiteral,
EscapedChar {
meta: bool,
},
StdAssertion,
UncountedRepetition,
CountedRepetition(CountedRepetition),
HexEscape,
Alteration,
GroupStart {
name: Option<GroupName>,
flags: Option<Span>,
},
GroupEnd,
SetStart {
negation: Option<Span>,
},
SetEnd,
SetOp,
SetRange,
AsciiClass,
Comment,
}Expand description
Syntax node of a regular expression.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dot
Any char: .
LineAssertion
Zero-length line assertion: ^, $.
PerlClass
Perl character class: \d, \s, \w etc.
EscapedLiteral
Escaped literal with special meaning, such as \n or \t.
EscapedChar
Escaped char without special meaning, such as \*.
StdAssertion
Standard assertion like \A (beginning of the haystack) or \< (start-of-word boundary).
UncountedRepetition
Uncounted repetition, like *, + or ?, with an optional non-greedy marker.
CountedRepetition(CountedRepetition)
Counted repetition, like {3} or {3,5}, with an optional non-greedy marker.
HexEscape
Hexadecimal escape, like \x0C or \u{123}.
Alteration
Alteration char (|).
GroupStart
Group start ( together with optional flags and naming.
Fields
GroupEnd
Group end ).
SetStart
Set start [.
SetEnd
Set end ].
SetOp
Set operation: &&, -- or ~~.
SetRange
Set range char: -.
AsciiClass
ASCII char class, e.g., [:alnum:].
Comment
Comment, e.g., # Test. May span over multiple lines, where comments may be preceded by whitespace
(but no AST nodes).