Struct regex_syntax::ast::visitor::HeapVisitor[][src]

struct HeapVisitor<'a> {
    stack: Vec<(&'a Ast, Frame<'a>)>,
    stack_class: Vec<(ClassInduct<'a>, ClassFrame<'a>)>,
}

HeapVisitor visits every item in an Ast recursively using constant stack size and a heap size proportional to the size of the Ast.

Fields

A stack of Ast nodes. This is roughly analogous to the call stack used in a typical recursive visitor.

Similar to the Ast stack above, but is used only for character classes. In particular, character classes embed their own mini recursive syntax.

Methods

impl<'a> HeapVisitor<'a>
[src]

Build a stack frame for the given AST if one is needed (which occurs if and only if there are child nodes in the AST). Otherwise, return None.

If this visits a class, then the underlying visitor implementation may return an error which will be passed on here.

Pops the given frame. If the frame has an additional inductive step, then return it, otherwise return None.

Call the appropriate Visitor methods given an inductive step.

Call the appropriate Visitor methods given an inductive step.

Build a stack frame for the given class node if one is needed (which occurs if and only if there are child nodes). Otherwise, return None.

Pops the given frame. If the frame has an additional inductive step, then return it, otherwise return None.

Auto Trait Implementations

impl<'a> Send for HeapVisitor<'a>

impl<'a> Sync for HeapVisitor<'a>