pub trait Fold {
Show 203 methods
// Provided methods
fn fold_array_lit(&mut self, node: ArrayLit) -> ArrayLit { ... }
fn fold_array_pat(&mut self, node: ArrayPat) -> ArrayPat { ... }
fn fold_arrow_expr(&mut self, node: ArrowExpr) -> ArrowExpr { ... }
fn fold_assign_expr(&mut self, node: AssignExpr) -> AssignExpr { ... }
fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { ... }
fn fold_assign_pat(&mut self, node: AssignPat) -> AssignPat { ... }
fn fold_assign_pat_prop(&mut self, node: AssignPatProp) -> AssignPatProp { ... }
fn fold_assign_prop(&mut self, node: AssignProp) -> AssignProp { ... }
fn fold_assign_target(&mut self, node: AssignTarget) -> AssignTarget { ... }
fn fold_assign_target_pat(
&mut self,
node: AssignTargetPat,
) -> AssignTargetPat { ... }
fn fold_atom(&mut self, node: Atom) -> Atom { ... }
fn fold_auto_accessor(&mut self, node: AutoAccessor) -> AutoAccessor { ... }
fn fold_await_expr(&mut self, node: AwaitExpr) -> AwaitExpr { ... }
fn fold_big_int(&mut self, node: BigInt) -> BigInt { ... }
fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { ... }
fn fold_bin_expr(&mut self, node: BinExpr) -> BinExpr { ... }
fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { ... }
fn fold_binding_ident(&mut self, node: BindingIdent) -> BindingIdent { ... }
fn fold_block_stmt(&mut self, node: BlockStmt) -> BlockStmt { ... }
fn fold_block_stmt_or_expr(
&mut self,
node: BlockStmtOrExpr,
) -> BlockStmtOrExpr { ... }
fn fold_bool(&mut self, node: Bool) -> Bool { ... }
fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { ... }
fn fold_call_expr(&mut self, node: CallExpr) -> CallExpr { ... }
fn fold_callee(&mut self, node: Callee) -> Callee { ... }
fn fold_catch_clause(&mut self, node: CatchClause) -> CatchClause { ... }
fn fold_class(&mut self, node: Class) -> Class { ... }
fn fold_class_decl(&mut self, node: ClassDecl) -> ClassDecl { ... }
fn fold_class_expr(&mut self, node: ClassExpr) -> ClassExpr { ... }
fn fold_class_member(&mut self, node: ClassMember) -> ClassMember { ... }
fn fold_class_members(&mut self, node: Vec<ClassMember>) -> Vec<ClassMember> { ... }
fn fold_class_method(&mut self, node: ClassMethod) -> ClassMethod { ... }
fn fold_class_prop(&mut self, node: ClassProp) -> ClassProp { ... }
fn fold_computed_prop_name(
&mut self,
node: ComputedPropName,
) -> ComputedPropName { ... }
fn fold_cond_expr(&mut self, node: CondExpr) -> CondExpr { ... }
fn fold_constructor(&mut self, node: Constructor) -> Constructor { ... }
fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { ... }
fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { ... }
fn fold_decl(&mut self, node: Decl) -> Decl { ... }
fn fold_decorator(&mut self, node: Decorator) -> Decorator { ... }
fn fold_decorators(&mut self, node: Vec<Decorator>) -> Vec<Decorator> { ... }
fn fold_default_decl(&mut self, node: DefaultDecl) -> DefaultDecl { ... }
fn fold_do_while_stmt(&mut self, node: DoWhileStmt) -> DoWhileStmt { ... }
fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { ... }
fn fold_export_all(&mut self, node: ExportAll) -> ExportAll { ... }
fn fold_export_decl(&mut self, node: ExportDecl) -> ExportDecl { ... }
fn fold_export_default_decl(
&mut self,
node: ExportDefaultDecl,
) -> ExportDefaultDecl { ... }
fn fold_export_default_expr(
&mut self,
node: ExportDefaultExpr,
) -> ExportDefaultExpr { ... }
fn fold_export_default_specifier(
&mut self,
node: ExportDefaultSpecifier,
) -> ExportDefaultSpecifier { ... }
fn fold_export_named_specifier(
&mut self,
node: ExportNamedSpecifier,
) -> ExportNamedSpecifier { ... }
fn fold_export_namespace_specifier(
&mut self,
node: ExportNamespaceSpecifier,
) -> ExportNamespaceSpecifier { ... }
fn fold_export_specifier(
&mut self,
node: ExportSpecifier,
) -> ExportSpecifier { ... }
fn fold_export_specifiers(
&mut self,
node: Vec<ExportSpecifier>,
) -> Vec<ExportSpecifier> { ... }
fn fold_expr(&mut self, node: Expr) -> Expr { ... }
fn fold_expr_or_spread(&mut self, node: ExprOrSpread) -> ExprOrSpread { ... }
fn fold_expr_or_spreads(
&mut self,
node: Vec<ExprOrSpread>,
) -> Vec<ExprOrSpread> { ... }
fn fold_expr_stmt(&mut self, node: ExprStmt) -> ExprStmt { ... }
fn fold_exprs(&mut self, node: Vec<Box<Expr>>) -> Vec<Box<Expr>> { ... }
fn fold_fn_decl(&mut self, node: FnDecl) -> FnDecl { ... }
fn fold_fn_expr(&mut self, node: FnExpr) -> FnExpr { ... }
fn fold_for_head(&mut self, node: ForHead) -> ForHead { ... }
fn fold_for_in_stmt(&mut self, node: ForInStmt) -> ForInStmt { ... }
fn fold_for_of_stmt(&mut self, node: ForOfStmt) -> ForOfStmt { ... }
fn fold_for_stmt(&mut self, node: ForStmt) -> ForStmt { ... }
fn fold_function(&mut self, node: Function) -> Function { ... }
fn fold_getter_prop(&mut self, node: GetterProp) -> GetterProp { ... }
fn fold_ident(&mut self, node: Ident) -> Ident { ... }
fn fold_ident_name(&mut self, node: IdentName) -> IdentName { ... }
fn fold_if_stmt(&mut self, node: IfStmt) -> IfStmt { ... }
fn fold_import(&mut self, node: Import) -> Import { ... }
fn fold_import_decl(&mut self, node: ImportDecl) -> ImportDecl { ... }
fn fold_import_default_specifier(
&mut self,
node: ImportDefaultSpecifier,
) -> ImportDefaultSpecifier { ... }
fn fold_import_named_specifier(
&mut self,
node: ImportNamedSpecifier,
) -> ImportNamedSpecifier { ... }
fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { ... }
fn fold_import_specifier(
&mut self,
node: ImportSpecifier,
) -> ImportSpecifier { ... }
fn fold_import_specifiers(
&mut self,
node: Vec<ImportSpecifier>,
) -> Vec<ImportSpecifier> { ... }
fn fold_import_star_as_specifier(
&mut self,
node: ImportStarAsSpecifier,
) -> ImportStarAsSpecifier { ... }
fn fold_import_with(&mut self, node: ImportWith) -> ImportWith { ... }
fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { ... }
fn fold_import_with_items(
&mut self,
node: Vec<ImportWithItem>,
) -> Vec<ImportWithItem> { ... }
fn fold_invalid(&mut self, node: Invalid) -> Invalid { ... }
fn fold_jsx_attr(&mut self, node: JSXAttr) -> JSXAttr { ... }
fn fold_jsx_attr_name(&mut self, node: JSXAttrName) -> JSXAttrName { ... }
fn fold_jsx_attr_or_spread(
&mut self,
node: JSXAttrOrSpread,
) -> JSXAttrOrSpread { ... }
fn fold_jsx_attr_or_spreads(
&mut self,
node: Vec<JSXAttrOrSpread>,
) -> Vec<JSXAttrOrSpread> { ... }
fn fold_jsx_attr_value(&mut self, node: JSXAttrValue) -> JSXAttrValue { ... }
fn fold_jsx_closing_element(
&mut self,
node: JSXClosingElement,
) -> JSXClosingElement { ... }
fn fold_jsx_closing_fragment(
&mut self,
node: JSXClosingFragment,
) -> JSXClosingFragment { ... }
fn fold_jsx_element(&mut self, node: JSXElement) -> JSXElement { ... }
fn fold_jsx_element_child(
&mut self,
node: JSXElementChild,
) -> JSXElementChild { ... }
fn fold_jsx_element_childs(
&mut self,
node: Vec<JSXElementChild>,
) -> Vec<JSXElementChild> { ... }
fn fold_jsx_element_name(&mut self, node: JSXElementName) -> JSXElementName { ... }
fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { ... }
fn fold_jsx_expr(&mut self, node: JSXExpr) -> JSXExpr { ... }
fn fold_jsx_expr_container(
&mut self,
node: JSXExprContainer,
) -> JSXExprContainer { ... }
fn fold_jsx_fragment(&mut self, node: JSXFragment) -> JSXFragment { ... }
fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr) -> JSXMemberExpr { ... }
fn fold_jsx_namespaced_name(
&mut self,
node: JSXNamespacedName,
) -> JSXNamespacedName { ... }
fn fold_jsx_object(&mut self, node: JSXObject) -> JSXObject { ... }
fn fold_jsx_opening_element(
&mut self,
node: JSXOpeningElement,
) -> JSXOpeningElement { ... }
fn fold_jsx_opening_fragment(
&mut self,
node: JSXOpeningFragment,
) -> JSXOpeningFragment { ... }
fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild) -> JSXSpreadChild { ... }
fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { ... }
fn fold_key(&mut self, node: Key) -> Key { ... }
fn fold_key_value_pat_prop(
&mut self,
node: KeyValuePatProp,
) -> KeyValuePatProp { ... }
fn fold_key_value_prop(&mut self, node: KeyValueProp) -> KeyValueProp { ... }
fn fold_labeled_stmt(&mut self, node: LabeledStmt) -> LabeledStmt { ... }
fn fold_lit(&mut self, node: Lit) -> Lit { ... }
fn fold_member_expr(&mut self, node: MemberExpr) -> MemberExpr { ... }
fn fold_member_prop(&mut self, node: MemberProp) -> MemberProp { ... }
fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { ... }
fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { ... }
fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { ... }
fn fold_method_prop(&mut self, node: MethodProp) -> MethodProp { ... }
fn fold_module(&mut self, node: Module) -> Module { ... }
fn fold_module_decl(&mut self, node: ModuleDecl) -> ModuleDecl { ... }
fn fold_module_export_name(
&mut self,
node: ModuleExportName,
) -> ModuleExportName { ... }
fn fold_module_item(&mut self, node: ModuleItem) -> ModuleItem { ... }
fn fold_module_items(&mut self, node: Vec<ModuleItem>) -> Vec<ModuleItem> { ... }
fn fold_named_export(&mut self, node: NamedExport) -> NamedExport { ... }
fn fold_new_expr(&mut self, node: NewExpr) -> NewExpr { ... }
fn fold_null(&mut self, node: Null) -> Null { ... }
fn fold_number(&mut self, node: Number) -> Number { ... }
fn fold_object_lit(&mut self, node: ObjectLit) -> ObjectLit { ... }
fn fold_object_pat(&mut self, node: ObjectPat) -> ObjectPat { ... }
fn fold_object_pat_prop(&mut self, node: ObjectPatProp) -> ObjectPatProp { ... }
fn fold_object_pat_props(
&mut self,
node: Vec<ObjectPatProp>,
) -> Vec<ObjectPatProp> { ... }
fn fold_opt_atom(&mut self, node: Option<Atom>) -> Option<Atom> { ... }
fn fold_opt_block_stmt(
&mut self,
node: Option<BlockStmt>,
) -> Option<BlockStmt> { ... }
fn fold_opt_call(&mut self, node: OptCall) -> OptCall { ... }
fn fold_opt_catch_clause(
&mut self,
node: Option<CatchClause>,
) -> Option<CatchClause> { ... }
fn fold_opt_chain_base(&mut self, node: OptChainBase) -> OptChainBase { ... }
fn fold_opt_chain_expr(&mut self, node: OptChainExpr) -> OptChainExpr { ... }
fn fold_opt_expr(&mut self, node: Option<Box<Expr>>) -> Option<Box<Expr>> { ... }
fn fold_opt_expr_or_spread(
&mut self,
node: Option<ExprOrSpread>,
) -> Option<ExprOrSpread> { ... }
fn fold_opt_expr_or_spreads(
&mut self,
node: Option<Vec<ExprOrSpread>>,
) -> Option<Vec<ExprOrSpread>> { ... }
fn fold_opt_ident(&mut self, node: Option<Ident>) -> Option<Ident> { ... }
fn fold_opt_jsx_attr_value(
&mut self,
node: Option<JSXAttrValue>,
) -> Option<JSXAttrValue> { ... }
fn fold_opt_jsx_closing_element(
&mut self,
node: Option<JSXClosingElement>,
) -> Option<JSXClosingElement> { ... }
fn fold_opt_module_export_name(
&mut self,
node: Option<ModuleExportName>,
) -> Option<ModuleExportName> { ... }
fn fold_opt_object_lit(
&mut self,
node: Option<Box<ObjectLit>>,
) -> Option<Box<ObjectLit>> { ... }
fn fold_opt_pat(&mut self, node: Option<Pat>) -> Option<Pat> { ... }
fn fold_opt_span(&mut self, node: Option<Span>) -> Option<Span> { ... }
fn fold_opt_stmt(&mut self, node: Option<Box<Stmt>>) -> Option<Box<Stmt>> { ... }
fn fold_opt_str(&mut self, node: Option<Box<Str>>) -> Option<Box<Str>> { ... }
fn fold_opt_var_decl_or_expr(
&mut self,
node: Option<VarDeclOrExpr>,
) -> Option<VarDeclOrExpr> { ... }
fn fold_opt_vec_expr_or_spreads(
&mut self,
node: Vec<Option<ExprOrSpread>>,
) -> Vec<Option<ExprOrSpread>> { ... }
fn fold_opt_vec_pats(&mut self, node: Vec<Option<Pat>>) -> Vec<Option<Pat>> { ... }
fn fold_param(&mut self, node: Param) -> Param { ... }
fn fold_param_or_ts_param_prop(
&mut self,
node: ParamOrTsParamProp,
) -> ParamOrTsParamProp { ... }
fn fold_param_or_ts_param_props(
&mut self,
node: Vec<ParamOrTsParamProp>,
) -> Vec<ParamOrTsParamProp> { ... }
fn fold_params(&mut self, node: Vec<Param>) -> Vec<Param> { ... }
fn fold_paren_expr(&mut self, node: ParenExpr) -> ParenExpr { ... }
fn fold_pat(&mut self, node: Pat) -> Pat { ... }
fn fold_pats(&mut self, node: Vec<Pat>) -> Vec<Pat> { ... }
fn fold_private_method(&mut self, node: PrivateMethod) -> PrivateMethod { ... }
fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { ... }
fn fold_private_prop(&mut self, node: PrivateProp) -> PrivateProp { ... }
fn fold_program(&mut self, node: Program) -> Program { ... }
fn fold_prop(&mut self, node: Prop) -> Prop { ... }
fn fold_prop_name(&mut self, node: PropName) -> PropName { ... }
fn fold_prop_or_spread(&mut self, node: PropOrSpread) -> PropOrSpread { ... }
fn fold_prop_or_spreads(
&mut self,
node: Vec<PropOrSpread>,
) -> Vec<PropOrSpread> { ... }
fn fold_regex(&mut self, node: Regex) -> Regex { ... }
fn fold_rest_pat(&mut self, node: RestPat) -> RestPat { ... }
fn fold_return_stmt(&mut self, node: ReturnStmt) -> ReturnStmt { ... }
fn fold_script(&mut self, node: Script) -> Script { ... }
fn fold_seq_expr(&mut self, node: SeqExpr) -> SeqExpr { ... }
fn fold_setter_prop(&mut self, node: SetterProp) -> SetterProp { ... }
fn fold_simple_assign_target(
&mut self,
node: SimpleAssignTarget,
) -> SimpleAssignTarget { ... }
fn fold_span(&mut self, node: Span) -> Span { ... }
fn fold_spread_element(&mut self, node: SpreadElement) -> SpreadElement { ... }
fn fold_static_block(&mut self, node: StaticBlock) -> StaticBlock { ... }
fn fold_stmt(&mut self, node: Stmt) -> Stmt { ... }
fn fold_stmts(&mut self, node: Vec<Stmt>) -> Vec<Stmt> { ... }
fn fold_str(&mut self, node: Str) -> Str { ... }
fn fold_super(&mut self, node: Super) -> Super { ... }
fn fold_super_prop(&mut self, node: SuperProp) -> SuperProp { ... }
fn fold_super_prop_expr(&mut self, node: SuperPropExpr) -> SuperPropExpr { ... }
fn fold_switch_case(&mut self, node: SwitchCase) -> SwitchCase { ... }
fn fold_switch_cases(&mut self, node: Vec<SwitchCase>) -> Vec<SwitchCase> { ... }
fn fold_switch_stmt(&mut self, node: SwitchStmt) -> SwitchStmt { ... }
fn fold_syntax_context(&mut self, node: SyntaxContext) -> SyntaxContext { ... }
fn fold_tagged_tpl(&mut self, node: TaggedTpl) -> TaggedTpl { ... }
fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { ... }
fn fold_throw_stmt(&mut self, node: ThrowStmt) -> ThrowStmt { ... }
fn fold_tpl(&mut self, node: Tpl) -> Tpl { ... }
fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { ... }
fn fold_tpl_elements(&mut self, node: Vec<TplElement>) -> Vec<TplElement> { ... }
fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { ... }
fn fold_try_stmt(&mut self, node: TryStmt) -> TryStmt { ... }
fn fold_unary_expr(&mut self, node: UnaryExpr) -> UnaryExpr { ... }
fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { ... }
fn fold_update_expr(&mut self, node: UpdateExpr) -> UpdateExpr { ... }
fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { ... }
fn fold_using_decl(&mut self, node: UsingDecl) -> UsingDecl { ... }
fn fold_var_decl(&mut self, node: VarDecl) -> VarDecl { ... }
fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { ... }
fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr) -> VarDeclOrExpr { ... }
fn fold_var_declarator(&mut self, node: VarDeclarator) -> VarDeclarator { ... }
fn fold_var_declarators(
&mut self,
node: Vec<VarDeclarator>,
) -> Vec<VarDeclarator> { ... }
fn fold_while_stmt(&mut self, node: WhileStmt) -> WhileStmt { ... }
fn fold_with_stmt(&mut self, node: WithStmt) -> WithStmt { ... }
fn fold_yield_expr(&mut self, node: YieldExpr) -> YieldExpr { ... }
}
Expand description
A visitor trait for traversing the AST.
Provided Methods§
sourcefn fold_array_lit(&mut self, node: ArrayLit) -> ArrayLit
fn fold_array_lit(&mut self, node: ArrayLit) -> ArrayLit
Visit a node of type ArrayLit
.
By default, this method calls [ArrayLit::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_array_pat(&mut self, node: ArrayPat) -> ArrayPat
fn fold_array_pat(&mut self, node: ArrayPat) -> ArrayPat
Visit a node of type ArrayPat
.
By default, this method calls [ArrayPat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_arrow_expr(&mut self, node: ArrowExpr) -> ArrowExpr
fn fold_arrow_expr(&mut self, node: ArrowExpr) -> ArrowExpr
Visit a node of type ArrowExpr
.
By default, this method calls [ArrowExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_expr(&mut self, node: AssignExpr) -> AssignExpr
fn fold_assign_expr(&mut self, node: AssignExpr) -> AssignExpr
Visit a node of type AssignExpr
.
By default, this method calls [AssignExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_op(&mut self, node: AssignOp) -> AssignOp
fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp
Visit a node of type AssignOp
.
By default, this method calls [AssignOp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_pat(&mut self, node: AssignPat) -> AssignPat
fn fold_assign_pat(&mut self, node: AssignPat) -> AssignPat
Visit a node of type AssignPat
.
By default, this method calls [AssignPat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_pat_prop(&mut self, node: AssignPatProp) -> AssignPatProp
fn fold_assign_pat_prop(&mut self, node: AssignPatProp) -> AssignPatProp
Visit a node of type AssignPatProp
.
By default, this method calls [AssignPatProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_prop(&mut self, node: AssignProp) -> AssignProp
fn fold_assign_prop(&mut self, node: AssignProp) -> AssignProp
Visit a node of type AssignProp
.
By default, this method calls [AssignProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_target(&mut self, node: AssignTarget) -> AssignTarget
fn fold_assign_target(&mut self, node: AssignTarget) -> AssignTarget
Visit a node of type AssignTarget
.
By default, this method calls [AssignTarget::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_assign_target_pat(&mut self, node: AssignTargetPat) -> AssignTargetPat
fn fold_assign_target_pat(&mut self, node: AssignTargetPat) -> AssignTargetPat
Visit a node of type AssignTargetPat
.
By default, this method calls [AssignTargetPat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_atom(&mut self, node: Atom) -> Atom
fn fold_atom(&mut self, node: Atom) -> Atom
Visit a node of type swc_atoms :: Atom
.
By default, this method calls [swc_atoms :: Atom::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_auto_accessor(&mut self, node: AutoAccessor) -> AutoAccessor
fn fold_auto_accessor(&mut self, node: AutoAccessor) -> AutoAccessor
Visit a node of type AutoAccessor
.
By default, this method calls [AutoAccessor::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_await_expr(&mut self, node: AwaitExpr) -> AwaitExpr
fn fold_await_expr(&mut self, node: AwaitExpr) -> AwaitExpr
Visit a node of type AwaitExpr
.
By default, this method calls [AwaitExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_big_int(&mut self, node: BigInt) -> BigInt
fn fold_big_int(&mut self, node: BigInt) -> BigInt
Visit a node of type BigInt
.
By default, this method calls [BigInt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue
fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue
Visit a node of type BigIntValue
.
By default, this method calls BigIntValue::fold_children_with
. If you want to recurse, you need to call it manually.
sourcefn fold_bin_expr(&mut self, node: BinExpr) -> BinExpr
fn fold_bin_expr(&mut self, node: BinExpr) -> BinExpr
Visit a node of type BinExpr
.
By default, this method calls [BinExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp
fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp
Visit a node of type BinaryOp
.
By default, this method calls [BinaryOp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_binding_ident(&mut self, node: BindingIdent) -> BindingIdent
fn fold_binding_ident(&mut self, node: BindingIdent) -> BindingIdent
Visit a node of type BindingIdent
.
By default, this method calls [BindingIdent::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_block_stmt(&mut self, node: BlockStmt) -> BlockStmt
fn fold_block_stmt(&mut self, node: BlockStmt) -> BlockStmt
Visit a node of type BlockStmt
.
By default, this method calls [BlockStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr) -> BlockStmtOrExpr
fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr) -> BlockStmtOrExpr
Visit a node of type BlockStmtOrExpr
.
By default, this method calls [BlockStmtOrExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_bool(&mut self, node: Bool) -> Bool
fn fold_bool(&mut self, node: Bool) -> Bool
Visit a node of type Bool
.
By default, this method calls [Bool::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt
fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt
Visit a node of type BreakStmt
.
By default, this method calls [BreakStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_call_expr(&mut self, node: CallExpr) -> CallExpr
fn fold_call_expr(&mut self, node: CallExpr) -> CallExpr
Visit a node of type CallExpr
.
By default, this method calls [CallExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_callee(&mut self, node: Callee) -> Callee
fn fold_callee(&mut self, node: Callee) -> Callee
Visit a node of type Callee
.
By default, this method calls [Callee::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_catch_clause(&mut self, node: CatchClause) -> CatchClause
fn fold_catch_clause(&mut self, node: CatchClause) -> CatchClause
Visit a node of type CatchClause
.
By default, this method calls [CatchClause::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class(&mut self, node: Class) -> Class
fn fold_class(&mut self, node: Class) -> Class
Visit a node of type Class
.
By default, this method calls [Class::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_decl(&mut self, node: ClassDecl) -> ClassDecl
fn fold_class_decl(&mut self, node: ClassDecl) -> ClassDecl
Visit a node of type ClassDecl
.
By default, this method calls [ClassDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_expr(&mut self, node: ClassExpr) -> ClassExpr
fn fold_class_expr(&mut self, node: ClassExpr) -> ClassExpr
Visit a node of type ClassExpr
.
By default, this method calls [ClassExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_member(&mut self, node: ClassMember) -> ClassMember
fn fold_class_member(&mut self, node: ClassMember) -> ClassMember
Visit a node of type ClassMember
.
By default, this method calls [ClassMember::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_members(&mut self, node: Vec<ClassMember>) -> Vec<ClassMember>
fn fold_class_members(&mut self, node: Vec<ClassMember>) -> Vec<ClassMember>
Visit a node of type Vec < ClassMember >
.
By default, this method calls [Vec < ClassMember >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_method(&mut self, node: ClassMethod) -> ClassMethod
fn fold_class_method(&mut self, node: ClassMethod) -> ClassMethod
Visit a node of type ClassMethod
.
By default, this method calls [ClassMethod::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_class_prop(&mut self, node: ClassProp) -> ClassProp
fn fold_class_prop(&mut self, node: ClassProp) -> ClassProp
Visit a node of type ClassProp
.
By default, this method calls [ClassProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_computed_prop_name(
&mut self,
node: ComputedPropName,
) -> ComputedPropName
fn fold_computed_prop_name( &mut self, node: ComputedPropName, ) -> ComputedPropName
Visit a node of type ComputedPropName
.
By default, this method calls [ComputedPropName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_cond_expr(&mut self, node: CondExpr) -> CondExpr
fn fold_cond_expr(&mut self, node: CondExpr) -> CondExpr
Visit a node of type CondExpr
.
By default, this method calls [CondExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_constructor(&mut self, node: Constructor) -> Constructor
fn fold_constructor(&mut self, node: Constructor) -> Constructor
Visit a node of type Constructor
.
By default, this method calls [Constructor::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt
fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt
Visit a node of type ContinueStmt
.
By default, this method calls [ContinueStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt
fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt
Visit a node of type DebuggerStmt
.
By default, this method calls [DebuggerStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_decl(&mut self, node: Decl) -> Decl
fn fold_decl(&mut self, node: Decl) -> Decl
Visit a node of type Decl
.
By default, this method calls [Decl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_decorator(&mut self, node: Decorator) -> Decorator
fn fold_decorator(&mut self, node: Decorator) -> Decorator
Visit a node of type Decorator
.
By default, this method calls [Decorator::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_decorators(&mut self, node: Vec<Decorator>) -> Vec<Decorator>
fn fold_decorators(&mut self, node: Vec<Decorator>) -> Vec<Decorator>
Visit a node of type Vec < Decorator >
.
By default, this method calls [Vec < Decorator >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_default_decl(&mut self, node: DefaultDecl) -> DefaultDecl
fn fold_default_decl(&mut self, node: DefaultDecl) -> DefaultDecl
Visit a node of type DefaultDecl
.
By default, this method calls [DefaultDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_do_while_stmt(&mut self, node: DoWhileStmt) -> DoWhileStmt
fn fold_do_while_stmt(&mut self, node: DoWhileStmt) -> DoWhileStmt
Visit a node of type DoWhileStmt
.
By default, this method calls [DoWhileStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt
fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt
Visit a node of type EmptyStmt
.
By default, this method calls [EmptyStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_all(&mut self, node: ExportAll) -> ExportAll
fn fold_export_all(&mut self, node: ExportAll) -> ExportAll
Visit a node of type ExportAll
.
By default, this method calls [ExportAll::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_decl(&mut self, node: ExportDecl) -> ExportDecl
fn fold_export_decl(&mut self, node: ExportDecl) -> ExportDecl
Visit a node of type ExportDecl
.
By default, this method calls [ExportDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_default_decl(
&mut self,
node: ExportDefaultDecl,
) -> ExportDefaultDecl
fn fold_export_default_decl( &mut self, node: ExportDefaultDecl, ) -> ExportDefaultDecl
Visit a node of type ExportDefaultDecl
.
By default, this method calls [ExportDefaultDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_default_expr(
&mut self,
node: ExportDefaultExpr,
) -> ExportDefaultExpr
fn fold_export_default_expr( &mut self, node: ExportDefaultExpr, ) -> ExportDefaultExpr
Visit a node of type ExportDefaultExpr
.
By default, this method calls [ExportDefaultExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_default_specifier(
&mut self,
node: ExportDefaultSpecifier,
) -> ExportDefaultSpecifier
fn fold_export_default_specifier( &mut self, node: ExportDefaultSpecifier, ) -> ExportDefaultSpecifier
Visit a node of type ExportDefaultSpecifier
.
By default, this method calls [ExportDefaultSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_named_specifier(
&mut self,
node: ExportNamedSpecifier,
) -> ExportNamedSpecifier
fn fold_export_named_specifier( &mut self, node: ExportNamedSpecifier, ) -> ExportNamedSpecifier
Visit a node of type ExportNamedSpecifier
.
By default, this method calls [ExportNamedSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_namespace_specifier(
&mut self,
node: ExportNamespaceSpecifier,
) -> ExportNamespaceSpecifier
fn fold_export_namespace_specifier( &mut self, node: ExportNamespaceSpecifier, ) -> ExportNamespaceSpecifier
Visit a node of type ExportNamespaceSpecifier
.
By default, this method calls [ExportNamespaceSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_specifier(&mut self, node: ExportSpecifier) -> ExportSpecifier
fn fold_export_specifier(&mut self, node: ExportSpecifier) -> ExportSpecifier
Visit a node of type ExportSpecifier
.
By default, this method calls [ExportSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_export_specifiers(
&mut self,
node: Vec<ExportSpecifier>,
) -> Vec<ExportSpecifier>
fn fold_export_specifiers( &mut self, node: Vec<ExportSpecifier>, ) -> Vec<ExportSpecifier>
Visit a node of type Vec < ExportSpecifier >
.
By default, this method calls [Vec < ExportSpecifier >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_expr(&mut self, node: Expr) -> Expr
fn fold_expr(&mut self, node: Expr) -> Expr
Visit a node of type Expr
.
By default, this method calls [Expr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_expr_or_spread(&mut self, node: ExprOrSpread) -> ExprOrSpread
fn fold_expr_or_spread(&mut self, node: ExprOrSpread) -> ExprOrSpread
Visit a node of type ExprOrSpread
.
By default, this method calls [ExprOrSpread::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_expr_or_spreads(&mut self, node: Vec<ExprOrSpread>) -> Vec<ExprOrSpread>
fn fold_expr_or_spreads(&mut self, node: Vec<ExprOrSpread>) -> Vec<ExprOrSpread>
Visit a node of type Vec < ExprOrSpread >
.
By default, this method calls [Vec < ExprOrSpread >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_expr_stmt(&mut self, node: ExprStmt) -> ExprStmt
fn fold_expr_stmt(&mut self, node: ExprStmt) -> ExprStmt
Visit a node of type ExprStmt
.
By default, this method calls [ExprStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_exprs(&mut self, node: Vec<Box<Expr>>) -> Vec<Box<Expr>>
fn fold_exprs(&mut self, node: Vec<Box<Expr>>) -> Vec<Box<Expr>>
Visit a node of type Vec < Box < Expr > >
.
By default, this method calls [Vec < Box < Expr > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_fn_decl(&mut self, node: FnDecl) -> FnDecl
fn fold_fn_decl(&mut self, node: FnDecl) -> FnDecl
Visit a node of type FnDecl
.
By default, this method calls [FnDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_fn_expr(&mut self, node: FnExpr) -> FnExpr
fn fold_fn_expr(&mut self, node: FnExpr) -> FnExpr
Visit a node of type FnExpr
.
By default, this method calls [FnExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_for_head(&mut self, node: ForHead) -> ForHead
fn fold_for_head(&mut self, node: ForHead) -> ForHead
Visit a node of type ForHead
.
By default, this method calls [ForHead::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_for_in_stmt(&mut self, node: ForInStmt) -> ForInStmt
fn fold_for_in_stmt(&mut self, node: ForInStmt) -> ForInStmt
Visit a node of type ForInStmt
.
By default, this method calls [ForInStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_for_of_stmt(&mut self, node: ForOfStmt) -> ForOfStmt
fn fold_for_of_stmt(&mut self, node: ForOfStmt) -> ForOfStmt
Visit a node of type ForOfStmt
.
By default, this method calls [ForOfStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_for_stmt(&mut self, node: ForStmt) -> ForStmt
fn fold_for_stmt(&mut self, node: ForStmt) -> ForStmt
Visit a node of type ForStmt
.
By default, this method calls [ForStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_function(&mut self, node: Function) -> Function
fn fold_function(&mut self, node: Function) -> Function
Visit a node of type Function
.
By default, this method calls [Function::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_getter_prop(&mut self, node: GetterProp) -> GetterProp
fn fold_getter_prop(&mut self, node: GetterProp) -> GetterProp
Visit a node of type GetterProp
.
By default, this method calls [GetterProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_ident(&mut self, node: Ident) -> Ident
fn fold_ident(&mut self, node: Ident) -> Ident
Visit a node of type Ident
.
By default, this method calls [Ident::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_ident_name(&mut self, node: IdentName) -> IdentName
fn fold_ident_name(&mut self, node: IdentName) -> IdentName
Visit a node of type IdentName
.
By default, this method calls [IdentName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_if_stmt(&mut self, node: IfStmt) -> IfStmt
fn fold_if_stmt(&mut self, node: IfStmt) -> IfStmt
Visit a node of type IfStmt
.
By default, this method calls [IfStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import(&mut self, node: Import) -> Import
fn fold_import(&mut self, node: Import) -> Import
Visit a node of type Import
.
By default, this method calls [Import::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_decl(&mut self, node: ImportDecl) -> ImportDecl
fn fold_import_decl(&mut self, node: ImportDecl) -> ImportDecl
Visit a node of type ImportDecl
.
By default, this method calls [ImportDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_default_specifier(
&mut self,
node: ImportDefaultSpecifier,
) -> ImportDefaultSpecifier
fn fold_import_default_specifier( &mut self, node: ImportDefaultSpecifier, ) -> ImportDefaultSpecifier
Visit a node of type ImportDefaultSpecifier
.
By default, this method calls [ImportDefaultSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_named_specifier(
&mut self,
node: ImportNamedSpecifier,
) -> ImportNamedSpecifier
fn fold_import_named_specifier( &mut self, node: ImportNamedSpecifier, ) -> ImportNamedSpecifier
Visit a node of type ImportNamedSpecifier
.
By default, this method calls [ImportNamedSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase
fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase
Visit a node of type ImportPhase
.
By default, this method calls [ImportPhase::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_specifier(&mut self, node: ImportSpecifier) -> ImportSpecifier
fn fold_import_specifier(&mut self, node: ImportSpecifier) -> ImportSpecifier
Visit a node of type ImportSpecifier
.
By default, this method calls [ImportSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_specifiers(
&mut self,
node: Vec<ImportSpecifier>,
) -> Vec<ImportSpecifier>
fn fold_import_specifiers( &mut self, node: Vec<ImportSpecifier>, ) -> Vec<ImportSpecifier>
Visit a node of type Vec < ImportSpecifier >
.
By default, this method calls [Vec < ImportSpecifier >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_star_as_specifier(
&mut self,
node: ImportStarAsSpecifier,
) -> ImportStarAsSpecifier
fn fold_import_star_as_specifier( &mut self, node: ImportStarAsSpecifier, ) -> ImportStarAsSpecifier
Visit a node of type ImportStarAsSpecifier
.
By default, this method calls [ImportStarAsSpecifier::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_with(&mut self, node: ImportWith) -> ImportWith
fn fold_import_with(&mut self, node: ImportWith) -> ImportWith
Visit a node of type ImportWith
.
By default, this method calls [ImportWith::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem
fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem
Visit a node of type ImportWithItem
.
By default, this method calls [ImportWithItem::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_import_with_items(
&mut self,
node: Vec<ImportWithItem>,
) -> Vec<ImportWithItem>
fn fold_import_with_items( &mut self, node: Vec<ImportWithItem>, ) -> Vec<ImportWithItem>
Visit a node of type Vec < ImportWithItem >
.
By default, this method calls [Vec < ImportWithItem >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_invalid(&mut self, node: Invalid) -> Invalid
fn fold_invalid(&mut self, node: Invalid) -> Invalid
Visit a node of type Invalid
.
By default, this method calls [Invalid::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_attr(&mut self, node: JSXAttr) -> JSXAttr
fn fold_jsx_attr(&mut self, node: JSXAttr) -> JSXAttr
Visit a node of type JSXAttr
.
By default, this method calls [JSXAttr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_attr_name(&mut self, node: JSXAttrName) -> JSXAttrName
fn fold_jsx_attr_name(&mut self, node: JSXAttrName) -> JSXAttrName
Visit a node of type JSXAttrName
.
By default, this method calls [JSXAttrName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread) -> JSXAttrOrSpread
fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread) -> JSXAttrOrSpread
Visit a node of type JSXAttrOrSpread
.
By default, this method calls [JSXAttrOrSpread::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_attr_or_spreads(
&mut self,
node: Vec<JSXAttrOrSpread>,
) -> Vec<JSXAttrOrSpread>
fn fold_jsx_attr_or_spreads( &mut self, node: Vec<JSXAttrOrSpread>, ) -> Vec<JSXAttrOrSpread>
Visit a node of type Vec < JSXAttrOrSpread >
.
By default, this method calls [Vec < JSXAttrOrSpread >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_attr_value(&mut self, node: JSXAttrValue) -> JSXAttrValue
fn fold_jsx_attr_value(&mut self, node: JSXAttrValue) -> JSXAttrValue
Visit a node of type JSXAttrValue
.
By default, this method calls [JSXAttrValue::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_closing_element(
&mut self,
node: JSXClosingElement,
) -> JSXClosingElement
fn fold_jsx_closing_element( &mut self, node: JSXClosingElement, ) -> JSXClosingElement
Visit a node of type JSXClosingElement
.
By default, this method calls [JSXClosingElement::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_closing_fragment(
&mut self,
node: JSXClosingFragment,
) -> JSXClosingFragment
fn fold_jsx_closing_fragment( &mut self, node: JSXClosingFragment, ) -> JSXClosingFragment
Visit a node of type JSXClosingFragment
.
By default, this method calls [JSXClosingFragment::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_element(&mut self, node: JSXElement) -> JSXElement
fn fold_jsx_element(&mut self, node: JSXElement) -> JSXElement
Visit a node of type JSXElement
.
By default, this method calls [JSXElement::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_element_child(&mut self, node: JSXElementChild) -> JSXElementChild
fn fold_jsx_element_child(&mut self, node: JSXElementChild) -> JSXElementChild
Visit a node of type JSXElementChild
.
By default, this method calls [JSXElementChild::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_element_childs(
&mut self,
node: Vec<JSXElementChild>,
) -> Vec<JSXElementChild>
fn fold_jsx_element_childs( &mut self, node: Vec<JSXElementChild>, ) -> Vec<JSXElementChild>
Visit a node of type Vec < JSXElementChild >
.
By default, this method calls [Vec < JSXElementChild >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_element_name(&mut self, node: JSXElementName) -> JSXElementName
fn fold_jsx_element_name(&mut self, node: JSXElementName) -> JSXElementName
Visit a node of type JSXElementName
.
By default, this method calls [JSXElementName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr
fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr
Visit a node of type JSXEmptyExpr
.
By default, this method calls [JSXEmptyExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_expr(&mut self, node: JSXExpr) -> JSXExpr
fn fold_jsx_expr(&mut self, node: JSXExpr) -> JSXExpr
Visit a node of type JSXExpr
.
By default, this method calls [JSXExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_expr_container(
&mut self,
node: JSXExprContainer,
) -> JSXExprContainer
fn fold_jsx_expr_container( &mut self, node: JSXExprContainer, ) -> JSXExprContainer
Visit a node of type JSXExprContainer
.
By default, this method calls [JSXExprContainer::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_fragment(&mut self, node: JSXFragment) -> JSXFragment
fn fold_jsx_fragment(&mut self, node: JSXFragment) -> JSXFragment
Visit a node of type JSXFragment
.
By default, this method calls [JSXFragment::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_member_expr(&mut self, node: JSXMemberExpr) -> JSXMemberExpr
fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr) -> JSXMemberExpr
Visit a node of type JSXMemberExpr
.
By default, this method calls [JSXMemberExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_namespaced_name(
&mut self,
node: JSXNamespacedName,
) -> JSXNamespacedName
fn fold_jsx_namespaced_name( &mut self, node: JSXNamespacedName, ) -> JSXNamespacedName
Visit a node of type JSXNamespacedName
.
By default, this method calls [JSXNamespacedName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_object(&mut self, node: JSXObject) -> JSXObject
fn fold_jsx_object(&mut self, node: JSXObject) -> JSXObject
Visit a node of type JSXObject
.
By default, this method calls [JSXObject::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_opening_element(
&mut self,
node: JSXOpeningElement,
) -> JSXOpeningElement
fn fold_jsx_opening_element( &mut self, node: JSXOpeningElement, ) -> JSXOpeningElement
Visit a node of type JSXOpeningElement
.
By default, this method calls [JSXOpeningElement::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_opening_fragment(
&mut self,
node: JSXOpeningFragment,
) -> JSXOpeningFragment
fn fold_jsx_opening_fragment( &mut self, node: JSXOpeningFragment, ) -> JSXOpeningFragment
Visit a node of type JSXOpeningFragment
.
By default, this method calls [JSXOpeningFragment::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_spread_child(&mut self, node: JSXSpreadChild) -> JSXSpreadChild
fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild) -> JSXSpreadChild
Visit a node of type JSXSpreadChild
.
By default, this method calls [JSXSpreadChild::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_jsx_text(&mut self, node: JSXText) -> JSXText
fn fold_jsx_text(&mut self, node: JSXText) -> JSXText
Visit a node of type JSXText
.
By default, this method calls [JSXText::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_key(&mut self, node: Key) -> Key
fn fold_key(&mut self, node: Key) -> Key
Visit a node of type Key
.
By default, this method calls [Key::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp) -> KeyValuePatProp
fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp) -> KeyValuePatProp
Visit a node of type KeyValuePatProp
.
By default, this method calls [KeyValuePatProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_key_value_prop(&mut self, node: KeyValueProp) -> KeyValueProp
fn fold_key_value_prop(&mut self, node: KeyValueProp) -> KeyValueProp
Visit a node of type KeyValueProp
.
By default, this method calls [KeyValueProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_labeled_stmt(&mut self, node: LabeledStmt) -> LabeledStmt
fn fold_labeled_stmt(&mut self, node: LabeledStmt) -> LabeledStmt
Visit a node of type LabeledStmt
.
By default, this method calls [LabeledStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_lit(&mut self, node: Lit) -> Lit
fn fold_lit(&mut self, node: Lit) -> Lit
Visit a node of type Lit
.
By default, this method calls [Lit::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_member_expr(&mut self, node: MemberExpr) -> MemberExpr
fn fold_member_expr(&mut self, node: MemberExpr) -> MemberExpr
Visit a node of type MemberExpr
.
By default, this method calls [MemberExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_member_prop(&mut self, node: MemberProp) -> MemberProp
fn fold_member_prop(&mut self, node: MemberProp) -> MemberProp
Visit a node of type MemberProp
.
By default, this method calls [MemberProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr
fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr
Visit a node of type MetaPropExpr
.
By default, this method calls [MetaPropExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind
fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind
Visit a node of type MetaPropKind
.
By default, this method calls [MetaPropKind::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_method_kind(&mut self, node: MethodKind) -> MethodKind
fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind
Visit a node of type MethodKind
.
By default, this method calls [MethodKind::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_method_prop(&mut self, node: MethodProp) -> MethodProp
fn fold_method_prop(&mut self, node: MethodProp) -> MethodProp
Visit a node of type MethodProp
.
By default, this method calls [MethodProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_module(&mut self, node: Module) -> Module
fn fold_module(&mut self, node: Module) -> Module
Visit a node of type Module
.
By default, this method calls [Module::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_module_decl(&mut self, node: ModuleDecl) -> ModuleDecl
fn fold_module_decl(&mut self, node: ModuleDecl) -> ModuleDecl
Visit a node of type ModuleDecl
.
By default, this method calls [ModuleDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_module_export_name(
&mut self,
node: ModuleExportName,
) -> ModuleExportName
fn fold_module_export_name( &mut self, node: ModuleExportName, ) -> ModuleExportName
Visit a node of type ModuleExportName
.
By default, this method calls [ModuleExportName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_module_item(&mut self, node: ModuleItem) -> ModuleItem
fn fold_module_item(&mut self, node: ModuleItem) -> ModuleItem
Visit a node of type ModuleItem
.
By default, this method calls [ModuleItem::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_module_items(&mut self, node: Vec<ModuleItem>) -> Vec<ModuleItem>
fn fold_module_items(&mut self, node: Vec<ModuleItem>) -> Vec<ModuleItem>
Visit a node of type Vec < ModuleItem >
.
By default, this method calls [Vec < ModuleItem >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_named_export(&mut self, node: NamedExport) -> NamedExport
fn fold_named_export(&mut self, node: NamedExport) -> NamedExport
Visit a node of type NamedExport
.
By default, this method calls [NamedExport::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_new_expr(&mut self, node: NewExpr) -> NewExpr
fn fold_new_expr(&mut self, node: NewExpr) -> NewExpr
Visit a node of type NewExpr
.
By default, this method calls [NewExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_null(&mut self, node: Null) -> Null
fn fold_null(&mut self, node: Null) -> Null
Visit a node of type Null
.
By default, this method calls [Null::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_number(&mut self, node: Number) -> Number
fn fold_number(&mut self, node: Number) -> Number
Visit a node of type Number
.
By default, this method calls [Number::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_object_lit(&mut self, node: ObjectLit) -> ObjectLit
fn fold_object_lit(&mut self, node: ObjectLit) -> ObjectLit
Visit a node of type ObjectLit
.
By default, this method calls [ObjectLit::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_object_pat(&mut self, node: ObjectPat) -> ObjectPat
fn fold_object_pat(&mut self, node: ObjectPat) -> ObjectPat
Visit a node of type ObjectPat
.
By default, this method calls [ObjectPat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_object_pat_prop(&mut self, node: ObjectPatProp) -> ObjectPatProp
fn fold_object_pat_prop(&mut self, node: ObjectPatProp) -> ObjectPatProp
Visit a node of type ObjectPatProp
.
By default, this method calls [ObjectPatProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_object_pat_props(
&mut self,
node: Vec<ObjectPatProp>,
) -> Vec<ObjectPatProp>
fn fold_object_pat_props( &mut self, node: Vec<ObjectPatProp>, ) -> Vec<ObjectPatProp>
Visit a node of type Vec < ObjectPatProp >
.
By default, this method calls [Vec < ObjectPatProp >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_atom(&mut self, node: Option<Atom>) -> Option<Atom>
fn fold_opt_atom(&mut self, node: Option<Atom>) -> Option<Atom>
Visit a node of type Option < swc_atoms :: Atom >
.
By default, this method calls [Option < swc_atoms :: Atom >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_block_stmt(&mut self, node: Option<BlockStmt>) -> Option<BlockStmt>
fn fold_opt_block_stmt(&mut self, node: Option<BlockStmt>) -> Option<BlockStmt>
Visit a node of type Option < BlockStmt >
.
By default, this method calls [Option < BlockStmt >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_call(&mut self, node: OptCall) -> OptCall
fn fold_opt_call(&mut self, node: OptCall) -> OptCall
Visit a node of type OptCall
.
By default, this method calls [OptCall::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_catch_clause(
&mut self,
node: Option<CatchClause>,
) -> Option<CatchClause>
fn fold_opt_catch_clause( &mut self, node: Option<CatchClause>, ) -> Option<CatchClause>
Visit a node of type Option < CatchClause >
.
By default, this method calls [Option < CatchClause >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_chain_base(&mut self, node: OptChainBase) -> OptChainBase
fn fold_opt_chain_base(&mut self, node: OptChainBase) -> OptChainBase
Visit a node of type OptChainBase
.
By default, this method calls [OptChainBase::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_chain_expr(&mut self, node: OptChainExpr) -> OptChainExpr
fn fold_opt_chain_expr(&mut self, node: OptChainExpr) -> OptChainExpr
Visit a node of type OptChainExpr
.
By default, this method calls [OptChainExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_expr(&mut self, node: Option<Box<Expr>>) -> Option<Box<Expr>>
fn fold_opt_expr(&mut self, node: Option<Box<Expr>>) -> Option<Box<Expr>>
Visit a node of type Option < Box < Expr > >
.
By default, this method calls [Option < Box < Expr > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_expr_or_spread(
&mut self,
node: Option<ExprOrSpread>,
) -> Option<ExprOrSpread>
fn fold_opt_expr_or_spread( &mut self, node: Option<ExprOrSpread>, ) -> Option<ExprOrSpread>
Visit a node of type Option < ExprOrSpread >
.
By default, this method calls [Option < ExprOrSpread >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_expr_or_spreads(
&mut self,
node: Option<Vec<ExprOrSpread>>,
) -> Option<Vec<ExprOrSpread>>
fn fold_opt_expr_or_spreads( &mut self, node: Option<Vec<ExprOrSpread>>, ) -> Option<Vec<ExprOrSpread>>
Visit a node of type Option < Vec < ExprOrSpread > >
.
By default, this method calls [Option < Vec < ExprOrSpread > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_ident(&mut self, node: Option<Ident>) -> Option<Ident>
fn fold_opt_ident(&mut self, node: Option<Ident>) -> Option<Ident>
Visit a node of type Option < Ident >
.
By default, this method calls [Option < Ident >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_jsx_attr_value(
&mut self,
node: Option<JSXAttrValue>,
) -> Option<JSXAttrValue>
fn fold_opt_jsx_attr_value( &mut self, node: Option<JSXAttrValue>, ) -> Option<JSXAttrValue>
Visit a node of type Option < JSXAttrValue >
.
By default, this method calls [Option < JSXAttrValue >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_jsx_closing_element(
&mut self,
node: Option<JSXClosingElement>,
) -> Option<JSXClosingElement>
fn fold_opt_jsx_closing_element( &mut self, node: Option<JSXClosingElement>, ) -> Option<JSXClosingElement>
Visit a node of type Option < JSXClosingElement >
.
By default, this method calls [Option < JSXClosingElement >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_module_export_name(
&mut self,
node: Option<ModuleExportName>,
) -> Option<ModuleExportName>
fn fold_opt_module_export_name( &mut self, node: Option<ModuleExportName>, ) -> Option<ModuleExportName>
Visit a node of type Option < ModuleExportName >
.
By default, this method calls [Option < ModuleExportName >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_object_lit(
&mut self,
node: Option<Box<ObjectLit>>,
) -> Option<Box<ObjectLit>>
fn fold_opt_object_lit( &mut self, node: Option<Box<ObjectLit>>, ) -> Option<Box<ObjectLit>>
Visit a node of type Option < Box < ObjectLit > >
.
By default, this method calls [Option < Box < ObjectLit > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_pat(&mut self, node: Option<Pat>) -> Option<Pat>
fn fold_opt_pat(&mut self, node: Option<Pat>) -> Option<Pat>
Visit a node of type Option < Pat >
.
By default, this method calls [Option < Pat >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_span(&mut self, node: Option<Span>) -> Option<Span>
fn fold_opt_span(&mut self, node: Option<Span>) -> Option<Span>
Visit a node of type Option < swc_common :: Span >
.
By default, this method calls [Option < swc_common :: Span >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_stmt(&mut self, node: Option<Box<Stmt>>) -> Option<Box<Stmt>>
fn fold_opt_stmt(&mut self, node: Option<Box<Stmt>>) -> Option<Box<Stmt>>
Visit a node of type Option < Box < Stmt > >
.
By default, this method calls [Option < Box < Stmt > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_str(&mut self, node: Option<Box<Str>>) -> Option<Box<Str>>
fn fold_opt_str(&mut self, node: Option<Box<Str>>) -> Option<Box<Str>>
Visit a node of type Option < Box < Str > >
.
By default, this method calls [Option < Box < Str > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_var_decl_or_expr(
&mut self,
node: Option<VarDeclOrExpr>,
) -> Option<VarDeclOrExpr>
fn fold_opt_var_decl_or_expr( &mut self, node: Option<VarDeclOrExpr>, ) -> Option<VarDeclOrExpr>
Visit a node of type Option < VarDeclOrExpr >
.
By default, this method calls [Option < VarDeclOrExpr >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_vec_expr_or_spreads(
&mut self,
node: Vec<Option<ExprOrSpread>>,
) -> Vec<Option<ExprOrSpread>>
fn fold_opt_vec_expr_or_spreads( &mut self, node: Vec<Option<ExprOrSpread>>, ) -> Vec<Option<ExprOrSpread>>
Visit a node of type Vec < Option < ExprOrSpread > >
.
By default, this method calls [Vec < Option < ExprOrSpread > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_opt_vec_pats(&mut self, node: Vec<Option<Pat>>) -> Vec<Option<Pat>>
fn fold_opt_vec_pats(&mut self, node: Vec<Option<Pat>>) -> Vec<Option<Pat>>
Visit a node of type Vec < Option < Pat > >
.
By default, this method calls [Vec < Option < Pat > >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_param(&mut self, node: Param) -> Param
fn fold_param(&mut self, node: Param) -> Param
Visit a node of type Param
.
By default, this method calls [Param::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_param_or_ts_param_prop(
&mut self,
node: ParamOrTsParamProp,
) -> ParamOrTsParamProp
fn fold_param_or_ts_param_prop( &mut self, node: ParamOrTsParamProp, ) -> ParamOrTsParamProp
Visit a node of type ParamOrTsParamProp
.
By default, this method calls [ParamOrTsParamProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_param_or_ts_param_props(
&mut self,
node: Vec<ParamOrTsParamProp>,
) -> Vec<ParamOrTsParamProp>
fn fold_param_or_ts_param_props( &mut self, node: Vec<ParamOrTsParamProp>, ) -> Vec<ParamOrTsParamProp>
Visit a node of type Vec < ParamOrTsParamProp >
.
By default, this method calls [Vec < ParamOrTsParamProp >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_params(&mut self, node: Vec<Param>) -> Vec<Param>
fn fold_params(&mut self, node: Vec<Param>) -> Vec<Param>
Visit a node of type Vec < Param >
.
By default, this method calls [Vec < Param >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_paren_expr(&mut self, node: ParenExpr) -> ParenExpr
fn fold_paren_expr(&mut self, node: ParenExpr) -> ParenExpr
Visit a node of type ParenExpr
.
By default, this method calls [ParenExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_pat(&mut self, node: Pat) -> Pat
fn fold_pat(&mut self, node: Pat) -> Pat
Visit a node of type Pat
.
By default, this method calls [Pat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_pats(&mut self, node: Vec<Pat>) -> Vec<Pat>
fn fold_pats(&mut self, node: Vec<Pat>) -> Vec<Pat>
Visit a node of type Vec < Pat >
.
By default, this method calls [Vec < Pat >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_private_method(&mut self, node: PrivateMethod) -> PrivateMethod
fn fold_private_method(&mut self, node: PrivateMethod) -> PrivateMethod
Visit a node of type PrivateMethod
.
By default, this method calls [PrivateMethod::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_private_name(&mut self, node: PrivateName) -> PrivateName
fn fold_private_name(&mut self, node: PrivateName) -> PrivateName
Visit a node of type PrivateName
.
By default, this method calls [PrivateName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_private_prop(&mut self, node: PrivateProp) -> PrivateProp
fn fold_private_prop(&mut self, node: PrivateProp) -> PrivateProp
Visit a node of type PrivateProp
.
By default, this method calls [PrivateProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_program(&mut self, node: Program) -> Program
fn fold_program(&mut self, node: Program) -> Program
Visit a node of type Program
.
By default, this method calls [Program::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_prop(&mut self, node: Prop) -> Prop
fn fold_prop(&mut self, node: Prop) -> Prop
Visit a node of type Prop
.
By default, this method calls [Prop::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_prop_name(&mut self, node: PropName) -> PropName
fn fold_prop_name(&mut self, node: PropName) -> PropName
Visit a node of type PropName
.
By default, this method calls [PropName::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_prop_or_spread(&mut self, node: PropOrSpread) -> PropOrSpread
fn fold_prop_or_spread(&mut self, node: PropOrSpread) -> PropOrSpread
Visit a node of type PropOrSpread
.
By default, this method calls [PropOrSpread::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_prop_or_spreads(&mut self, node: Vec<PropOrSpread>) -> Vec<PropOrSpread>
fn fold_prop_or_spreads(&mut self, node: Vec<PropOrSpread>) -> Vec<PropOrSpread>
Visit a node of type Vec < PropOrSpread >
.
By default, this method calls [Vec < PropOrSpread >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_regex(&mut self, node: Regex) -> Regex
fn fold_regex(&mut self, node: Regex) -> Regex
Visit a node of type Regex
.
By default, this method calls [Regex::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_rest_pat(&mut self, node: RestPat) -> RestPat
fn fold_rest_pat(&mut self, node: RestPat) -> RestPat
Visit a node of type RestPat
.
By default, this method calls [RestPat::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_return_stmt(&mut self, node: ReturnStmt) -> ReturnStmt
fn fold_return_stmt(&mut self, node: ReturnStmt) -> ReturnStmt
Visit a node of type ReturnStmt
.
By default, this method calls [ReturnStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_script(&mut self, node: Script) -> Script
fn fold_script(&mut self, node: Script) -> Script
Visit a node of type Script
.
By default, this method calls [Script::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_seq_expr(&mut self, node: SeqExpr) -> SeqExpr
fn fold_seq_expr(&mut self, node: SeqExpr) -> SeqExpr
Visit a node of type SeqExpr
.
By default, this method calls [SeqExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_setter_prop(&mut self, node: SetterProp) -> SetterProp
fn fold_setter_prop(&mut self, node: SetterProp) -> SetterProp
Visit a node of type SetterProp
.
By default, this method calls [SetterProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_simple_assign_target(
&mut self,
node: SimpleAssignTarget,
) -> SimpleAssignTarget
fn fold_simple_assign_target( &mut self, node: SimpleAssignTarget, ) -> SimpleAssignTarget
Visit a node of type SimpleAssignTarget
.
By default, this method calls [SimpleAssignTarget::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_span(&mut self, node: Span) -> Span
fn fold_span(&mut self, node: Span) -> Span
Visit a node of type swc_common :: Span
.
By default, this method calls [swc_common :: Span::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_spread_element(&mut self, node: SpreadElement) -> SpreadElement
fn fold_spread_element(&mut self, node: SpreadElement) -> SpreadElement
Visit a node of type SpreadElement
.
By default, this method calls [SpreadElement::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_static_block(&mut self, node: StaticBlock) -> StaticBlock
fn fold_static_block(&mut self, node: StaticBlock) -> StaticBlock
Visit a node of type StaticBlock
.
By default, this method calls [StaticBlock::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_stmt(&mut self, node: Stmt) -> Stmt
fn fold_stmt(&mut self, node: Stmt) -> Stmt
Visit a node of type Stmt
.
By default, this method calls [Stmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_stmts(&mut self, node: Vec<Stmt>) -> Vec<Stmt>
fn fold_stmts(&mut self, node: Vec<Stmt>) -> Vec<Stmt>
Visit a node of type Vec < Stmt >
.
By default, this method calls [Vec < Stmt >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_str(&mut self, node: Str) -> Str
fn fold_str(&mut self, node: Str) -> Str
Visit a node of type Str
.
By default, this method calls [Str::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_super(&mut self, node: Super) -> Super
fn fold_super(&mut self, node: Super) -> Super
Visit a node of type Super
.
By default, this method calls [Super::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_super_prop(&mut self, node: SuperProp) -> SuperProp
fn fold_super_prop(&mut self, node: SuperProp) -> SuperProp
Visit a node of type SuperProp
.
By default, this method calls [SuperProp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_super_prop_expr(&mut self, node: SuperPropExpr) -> SuperPropExpr
fn fold_super_prop_expr(&mut self, node: SuperPropExpr) -> SuperPropExpr
Visit a node of type SuperPropExpr
.
By default, this method calls [SuperPropExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_switch_case(&mut self, node: SwitchCase) -> SwitchCase
fn fold_switch_case(&mut self, node: SwitchCase) -> SwitchCase
Visit a node of type SwitchCase
.
By default, this method calls [SwitchCase::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_switch_cases(&mut self, node: Vec<SwitchCase>) -> Vec<SwitchCase>
fn fold_switch_cases(&mut self, node: Vec<SwitchCase>) -> Vec<SwitchCase>
Visit a node of type Vec < SwitchCase >
.
By default, this method calls [Vec < SwitchCase >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_switch_stmt(&mut self, node: SwitchStmt) -> SwitchStmt
fn fold_switch_stmt(&mut self, node: SwitchStmt) -> SwitchStmt
Visit a node of type SwitchStmt
.
By default, this method calls [SwitchStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_syntax_context(&mut self, node: SyntaxContext) -> SyntaxContext
fn fold_syntax_context(&mut self, node: SyntaxContext) -> SyntaxContext
Visit a node of type swc_common :: SyntaxContext
.
By default, this method calls [swc_common :: SyntaxContext::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_tagged_tpl(&mut self, node: TaggedTpl) -> TaggedTpl
fn fold_tagged_tpl(&mut self, node: TaggedTpl) -> TaggedTpl
Visit a node of type TaggedTpl
.
By default, this method calls [TaggedTpl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr
fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr
Visit a node of type ThisExpr
.
By default, this method calls [ThisExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_throw_stmt(&mut self, node: ThrowStmt) -> ThrowStmt
fn fold_throw_stmt(&mut self, node: ThrowStmt) -> ThrowStmt
Visit a node of type ThrowStmt
.
By default, this method calls [ThrowStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_tpl(&mut self, node: Tpl) -> Tpl
fn fold_tpl(&mut self, node: Tpl) -> Tpl
Visit a node of type Tpl
.
By default, this method calls [Tpl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_tpl_element(&mut self, node: TplElement) -> TplElement
fn fold_tpl_element(&mut self, node: TplElement) -> TplElement
Visit a node of type TplElement
.
By default, this method calls [TplElement::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_tpl_elements(&mut self, node: Vec<TplElement>) -> Vec<TplElement>
fn fold_tpl_elements(&mut self, node: Vec<TplElement>) -> Vec<TplElement>
Visit a node of type Vec < TplElement >
.
By default, this method calls [Vec < TplElement >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus
fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus
Visit a node of type TruePlusMinus
.
By default, this method calls [TruePlusMinus::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_try_stmt(&mut self, node: TryStmt) -> TryStmt
fn fold_try_stmt(&mut self, node: TryStmt) -> TryStmt
Visit a node of type TryStmt
.
By default, this method calls [TryStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_unary_expr(&mut self, node: UnaryExpr) -> UnaryExpr
fn fold_unary_expr(&mut self, node: UnaryExpr) -> UnaryExpr
Visit a node of type UnaryExpr
.
By default, this method calls [UnaryExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp
fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp
Visit a node of type UnaryOp
.
By default, this method calls [UnaryOp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_update_expr(&mut self, node: UpdateExpr) -> UpdateExpr
fn fold_update_expr(&mut self, node: UpdateExpr) -> UpdateExpr
Visit a node of type UpdateExpr
.
By default, this method calls [UpdateExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp
fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp
Visit a node of type UpdateOp
.
By default, this method calls [UpdateOp::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_using_decl(&mut self, node: UsingDecl) -> UsingDecl
fn fold_using_decl(&mut self, node: UsingDecl) -> UsingDecl
Visit a node of type UsingDecl
.
By default, this method calls [UsingDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_var_decl(&mut self, node: VarDecl) -> VarDecl
fn fold_var_decl(&mut self, node: VarDecl) -> VarDecl
Visit a node of type VarDecl
.
By default, this method calls [VarDecl::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind
fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind
Visit a node of type VarDeclKind
.
By default, this method calls [VarDeclKind::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr) -> VarDeclOrExpr
fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr) -> VarDeclOrExpr
Visit a node of type VarDeclOrExpr
.
By default, this method calls [VarDeclOrExpr::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_var_declarator(&mut self, node: VarDeclarator) -> VarDeclarator
fn fold_var_declarator(&mut self, node: VarDeclarator) -> VarDeclarator
Visit a node of type VarDeclarator
.
By default, this method calls [VarDeclarator::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_var_declarators(
&mut self,
node: Vec<VarDeclarator>,
) -> Vec<VarDeclarator>
fn fold_var_declarators( &mut self, node: Vec<VarDeclarator>, ) -> Vec<VarDeclarator>
Visit a node of type Vec < VarDeclarator >
.
By default, this method calls [Vec < VarDeclarator >::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_while_stmt(&mut self, node: WhileStmt) -> WhileStmt
fn fold_while_stmt(&mut self, node: WhileStmt) -> WhileStmt
Visit a node of type WhileStmt
.
By default, this method calls [WhileStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_with_stmt(&mut self, node: WithStmt) -> WithStmt
fn fold_with_stmt(&mut self, node: WithStmt) -> WithStmt
Visit a node of type WithStmt
.
By default, this method calls [WithStmt::fold_children_with
]. If you want to recurse, you need to call it manually.
sourcefn fold_yield_expr(&mut self, node: YieldExpr) -> YieldExpr
fn fold_yield_expr(&mut self, node: YieldExpr) -> YieldExpr
Visit a node of type YieldExpr
.
By default, this method calls [YieldExpr::fold_children_with
]. If you want to recurse, you need to call it manually.