pub enum Node {
Alternation(Vec<Node>),
Assertion(AssertionKind),
Class(ClassKind),
Concat(Vec<Node>),
Dot,
Empty,
Literal(Literal),
Char(LiteralChar),
Group(Box<Node>),
Repetition {
node: Box<Node>,
kind: RepetitionKind,
greedy: bool,
},
}
Expand description
AST node of a regular expression.
Variants§
Alternation(Vec<Node>)
Alternation of nodes, ie node|node|...
.
Assertion(AssertionKind)
Zero-width assertion, e.g. ^, \b, …
Class(ClassKind)
Set of allowed values for a single byte.
Concat(Vec<Node>)
Concatenation, must match in order.
Dot
The special .
character.
Empty
Empty expression.
Literal(Literal)
Literal byte.
Char(LiteralChar)
Literal char, not ascii.
Group(Box<Node>)
A group, i.e. (…).
Repetition
Repetition of an expression.
Trait Implementations§
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more