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 TsMethodSignature
impl<V: ?Sized + Visit> VisitWith<V> for TsMethodSignature
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 ObjectPatProp
impl<V: ?Sized + Visit> VisitWith<V> for ObjectPatProp
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for NamedExport
impl<V: ?Sized + Visit> VisitWith<V> for NamedExport
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<TsNamespaceBody>
impl<V: ?Sized + Visit> VisitWith<V> for Option<TsNamespaceBody>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ExportDecl
impl<V: ?Sized + Visit> VisitWith<V> for ExportDecl
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 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<TsTypeElement>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<TsTypeElement>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<TsEntityName>
impl<V: ?Sized + Visit> VisitWith<V> for Option<TsEntityName>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ClassProp
impl<V: ?Sized + Visit> VisitWith<V> for ClassProp
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 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 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 CondExpr
impl<V: ?Sized + Visit> VisitWith<V> for CondExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeQuery
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeQuery
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
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 Vec<PropOrSpread>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<PropOrSpread>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsInstantiation
impl<V: ?Sized + Visit> VisitWith<V> for TsInstantiation
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for SwitchStmt
impl<V: ?Sized + Visit> VisitWith<V> for SwitchStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for AssignPat
impl<V: ?Sized + Visit> VisitWith<V> for AssignPat
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for SwitchCase
impl<V: ?Sized + Visit> VisitWith<V> for SwitchCase
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 [Pat]
impl<V: ?Sized + Visit> VisitWith<V> for [Pat]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<Decorator>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<Decorator>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for MetaPropKind
impl<V: ?Sized + Visit> VisitWith<V> for MetaPropKind
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsOptionalType
impl<V: ?Sized + Visit> VisitWith<V> for TsOptionalType
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 Span
impl<V: ?Sized + Visit> VisitWith<V> for Span
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsLitType
impl<V: ?Sized + Visit> VisitWith<V> for TsLitType
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 TsParenthesizedType
impl<V: ?Sized + Visit> VisitWith<V> for TsParenthesizedType
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXOpeningFragment
impl<V: ?Sized + Visit> VisitWith<V> for JSXOpeningFragment
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 ForInStmt
impl<V: ?Sized + Visit> VisitWith<V> for ForInStmt
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 TsImportEqualsDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsImportEqualsDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsConstructorType
impl<V: ?Sized + Visit> VisitWith<V> for TsConstructorType
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParamInstantiation
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParamInstantiation
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<Stmt>>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Box<Stmt>>
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 [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 TsIndexSignature
impl<V: ?Sized + Visit> VisitWith<V> for TsIndexSignature
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParamDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsTypeParamDecl
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 Vec<ClassMember>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<ClassMember>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for UnaryExpr
impl<V: ?Sized + Visit> VisitWith<V> for UnaryExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ClassExpr
impl<V: ?Sized + Visit> VisitWith<V> for ClassExpr
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TplElement
impl<V: ?Sized + Visit> VisitWith<V> for TplElement
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<Box<Expr>>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<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 TsEntityName
impl<V: ?Sized + Visit> VisitWith<V> for TsEntityName
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 ImportNamedSpecifier
impl<V: ?Sized + Visit> VisitWith<V> for ImportNamedSpecifier
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for [ObjectPatProp]
impl<V: ?Sized + Visit> VisitWith<V> for [ObjectPatProp]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for JSXMemberExpr
impl<V: ?Sized + Visit> VisitWith<V> for JSXMemberExpr
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 [TplElement]
impl<V: ?Sized + Visit> VisitWith<V> for [TplElement]
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for BigInt
impl<V: ?Sized + Visit> VisitWith<V> for BigInt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for TsRestType
impl<V: ?Sized + Visit> VisitWith<V> for TsRestType
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for ThrowStmt
impl<V: ?Sized + Visit> VisitWith<V> for ThrowStmt
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<Vec<ModuleItem>>
impl<V: ?Sized + Visit> VisitWith<V> for Option<Vec<ModuleItem>>
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 BlockStmtOrExpr
impl<V: ?Sized + Visit> VisitWith<V> for BlockStmtOrExpr
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 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 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 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 ForOfStmt
impl<V: ?Sized + Visit> VisitWith<V> for ForOfStmt
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 TsCallSignatureDecl
impl<V: ?Sized + Visit> VisitWith<V> for TsCallSignatureDecl
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<BlockStmt>
impl<V: ?Sized + Visit> VisitWith<V> for Option<BlockStmt>
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Vec<TplElement>
impl<V: ?Sized + Visit> VisitWith<V> for Vec<TplElement>
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 ClassMember
impl<V: ?Sized + Visit> VisitWith<V> for ClassMember
fn visit_with(&self, v: &mut V)
fn visit_children_with(&self, _visitor: &mut V)
source§impl<V: ?Sized + Visit> VisitWith<V> for Option<JSXAttrValue>
impl<V: ?Sized + Visit> VisitWith<V> for Option<JSXAttrValue>
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