Enum boreal_parser::regex::Node
source · pub enum Node {
Alternation(Vec<Node>),
Assertion(AssertionKind),
Class(ClassKind),
Concat(Vec<Node>),
Dot,
Empty,
Literal(u8),
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(u8)
Literal byte.
Group(Box<Node>)
A group, i.e. (…).
Repetition
Fields
§
kind: RepetitionKindKind of repetition.
Repetition of an expression.