Trait gluon_base::ast::MutVisitor
source · pub trait MutVisitor<'a, 'ast> {
type Ident: 'a + 'ast;
// Provided methods
fn visit_expr(&mut self, e: &'a mut SpannedExpr<'ast, Self::Ident>) { ... }
fn visit_pattern(&mut self, e: &'a mut SpannedPattern<'ast, Self::Ident>) { ... }
fn visit_spanned_typed_ident(
&mut self,
id: &'a mut SpannedIdent<Self::Ident>
) { ... }
fn visit_ident(&mut self, id: &'a mut TypedIdent<Self::Ident>) { ... }
fn visit_alias(&mut self, alias: &'a mut SpannedAlias<'ast, Self::Ident>) { ... }
fn visit_spanned_ident(&mut self, _: &'a mut Spanned<Self::Ident, BytePos>) { ... }
fn visit_typ(&mut self, _: &'a mut ArcType<Self::Ident>) { ... }
fn visit_ast_type(&mut self, s: &'a mut AstType<'ast, Self::Ident>) { ... }
}
Expand description
Visitor trait which walks over expressions calling visit_*
on all encountered elements. By
default the visit_*
functions just walk the tree. If they are overridden the user will need to
call walk_*
to continue traversing the tree.