swc_xml_visit

Trait VisitAstPath

source
pub trait VisitAstPath {
Show 21 methods // Provided methods fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, ) { ... } fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, ) { ... }
}
Available on crate feature path only.
Expand description

A visitor trait for traversing the AST.

Provided Methods§

source

fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type swc_atoms :: Atom.

By default, this method calls [swc_atoms :: Atom::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Attribute.

By default, this method calls [Attribute::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type AttributeToken.

By default, this method calls [AttributeToken::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Vec < AttributeToken >.

By default, this method calls [Vec < AttributeToken >::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Vec < Attribute >.

By default, this method calls [Vec < Attribute >::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type CdataSection.

By default, this method calls [CdataSection::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Child.

By default, this method calls [Child::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Vec < Child >.

By default, this method calls [Vec < Child >::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Comment.

By default, this method calls [Comment::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Document.

By default, this method calls [Document::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type DocumentMode.

By default, this method calls [DocumentMode::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type DocumentType.

By default, this method calls [DocumentType::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Element.

By default, this method calls [Element::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Namespace.

By default, this method calls [Namespace::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Option < swc_atoms :: Atom >.

By default, this method calls [Option < swc_atoms :: Atom >::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Option < Namespace >.

By default, this method calls [Option < Namespace >::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type ProcessingInstruction.

By default, this method calls [ProcessingInstruction::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type swc_common :: Span.

By default, this method calls [swc_common :: Span::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Text.

By default, this method calls [Text::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type Token.

By default, this method calls [Token::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

source

fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, )

Visit a node of type TokenAndSpan.

By default, this method calls [TokenAndSpan::visit_children_with_ast_path]. If you want to recurse, you need to call it manually.

Implementations on Foreign Types§

source§

impl<A, B> VisitAstPath for Either<A, B>

source§

fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, )

source§

impl<V> VisitAstPath for &mut V
where V: ?Sized + VisitAstPath,

source§

fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, )

source§

impl<V> VisitAstPath for Box<V>
where V: ?Sized + VisitAstPath,

source§

fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, )

source§

impl<V> VisitAstPath for Optional<V>
where V: VisitAstPath,

source§

fn visit_atom<'ast: 'r, 'r>( &mut self, node: &'ast Atom, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute<'ast: 'r, 'r>( &mut self, node: &'ast Attribute, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_token<'ast: 'r, 'r>( &mut self, node: &'ast AttributeToken, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attribute_tokens<'ast: 'r, 'r>( &mut self, node: &'ast [AttributeToken], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_attributes<'ast: 'r, 'r>( &mut self, node: &'ast [Attribute], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_cdata_section<'ast: 'r, 'r>( &mut self, node: &'ast CdataSection, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_child<'ast: 'r, 'r>( &mut self, node: &'ast Child, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_childs<'ast: 'r, 'r>( &mut self, node: &'ast [Child], __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_comment<'ast: 'r, 'r>( &mut self, node: &'ast Comment, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document<'ast: 'r, 'r>( &mut self, node: &'ast Document, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_mode<'ast: 'r, 'r>( &mut self, node: &'ast DocumentMode, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_document_type<'ast: 'r, 'r>( &mut self, node: &'ast DocumentType, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_element<'ast: 'r, 'r>( &mut self, node: &'ast Element, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Namespace, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_atom<'ast: 'r, 'r>( &mut self, node: &'ast Option<Atom>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_opt_namespace<'ast: 'r, 'r>( &mut self, node: &'ast Option<Namespace>, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_processing_instruction<'ast: 'r, 'r>( &mut self, node: &'ast ProcessingInstruction, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_span<'ast: 'r, 'r>( &mut self, node: &'ast Span, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_text<'ast: 'r, 'r>( &mut self, node: &'ast Text, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token<'ast: 'r, 'r>( &mut self, node: &'ast Token, __ast_path: &mut AstNodePath<'r>, )

source§

fn visit_token_and_span<'ast: 'r, 'r>( &mut self, node: &'ast TokenAndSpan, __ast_path: &mut AstNodePath<'r>, )

Implementors§