Struct cleaver::fe::ast::Node
[−]
[src]
pub struct Node<I> { pub pos: Position, pub node: I, }
Fields
pos: Position
node: I
Methods
impl Node<Statement>
[src]
fn visit_stmt<'a>(&'a self,
do_stmt: &mut FnMut(&'a Node<Statement>) -> bool)
-> bool
do_stmt: &mut FnMut(&'a Node<Statement>) -> bool)
-> bool
Visit all statements with a given closure.
The given closure is called for each statement with a reference to the
given node. This reference inherits the lifetime of self
. The return
value indicates whether further statements should be visited or not.
Use this method as alternative to the Visitor.
fn visit_expr<'a>(&'a self,
do_expr: &mut FnMut(&'a Node<Expression>) -> bool)
-> bool
do_expr: &mut FnMut(&'a Node<Expression>) -> bool)
-> bool
Visit all expressions with a given closure.
Same as visit_stmt, but for expressions.
impl Node<Expression>
[src]
fn visit_expr<'a>(&'a self,
do_expr: &mut FnMut(&'a Node<Expression>) -> bool)
-> bool
do_expr: &mut FnMut(&'a Node<Expression>) -> bool)
-> bool
Visit all expressions with a given closure.
Same as visit_stmt, but for expressions.
Trait Implementations
impl<I: PartialEq> PartialEq for Node<I>
[src]
fn eq(&self, __arg_0: &Node<I>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Node<I>) -> bool
This method tests for !=
.