Trait moore_svlog::mir::Visitor [−][src]
pub trait Visitor<'a> {
Show 24 methods
fn pre_visit_assignment(&mut self, node: &'a Assignment<'a>) -> bool { ... }
fn pre_visit_lvalue(&mut self, node: &'a Lvalue<'a>) -> bool { ... }
fn pre_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>) -> bool { ... }
fn pre_visit_rvalue(&mut self, node: &'a Rvalue<'a>) -> bool { ... }
fn pre_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>) -> bool { ... }
fn pre_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp) -> bool { ... }
fn pre_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp) -> bool { ... }
fn pre_visit_int_unary_arith_op(
&mut self,
node: &'a IntUnaryArithOp
) -> bool { ... }
fn pre_visit_int_binary_arith_op(
&mut self,
node: &'a IntBinaryArithOp
) -> bool { ... }
fn pre_visit_int_comp_op(&mut self, node: &'a IntCompOp) -> bool { ... }
fn pre_visit_string_comp_op(&mut self, node: &'a StringCompOp) -> bool { ... }
fn pre_visit_shift_op(&mut self, node: &'a ShiftOp) -> bool { ... }
fn post_visit_assignment(&mut self, node: &'a Assignment<'a>) { ... }
fn post_visit_lvalue(&mut self, node: &'a Lvalue<'a>) { ... }
fn post_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>) { ... }
fn post_visit_rvalue(&mut self, node: &'a Rvalue<'a>) { ... }
fn post_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>) { ... }
fn post_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp) { ... }
fn post_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp) { ... }
fn post_visit_int_unary_arith_op(&mut self, node: &'a IntUnaryArithOp) { ... }
fn post_visit_int_binary_arith_op(&mut self, node: &'a IntBinaryArithOp) { ... }
fn post_visit_int_comp_op(&mut self, node: &'a IntCompOp) { ... }
fn post_visit_string_comp_op(&mut self, node: &'a StringCompOp) { ... }
fn post_visit_shift_op(&mut self, node: &'a ShiftOp) { ... }
}
Expand description
A visitor.
Use the accept()
function to start visiting nodes. For example:
struct MagicVisitor;
impl Visitor for MagicVisitor {
}
node.accept(&mut MagicVisitor);
Implements the visitor pattern over the following nodes:
Assignment
Lvalue
LvalueKind
Rvalue
RvalueKind
UnaryBitwiseOp
BinaryBitwiseOp
IntUnaryArithOp
IntBinaryArithOp
IntCompOp
StringCompOp
ShiftOp
Provided methods
fn pre_visit_assignment(&mut self, node: &'a Assignment<'a>) -> bool
fn pre_visit_assignment(&mut self, node: &'a Assignment<'a>) -> bool
Called for every Assignment
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_lvalue(&mut self, node: &'a Lvalue<'a>) -> bool
fn pre_visit_lvalue(&mut self, node: &'a Lvalue<'a>) -> bool
Called for every Lvalue
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>) -> bool
fn pre_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>) -> bool
Called for every LvalueKind
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_rvalue(&mut self, node: &'a Rvalue<'a>) -> bool
fn pre_visit_rvalue(&mut self, node: &'a Rvalue<'a>) -> bool
Called for every Rvalue
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>) -> bool
fn pre_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>) -> bool
Called for every RvalueKind
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp) -> bool
fn pre_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp) -> bool
Called for every UnaryBitwiseOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp) -> bool
fn pre_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp) -> bool
Called for every BinaryBitwiseOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_int_unary_arith_op(&mut self, node: &'a IntUnaryArithOp) -> bool
fn pre_visit_int_unary_arith_op(&mut self, node: &'a IntUnaryArithOp) -> bool
Called for every IntUnaryArithOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_int_binary_arith_op(&mut self, node: &'a IntBinaryArithOp) -> bool
fn pre_visit_int_binary_arith_op(&mut self, node: &'a IntBinaryArithOp) -> bool
Called for every IntBinaryArithOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_int_comp_op(&mut self, node: &'a IntCompOp) -> bool
fn pre_visit_int_comp_op(&mut self, node: &'a IntCompOp) -> bool
Called for every IntCompOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_string_comp_op(&mut self, node: &'a StringCompOp) -> bool
fn pre_visit_string_comp_op(&mut self, node: &'a StringCompOp) -> bool
Called for every StringCompOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn pre_visit_shift_op(&mut self, node: &'a ShiftOp) -> bool
fn pre_visit_shift_op(&mut self, node: &'a ShiftOp) -> bool
Called for every ShiftOp
node before visiting its children.
Return false
from this function to not visit the node’s children.
fn post_visit_assignment(&mut self, node: &'a Assignment<'a>)
fn post_visit_assignment(&mut self, node: &'a Assignment<'a>)
Called for every Assignment
node after visiting its children.
fn post_visit_lvalue(&mut self, node: &'a Lvalue<'a>)
fn post_visit_lvalue(&mut self, node: &'a Lvalue<'a>)
Called for every Lvalue
node after visiting its children.
fn post_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>)
fn post_visit_lvalue_kind(&mut self, node: &'a LvalueKind<'a>)
Called for every LvalueKind
node after visiting its children.
fn post_visit_rvalue(&mut self, node: &'a Rvalue<'a>)
fn post_visit_rvalue(&mut self, node: &'a Rvalue<'a>)
Called for every Rvalue
node after visiting its children.
fn post_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>)
fn post_visit_rvalue_kind(&mut self, node: &'a RvalueKind<'a>)
Called for every RvalueKind
node after visiting its children.
fn post_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp)
fn post_visit_unary_bitwise_op(&mut self, node: &'a UnaryBitwiseOp)
Called for every UnaryBitwiseOp
node after visiting its children.
fn post_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp)
fn post_visit_binary_bitwise_op(&mut self, node: &'a BinaryBitwiseOp)
Called for every BinaryBitwiseOp
node after visiting its children.
fn post_visit_int_unary_arith_op(&mut self, node: &'a IntUnaryArithOp)
fn post_visit_int_unary_arith_op(&mut self, node: &'a IntUnaryArithOp)
Called for every IntUnaryArithOp
node after visiting its children.
fn post_visit_int_binary_arith_op(&mut self, node: &'a IntBinaryArithOp)
fn post_visit_int_binary_arith_op(&mut self, node: &'a IntBinaryArithOp)
Called for every IntBinaryArithOp
node after visiting its children.
fn post_visit_int_comp_op(&mut self, node: &'a IntCompOp)
fn post_visit_int_comp_op(&mut self, node: &'a IntCompOp)
Called for every IntCompOp
node after visiting its children.
fn post_visit_string_comp_op(&mut self, node: &'a StringCompOp)
fn post_visit_string_comp_op(&mut self, node: &'a StringCompOp)
Called for every StringCompOp
node after visiting its children.
fn post_visit_shift_op(&mut self, node: &'a ShiftOp)
fn post_visit_shift_op(&mut self, node: &'a ShiftOp)
Called for every ShiftOp
node after visiting its children.