pub trait VisitMutAstPath {
Show 21 methods
// Provided methods
fn visit_mut_atom(&mut self, node: &mut Atom, __ast_path: &mut AstKindPath) { ... }
fn visit_mut_attribute(
&mut self,
node: &mut Attribute,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_attribute_token(
&mut self,
node: &mut AttributeToken,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_attribute_tokens(
&mut self,
node: &mut Vec<AttributeToken>,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_attributes(
&mut self,
node: &mut Vec<Attribute>,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_cdata_section(
&mut self,
node: &mut CdataSection,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_child(
&mut self,
node: &mut Child,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_childs(
&mut self,
node: &mut Vec<Child>,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_comment(
&mut self,
node: &mut Comment,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_document(
&mut self,
node: &mut Document,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_document_mode(
&mut self,
node: &mut DocumentMode,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_document_type(
&mut self,
node: &mut DocumentType,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_element(
&mut self,
node: &mut Element,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_namespace(
&mut self,
node: &mut Namespace,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_opt_atom(
&mut self,
node: &mut Option<Atom>,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_opt_namespace(
&mut self,
node: &mut Option<Namespace>,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_processing_instruction(
&mut self,
node: &mut ProcessingInstruction,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_span(&mut self, node: &mut Span, __ast_path: &mut AstKindPath) { ... }
fn visit_mut_text(&mut self, node: &mut Text, __ast_path: &mut AstKindPath) { ... }
fn visit_mut_token(
&mut self,
node: &mut Token,
__ast_path: &mut AstKindPath,
) { ... }
fn visit_mut_token_and_span(
&mut self,
node: &mut TokenAndSpan,
__ast_path: &mut AstKindPath,
) { ... }
}path only.Expand description
A visitor trait for traversing the AST.
Provided Methods§
Sourcefn visit_mut_atom(&mut self, node: &mut Atom, __ast_path: &mut AstKindPath)
fn visit_mut_atom(&mut self, node: &mut Atom, __ast_path: &mut AstKindPath)
Visit a node of type swc_atoms :: Atom.
By default, this method calls [swc_atoms :: Atom::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_attribute(
&mut self,
node: &mut Attribute,
__ast_path: &mut AstKindPath,
)
fn visit_mut_attribute( &mut self, node: &mut Attribute, __ast_path: &mut AstKindPath, )
Visit a node of type Attribute.
By default, this method calls [Attribute::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_attribute_token(
&mut self,
node: &mut AttributeToken,
__ast_path: &mut AstKindPath,
)
fn visit_mut_attribute_token( &mut self, node: &mut AttributeToken, __ast_path: &mut AstKindPath, )
Visit a node of type AttributeToken.
By default, this method calls [AttributeToken::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_attribute_tokens(
&mut self,
node: &mut Vec<AttributeToken>,
__ast_path: &mut AstKindPath,
)
fn visit_mut_attribute_tokens( &mut self, node: &mut Vec<AttributeToken>, __ast_path: &mut AstKindPath, )
Visit a node of type Vec < AttributeToken >.
By default, this method calls [Vec < AttributeToken >::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_attributes(
&mut self,
node: &mut Vec<Attribute>,
__ast_path: &mut AstKindPath,
)
fn visit_mut_attributes( &mut self, node: &mut Vec<Attribute>, __ast_path: &mut AstKindPath, )
Visit a node of type Vec < Attribute >.
By default, this method calls [Vec < Attribute >::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_cdata_section(
&mut self,
node: &mut CdataSection,
__ast_path: &mut AstKindPath,
)
fn visit_mut_cdata_section( &mut self, node: &mut CdataSection, __ast_path: &mut AstKindPath, )
Visit a node of type CdataSection.
By default, this method calls [CdataSection::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_child(&mut self, node: &mut Child, __ast_path: &mut AstKindPath)
fn visit_mut_child(&mut self, node: &mut Child, __ast_path: &mut AstKindPath)
Visit a node of type Child.
By default, this method calls [Child::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_childs(
&mut self,
node: &mut Vec<Child>,
__ast_path: &mut AstKindPath,
)
fn visit_mut_childs( &mut self, node: &mut Vec<Child>, __ast_path: &mut AstKindPath, )
Visit a node of type Vec < Child >.
By default, this method calls [Vec < Child >::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_comment(
&mut self,
node: &mut Comment,
__ast_path: &mut AstKindPath,
)
fn visit_mut_comment( &mut self, node: &mut Comment, __ast_path: &mut AstKindPath, )
Visit a node of type Comment.
By default, this method calls [Comment::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_document(
&mut self,
node: &mut Document,
__ast_path: &mut AstKindPath,
)
fn visit_mut_document( &mut self, node: &mut Document, __ast_path: &mut AstKindPath, )
Visit a node of type Document.
By default, this method calls [Document::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_document_mode(
&mut self,
node: &mut DocumentMode,
__ast_path: &mut AstKindPath,
)
fn visit_mut_document_mode( &mut self, node: &mut DocumentMode, __ast_path: &mut AstKindPath, )
Visit a node of type DocumentMode.
By default, this method calls [DocumentMode::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_document_type(
&mut self,
node: &mut DocumentType,
__ast_path: &mut AstKindPath,
)
fn visit_mut_document_type( &mut self, node: &mut DocumentType, __ast_path: &mut AstKindPath, )
Visit a node of type DocumentType.
By default, this method calls [DocumentType::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_element(
&mut self,
node: &mut Element,
__ast_path: &mut AstKindPath,
)
fn visit_mut_element( &mut self, node: &mut Element, __ast_path: &mut AstKindPath, )
Visit a node of type Element.
By default, this method calls [Element::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_namespace(
&mut self,
node: &mut Namespace,
__ast_path: &mut AstKindPath,
)
fn visit_mut_namespace( &mut self, node: &mut Namespace, __ast_path: &mut AstKindPath, )
Visit a node of type Namespace.
By default, this method calls [Namespace::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_opt_atom(
&mut self,
node: &mut Option<Atom>,
__ast_path: &mut AstKindPath,
)
fn visit_mut_opt_atom( &mut self, node: &mut Option<Atom>, __ast_path: &mut AstKindPath, )
Visit a node of type Option < swc_atoms :: Atom >.
By default, this method calls [Option < swc_atoms :: Atom >::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_opt_namespace(
&mut self,
node: &mut Option<Namespace>,
__ast_path: &mut AstKindPath,
)
fn visit_mut_opt_namespace( &mut self, node: &mut Option<Namespace>, __ast_path: &mut AstKindPath, )
Visit a node of type Option < Namespace >.
By default, this method calls [Option < Namespace >::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_processing_instruction(
&mut self,
node: &mut ProcessingInstruction,
__ast_path: &mut AstKindPath,
)
fn visit_mut_processing_instruction( &mut self, node: &mut ProcessingInstruction, __ast_path: &mut AstKindPath, )
Visit a node of type ProcessingInstruction.
By default, this method calls [ProcessingInstruction::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_span(&mut self, node: &mut Span, __ast_path: &mut AstKindPath)
fn visit_mut_span(&mut self, node: &mut Span, __ast_path: &mut AstKindPath)
Visit a node of type swc_common :: Span.
By default, this method calls [swc_common :: Span::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_text(&mut self, node: &mut Text, __ast_path: &mut AstKindPath)
fn visit_mut_text(&mut self, node: &mut Text, __ast_path: &mut AstKindPath)
Visit a node of type Text.
By default, this method calls [Text::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_token(&mut self, node: &mut Token, __ast_path: &mut AstKindPath)
fn visit_mut_token(&mut self, node: &mut Token, __ast_path: &mut AstKindPath)
Visit a node of type Token.
By default, this method calls [Token::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.
Sourcefn visit_mut_token_and_span(
&mut self,
node: &mut TokenAndSpan,
__ast_path: &mut AstKindPath,
)
fn visit_mut_token_and_span( &mut self, node: &mut TokenAndSpan, __ast_path: &mut AstKindPath, )
Visit a node of type TokenAndSpan.
By default, this method calls [TokenAndSpan::visit_mut_children_with_ast_path]. If you want to recurse, you need to call it manually.