Trait swc_ecma_visit::VisitWith
source · pub trait VisitWith<V: ?Sized + Visit> {
// Required methods
fn visit_with(&self, v: &mut V);
fn visit_children_with(&self, v: &mut V);
}
Expand description
A utility trait implemented for ast nodes, and allow to visit them with a visitor.
Required Methods§
sourcefn visit_with(&self, v: &mut V)
fn visit_with(&self, v: &mut V)
Calls a visitor method (v.visit_xxx) with self.
sourcefn visit_children_with(&self, v: &mut V)
fn visit_children_with(&self, v: &mut V)
Visit children nodes of self with v
Implementations on Foreign Types§
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsExprWithTypeArgs>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsExprWithTypeArgs>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for UpdateExpr
impl<V: ?Sized + Visit> VisitWith<V> for UpdateExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<VarDeclOrExpr>
impl<V: ?Sized + Visit> VisitWith<V> for Option<VarDeclOrExpr>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<ExportSpecifier>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<ExportSpecifier>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsEnumDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsEnumDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ReservedUnused
impl<V: ?Sized + Visit> VisitWith<V> for ReservedUnused
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for OptChainBase
impl<V: ?Sized + Visit> VisitWith<V> for OptChainBase
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsSetterSignature
impl<V: ?Sized + Visit> VisitWith<V> for TsSetterSignature
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsConstructSignatureDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsConstructSignatureDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Stmt
impl<V: ?Sized + Visit> VisitWith<V> for Stmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsKeywordType
impl<V: ?Sized + Visit> VisitWith<V> for TsKeywordType
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Tpl
impl<V: ?Sized + Visit> VisitWith<V> for Tpl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for UpdateOp
impl<V: ?Sized + Visit> VisitWith<V> for UpdateOp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for MetaPropExpr
impl<V: ?Sized + Visit> VisitWith<V> for MetaPropExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for MethodProp
impl<V: ?Sized + Visit> VisitWith<V> for MethodProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsModuleDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsModuleDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXAttrValue
impl<V: ?Sized + Visit> VisitWith<V> for JSXAttrValue
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [JSXAttrOrSpread]
impl<V: ?Sized + Visit> VisitWith<V> for [JSXAttrOrSpread]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ReturnStmt
impl<V: ?Sized + Visit> VisitWith<V> for ReturnStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AssignPatProp
impl<V: ?Sized + Visit> VisitWith<V> for AssignPatProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsNamespaceBody
impl<V: ?Sized + Visit> VisitWith<V> for TsNamespaceBody
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<Accessibility>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Accessibility>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsThisTypeOrIdent
impl<V: ?Sized + Visit> VisitWith<V> for TsThisTypeOrIdent
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParam
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParam
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ContinueStmt
impl<V: ?Sized + Visit> VisitWith<V> for ContinueStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<Box<Expr>>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Box<Expr>>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ClassDecl
impl<V: ?Sized + Visit> VisitWith<V> for ClassDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ObjectPat
impl<V: ?Sized + Visit> VisitWith<V> for ObjectPat
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ForStmt
impl<V: ?Sized + Visit> VisitWith<V> for ForStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for MemberProp
impl<V: ?Sized + Visit> VisitWith<V> for MemberProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [ExprOrSpread]
impl<V: ?Sized + Visit> VisitWith<V> for [ExprOrSpread]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<Ident>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Ident>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Ident
impl<V: ?Sized + Visit> VisitWith<V> for Ident
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<ModuleExportName>
impl<V: ?Sized + Visit> VisitWith<V> for Option<ModuleExportName>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsFnParam>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsFnParam>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXObject
impl<V: ?Sized + Visit> VisitWith<V> for JSXObject
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [Option<Pat>]
impl<V: ?Sized + Visit> VisitWith<V> for [Option<Pat>]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AwaitExpr
impl<V: ?Sized + Visit> VisitWith<V> for AwaitExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for EmptyStmt
impl<V: ?Sized + Visit> VisitWith<V> for EmptyStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<ImportSpecifier>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<ImportSpecifier>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for BinaryOp
impl<V: ?Sized + Visit> VisitWith<V> for BinaryOp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTupleElement
impl<V: ?Sized + Visit> VisitWith<V> for TsTupleElement
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for NewExpr
impl<V: ?Sized + Visit> VisitWith<V> for NewExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for OptCall
impl<V: ?Sized + Visit> VisitWith<V> for OptCall
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsTypeParam>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsTypeParam>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AssignOp
impl<V: ?Sized + Visit> VisitWith<V> for AssignOp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXClosingFragment
impl<V: ?Sized + Visit> VisitWith<V> for JSXClosingFragment
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXNamespacedName
impl<V: ?Sized + Visit> VisitWith<V> for JSXNamespacedName
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for VarDecl
impl<V: ?Sized + Visit> VisitWith<V> for VarDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsExportAssignment
impl<V: ?Sized + Visit> VisitWith<V> for TsExportAssignment
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsGetterSignature
impl<V: ?Sized + Visit> VisitWith<V> for TsGetterSignature
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsLit
impl<V: ?Sized + Visit> VisitWith<V> for TsLit
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AssignProp
impl<V: ?Sized + Visit> VisitWith<V> for AssignProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for UsingDecl
impl<V: ?Sized + Visit> VisitWith<V> for UsingDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [TsTypeElement]
impl<V: ?Sized + Visit> VisitWith<V> for [TsTypeElement]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Prop
impl<V: ?Sized + Visit> VisitWith<V> for Prop
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeElement
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeElement
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Regex
impl<V: ?Sized + Visit> VisitWith<V> for Regex
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<JSXAttrOrSpread>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<JSXAttrOrSpread>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsFnType
impl<V: ?Sized + Visit> VisitWith<V> for TsFnType
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AssignExpr
impl<V: ?Sized + Visit> VisitWith<V> for AssignExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for FnDecl
impl<V: ?Sized + Visit> VisitWith<V> for FnDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<Span>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Span>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [ExportSpecifier]
impl<V: ?Sized + Visit> VisitWith<V> for [ExportSpecifier]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ParamOrTsParamProp
impl<V: ?Sized + Visit> VisitWith<V> for ParamOrTsParamProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for MethodKind
impl<V: ?Sized + Visit> VisitWith<V> for MethodKind
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXEmptyExpr
impl<V: ?Sized + Visit> VisitWith<V> for JSXEmptyExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<ParamOrTsParamProp>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<ParamOrTsParamProp>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeAssertion
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeAssertion
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeRef
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeRef
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ModuleDecl
impl<V: ?Sized + Visit> VisitWith<V> for ModuleDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXText
impl<V: ?Sized + Visit> VisitWith<V> for JSXText
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [ParamOrTsParamProp]
impl<V: ?Sized + Visit> VisitWith<V> for [ParamOrTsParamProp]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for BinExpr
impl<V: ?Sized + Visit> VisitWith<V> for BinExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for PatOrExpr
impl<V: ?Sized + Visit> VisitWith<V> for PatOrExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for SuperPropExpr
impl<V: ?Sized + Visit> VisitWith<V> for SuperPropExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXAttrName
impl<V: ?Sized + Visit> VisitWith<V> for JSXAttrName
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V, T> VisitWith<V> for Box<T>where
V: ?Sized + Visit,
T: 'static + VisitWith<V>,
impl<V, T> VisitWith<V> for Box<T>where V: ?Sized + Visit, T: 'static + VisitWith<V>,
source§fn visit_children_with(&self, v: &mut V)
fn visit_children_with(&self, v: &mut V)
Visit children nodes of self with v