Struct regex_syntax::ast::parse::NestLimiter [−][src]
A type that traverses a fully parsed Ast and checks whether its depth exceeds the specified nesting limit. If it does, then an error is returned.
Fields
p: &'p ParserI<'s, P>
The parser that is checking the nest limit.
depth: u32
The current depth while walking an Ast.
Methods
impl<'p, 's, P: Borrow<Parser>> NestLimiter<'p, 's, P>
[src]
impl<'p, 's, P: Borrow<Parser>> NestLimiter<'p, 's, P>
fn new(p: &'p ParserI<'s, P>) -> NestLimiter<'p, 's, P>
[src]
fn new(p: &'p ParserI<'s, P>) -> NestLimiter<'p, 's, P>
fn check(self, ast: &Ast) -> Result<(), Error>
[src]
fn check(self, ast: &Ast) -> Result<(), Error>
fn increment_depth(&mut self, span: &Span) -> Result<(), Error>
[src]
fn increment_depth(&mut self, span: &Span) -> Result<(), Error>
fn decrement_depth(&mut self)
[src]
fn decrement_depth(&mut self)
Trait Implementations
impl<'p, 's: 'p, P: Debug + 'p + 's> Debug for NestLimiter<'p, 's, P>
[src]
impl<'p, 's: 'p, P: Debug + 'p + 's> Debug for NestLimiter<'p, 's, P>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'p, 's, P: Borrow<Parser>> Visitor for NestLimiter<'p, 's, P>
[src]
impl<'p, 's, P: Borrow<Parser>> Visitor for NestLimiter<'p, 's, P>
type Output = ()
The result of visiting an AST.
type Err = Error
An error that visiting an AST might return.
fn finish(self) -> Result<(), Error>
[src]
fn finish(self) -> Result<(), Error>
All implementors of Visitor
must provide a finish
method, which yields the result of visiting the AST or an error. Read more
fn visit_pre(&mut self, ast: &Ast) -> Result<(), Error>
[src]
fn visit_pre(&mut self, ast: &Ast) -> Result<(), Error>
This method is called on an Ast
before descending into child Ast
nodes. Read more
fn visit_post(&mut self, ast: &Ast) -> Result<(), Error>
[src]
fn visit_post(&mut self, ast: &Ast) -> Result<(), Error>
This method is called on an Ast
after descending all of its child Ast
nodes. Read more
fn visit_class_set_item_pre(&mut self, ast: &ClassSetItem) -> Result<(), Error>
[src]
fn visit_class_set_item_pre(&mut self, ast: &ClassSetItem) -> Result<(), Error>
This method is called on every ClassSetItem
before descending into child nodes. Read more
fn visit_class_set_item_post(&mut self, ast: &ClassSetItem) -> Result<(), Error>
[src]
fn visit_class_set_item_post(&mut self, ast: &ClassSetItem) -> Result<(), Error>
This method is called on every ClassSetItem
after descending into child nodes. Read more
fn visit_class_set_binary_op_pre(
&mut self,
ast: &ClassSetBinaryOp
) -> Result<(), Error>
[src]
fn visit_class_set_binary_op_pre(
&mut self,
ast: &ClassSetBinaryOp
) -> Result<(), Error>
This method is called on every ClassSetBinaryOp
before descending into child nodes. Read more
fn visit_class_set_binary_op_post(
&mut self,
_ast: &ClassSetBinaryOp
) -> Result<(), Error>
[src]
fn visit_class_set_binary_op_post(
&mut self,
_ast: &ClassSetBinaryOp
) -> Result<(), Error>
This method is called on every ClassSetBinaryOp
after descending into child nodes. Read more
fn start(&mut self)
[src]
fn start(&mut self)
This method is called before beginning traversal of the AST.
fn visit_alternation_in(&mut self) -> Result<(), Self::Err>
[src]
fn visit_alternation_in(&mut self) -> Result<(), Self::Err>
This method is called between child nodes of an Alternation
. Read more
fn visit_class_set_binary_op_in(
&mut self,
_ast: &ClassSetBinaryOp
) -> Result<(), Self::Err>
[src]
fn visit_class_set_binary_op_in(
&mut self,
_ast: &ClassSetBinaryOp
) -> Result<(), Self::Err>
This method is called between the left hand and right hand child nodes of a ClassSetBinaryOp
. Read more
Auto Trait Implementations
impl<'p, 's, P> Send for NestLimiter<'p, 's, P> where
P: Sync,
impl<'p, 's, P> Send for NestLimiter<'p, 's, P> where
P: Sync,
impl<'p, 's, P> Sync for NestLimiter<'p, 's, P> where
P: Sync,
impl<'p, 's, P> Sync for NestLimiter<'p, 's, P> where
P: Sync,