Enum boreal_parser::regex::Node
source · 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
Fields
§
kind: RepetitionKindKind of repetition.
Repetition of an expression.
Trait Implementations§
source§impl PartialEq for Node
impl PartialEq for Node
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
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