Enum regex_syntax::ast::visitor::Frame [−][src]
enum Frame<'a> {
Repetition(&'a Repetition),
Group(&'a Group),
Concat {
head: &'a Ast,
tail: &'a [Ast],
},
Alternation {
head: &'a Ast,
tail: &'a [Ast],
},
}Represents a single stack frame while performing structural induction over
an Ast.
Variants
Repetition(&'a Repetition)A stack frame allocated just before descending into a repetition operator's child node.
Group(&'a Group)A stack frame allocated just before descending into a group's child node.
ConcatThe stack frame used while visiting every child node of a concatenation of expressions.
Fields of Concat
head: &'a Ast | The child node we are currently visiting. |
tail: &'a [Ast] | The remaining child nodes to visit (which may be empty). |
AlternationThe stack frame used while visiting every child node of an alternation of expressions.
Fields of Alternation
head: &'a Ast | The child node we are currently visiting. |
tail: &'a [Ast] | The remaining child nodes to visit (which may be empty). |
Methods
impl<'a> Frame<'a>[src]
impl<'a> Frame<'a>fn child(&self) -> &'a Ast[src]
fn child(&self) -> &'a AstPerform the next inductive step on this frame and return the next child AST node to visit.