diff --git a/Cargo.lock b/Cargo.lock index c4e4205b7640..7703d0946065 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -219,6 +219,16 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "ast_node_arena" +version = "3.0.0" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.87", +] + [[package]] name = "async-trait" version = "0.1.82" @@ -4271,6 +4281,7 @@ dependencies = [ "codspeed-criterion-compat", "criterion", "hashbrown 0.14.5", + "num-bigint", "ptr_meta 0.3.0", "rancor", "rkyv", @@ -4292,6 +4303,7 @@ dependencies = [ "rkyv", "rustc-hash", "serde", + "swc_allocator", ] [[package]] @@ -4380,6 +4392,7 @@ dependencies = [ "anyhow", "arbitrary", "ast_node", + "ast_node_arena", "better_scoped_tls", "bytecheck 0.8.0", "cfg-if", @@ -4718,6 +4731,7 @@ dependencies = [ "serde", "serde_json", "string_enum", + "swc_allocator", "swc_atoms", "swc_common", "swc_visit", @@ -5065,6 +5079,7 @@ dependencies = [ "smallvec", "smartstring", "stacker", + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -5182,6 +5197,7 @@ dependencies = [ "rustc-hash", "serde", "smallvec", + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -5459,6 +5475,7 @@ dependencies = [ "new_debug_unreachable", "num-bigint", "serde", + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -5888,6 +5905,7 @@ version = "2.0.0" dependencies = [ "either", "new_debug_unreachable", + "swc_allocator", ] [[package]] diff --git a/crates/ast_node_arena/Cargo.toml b/crates/ast_node_arena/Cargo.toml new file mode 100644 index 000000000000..d415580a6121 --- /dev/null +++ b/crates/ast_node_arena/Cargo.toml @@ -0,0 +1,22 @@ +[package] +authors = ["강동윤 "] +description = "Macros for ast nodes." +documentation = "https://rustdoc.swc.rs/ast_node/" +edition = "2021" +license = "Apache-2.0" +name = "ast_node_arena" +repository = "https://github.com/swc-project/swc.git" +version = "3.0.0" + +[lib] +bench = false +proc-macro = true + +[dependencies] +proc-macro2 = { workspace = true } +quote = { workspace = true } + +swc_macros_common = { version = "1.0.0", path = "../swc_macros_common" } + [dependencies.syn] + features = ["derive", "fold", "parsing", "printing", "visit-mut"] + workspace = true diff --git a/crates/ast_node_arena/src/ast_node_macro.rs b/crates/ast_node_arena/src/ast_node_macro.rs new file mode 100644 index 000000000000..b952560abab4 --- /dev/null +++ b/crates/ast_node_arena/src/ast_node_macro.rs @@ -0,0 +1,43 @@ +use swc_macros_common::prelude::*; +use syn::{ + parse::{Parse, ParseStream}, + *, +}; + +#[derive(Clone)] +pub struct Args { + pub ty: Literal, +} + +impl Parse for Args { + fn parse(i: ParseStream<'_>) -> syn::Result { + Ok(Args { ty: i.parse()? }) + } +} + +pub fn expand_struct(args: Args, i: DeriveInput) -> Vec { + let mut items = Vec::new(); + // let generics = i.generics.clone(); + // let item_ident = Ident::new("Item", i.ident.span()); + + { + let ty = &i.ident; + let type_str = &args.ty; + let has_lifetime = i.generics.lifetimes().count() > 0; + let item: ItemImpl = if has_lifetime { + parse_quote!( + impl<'a> ::swc_common::arena::AstNode<'a> for #ty<'a> { + const TYPE: &'static str = #type_str; + } + ) + } else { + parse_quote!( + impl<'a> ::swc_common::arena::AstNode<'a> for #ty { + const TYPE: &'static str = #type_str; + } + ) + }; + items.push(item); + } + items +} diff --git a/crates/ast_node_arena/src/clone_in.rs b/crates/ast_node_arena/src/clone_in.rs new file mode 100644 index 000000000000..30d0fd8e48e1 --- /dev/null +++ b/crates/ast_node_arena/src/clone_in.rs @@ -0,0 +1,96 @@ +/// References: +/// +/// +/// The original code is MIT licensed. +use quote::{format_ident, quote}; +use swc_macros_common::prelude::*; +use syn::{parse_quote, DeriveInput, GenericParam, Ident, ItemImpl}; + +pub fn derive(input: DeriveInput) -> ItemImpl { + let ty_ident = input.ident; + let has_lifetime = input + .generics + .params + .iter() + .any(|p| matches!(p, GenericParam::Lifetime(_))); + match input.data { + syn::Data::Struct(data_struct) => { + let (alloc_ident, body) = if data_struct.fields.is_empty() { + (format_ident!("_"), quote!(#ty_ident)) + } else { + let mut is_tuple = false; + let fields = data_struct.fields.into_iter().enumerate().map(|(index, field)| { + let ident = field.ident; + if let Some(ident) = ident { + quote!(#ident: swc_allocator::arena::CloneIn::clone_in(&self.#ident, allocator)) + } else { + is_tuple = true; + let index = syn::Index::from(index); + quote!(swc_allocator::arena::CloneIn::clone_in(&self.#index, allocator)) + } + }).collect::>(); + ( + format_ident!("allocator"), + if is_tuple { + quote!(#ty_ident(#(#fields),* )) + } else { + quote!(#ty_ident { #(#fields),* }) + }, + ) + }; + impl_clone_in(&ty_ident, has_lifetime, &alloc_ident, &body) + } + syn::Data::Enum(data_enum) => { + let mut need_alloc = false; + let matches = data_enum.variants.into_iter().map(|variant| { + let ident = variant.ident; + if variant.fields.is_empty() { + quote!(Self :: #ident => #ty_ident :: #ident) + } else { + need_alloc = true; + quote!(Self :: #ident(it) => #ty_ident :: #ident(swc_allocator::arena::CloneIn::clone_in(it, allocator))) + } + }).collect::>(); + let alloc_ident = if need_alloc { + format_ident!("allocator") + } else { + format_ident!("_") + }; + let body = quote! { + match self { + #(#matches),* + } + }; + + impl_clone_in(&ty_ident, has_lifetime, &alloc_ident, &body) + } + syn::Data::Union(_) => unimplemented!(), + } +} + +fn impl_clone_in( + ty_ident: &Ident, + has_lifetime: bool, + alloc_ident: &Ident, + body: &TokenStream, +) -> ItemImpl { + if has_lifetime { + parse_quote! { + impl <'old_alloc, 'new_alloc> swc_allocator::arena::CloneIn<'new_alloc> for #ty_ident<'old_alloc> { + type Cloned = #ty_ident<'new_alloc>; + fn clone_in(&self, #alloc_ident: &'new_alloc swc_allocator::arena::Allocator) -> Self::Cloned { + #body + } + } + } + } else { + parse_quote! { + impl <'alloc> swc_allocator::arena::CloneIn<'alloc> for #ty_ident { + type Cloned = #ty_ident; + fn clone_in(&self, #alloc_ident: &'alloc swc_allocator::arena::Allocator) -> Self::Cloned { + #body + } + } + } + } +} diff --git a/crates/ast_node_arena/src/lib.rs b/crates/ast_node_arena/src/lib.rs new file mode 100644 index 000000000000..e06e89b594be --- /dev/null +++ b/crates/ast_node_arena/src/lib.rs @@ -0,0 +1,322 @@ +#![deny(clippy::all)] +#![recursion_limit = "1024"] + +extern crate proc_macro; + +use quote::quote; +use swc_macros_common::prelude::*; +use syn::{visit_mut::VisitMut, *}; + +mod ast_node_macro; +mod clone_in; + +#[proc_macro_derive(CloneIn)] +pub fn derive_clone_in(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + let input = parse::(input).expect("failed to parse input as DeriveInput"); + + let item = self::clone_in::derive(input); + + print("derive(CloneIn)", item.into_token_stream()) +} + +/// Derives `serde::Serialize` and `serde::Deserialize`. +/// +/// # Struct attributes +/// +/// `#[ast_serde("A")]` adds `"type": "A"` to json when serialized, and +/// deserializes as the type only if `type` field of json string is `A`. +/// +/// # Enum attributes +/// +/// ## Type-level attributes +/// +/// This macro does not accept arguments if used on enum. +/// +/// ## Variant attributes +/// +/// ### `#[tag("Expr")]` +/// +/// You can tell "Use this variant if `type` is `Expr`". +/// +/// This attribute can be applied multiple time, if a variant consumes multiple +/// `type`s. +/// +/// For example, `Lit` of swc_ecma_ast is an enum, but `Expr`, which contains +/// `Lit` as a variant, is also an enum. +/// So the `Lit` variant has multiple `#[tag]`-s like +/// +/// ```rust,ignore +/// enum Expr { +/// #[tag("StringLiteral")] +/// #[tag("NumericLiteral")] +/// #[tag("BooleanLiteral")] +/// Lit(Lit), +/// } +/// ``` +/// +/// so the deserializer can decide which variant to use. +/// +/// +/// `#[tag]` also supports wildcard like `#[tag("*")]`. You can use this if +/// there are two many variants. +#[proc_macro_attribute] +pub fn ast_serde( + args: proc_macro::TokenStream, + input: proc_macro::TokenStream, +) -> proc_macro::TokenStream { + let input: DeriveInput = parse(input).expect("failed to parse input as a DeriveInput"); + + // we should use call_site + let mut item = TokenStream::new(); + match input.data { + Data::Enum(..) => { + if !args.is_empty() { + panic!("#[ast_serde] on enum does not accept any argument") + } + + item.extend(quote!( + #[derive(::serde::Serialize)] + #[serde(untagged)] + #input + )); + } + _ => { + let args: Option = if args.is_empty() { + None + } else { + Some(parse(args).expect("failed to parse args of #[ast_serde]")) + }; + + let serde_tag = match input.data { + Data::Struct(DataStruct { + fields: Fields::Named(..), + .. + }) => { + if args.is_some() { + Some(quote!(#[serde(tag = "type")])) + } else { + None + } + } + _ => None, + }; + + let serde_rename = args.as_ref().map(|args| { + let name = &args.ty; + quote!(#[serde(rename = #name)]) + }); + + item.extend(quote!( + #[derive(::serde::Serialize)] + #serde_tag + #[serde(rename_all = "camelCase")] + #serde_rename + #input + )); + } + }; + + print("ast_serde", item) +} + +struct AddAttr; + +impl VisitMut for AddAttr { + fn visit_field_mut(&mut self, f: &mut Field) { + f.attrs + .push(parse_quote!(#[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))])); + } +} + +/// Alias for +/// `#[derive(Spanned, Fold, CloneIn, Debug, PartialEq)]` for a struct and +/// `#[derive(Spanned, Fold, CloneIn, Debug, PartialEq, FromVariant)]` for an +/// enum. +#[proc_macro_attribute] +pub fn ast_node( + args: proc_macro::TokenStream, + input: proc_macro::TokenStream, +) -> proc_macro::TokenStream { + let mut input: DeriveInput = parse(input).expect("failed to parse input as a DeriveInput"); + + AddAttr.visit_data_mut(&mut input.data); + + // we should use call_site + let mut item = TokenStream::new(); + match input.data { + Data::Enum(..) => { + struct EnumArgs { + clone: bool, + } + impl parse::Parse for EnumArgs { + fn parse(i: parse::ParseStream<'_>) -> syn::Result { + let name: Ident = i.parse()?; + if name != "no_clone" { + return Err(i.error("unknown attribute")); + } + Ok(EnumArgs { clone: false }) + } + } + let args = if args.is_empty() { + EnumArgs { clone: true } + } else { + parse(args).expect("failed to parse args of #[ast_node]") + }; + + let clone = if args.clone { + Some(quote!(#[derive(::swc_common::arena::CloneIn)])) + } else { + None + }; + + let ident = input.ident.clone(); + let ident = if input.generics.lifetimes().count() > 0 { + quote!(#ident<'a>) + } else { + quote!(#ident) + }; + + item.extend(quote!( + #[allow(clippy::derive_partial_eq_without_eq)] + #[cfg_attr( + feature = "serde-impl", + derive( + ::serde::Serialize, + ) + )] + #[derive( + ::swc_common::FromVariant, + ::swc_common::Spanned, + Debug, + PartialEq, + )] + #clone + #[cfg_attr( + feature = "rkyv-impl", + derive(rkyv::Archive, rkyv::Serialize) + )] + #[cfg_attr(feature = "rkyv-impl", repr(u32))] + #[cfg_attr( + feature = "rkyv-impl", + rkyv(serialize_bounds(__S: rkyv::ser::Writer + rkyv::ser::Allocator, + __S::Error: rkyv::rancor::Source)) + )] + #[cfg_attr( + feature = "rkyv-impl", + rkyv(bytecheck(bounds( + __C: rkyv::validation::ArchiveContext, + __C::Error: rkyv::rancor::Source + ))) + )] + #[cfg_attr( + feature = "serde-impl", + serde(untagged) + )] + #input + )); + + // item.extend(quote! { + // impl<'a> swc_allocator::IntoWith<'a, Box<'a, #ident>> for + // #ident { fn into_with(self, allocator: &'a + // swc_allocator::Allocator) -> Box<'a, #ident> { + // swc_allocator::arena::Box::new_in(self, allocator) + // } + // } + // }); + } + _ => { + let args: Option = if args.is_empty() { + None + } else { + Some(parse(args).expect("failed to parse args of #[ast_node]")) + }; + + let serde_tag = match input.data { + Data::Struct(DataStruct { + fields: Fields::Named(..), + .. + }) => { + if args.is_some() { + Some(quote!(#[cfg_attr( + feature = "serde-impl", + serde(tag = "type") + )])) + } else { + None + } + } + _ => None, + }; + + let serde_rename = args.as_ref().map(|args| { + let name = &args.ty; + + quote!(#[cfg_attr( + feature = "serde-impl", + serde(rename = #name) + )]) + }); + + let ast_node_impl = args + .as_ref() + .map(|args| ast_node_macro::expand_struct(args.clone(), input.clone())); + + let ident = input.ident.clone(); + let ident = if input.generics.lifetimes().count() > 0 { + quote!(#ident<'a>) + } else { + quote!(#ident) + }; + + item.extend(quote!( + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(::swc_common::Spanned, ::swc_common::arena::CloneIn, Debug, PartialEq)] + #[cfg_attr( + feature = "serde-impl", + derive(::serde::Serialize) + )] + #[cfg_attr( + feature = "rkyv-impl", + derive(rkyv::Archive, rkyv::Serialize) + )] + #[cfg_attr( + feature = "rkyv-impl", + rkyv(bytecheck(bounds( + __C: rkyv::validation::ArchiveContext, + __C::Error: rkyv::rancor::Source + ))) + )] + #[cfg_attr(feature = "rkyv-impl", repr(C))] + #[cfg_attr( + feature = "rkyv-impl", + rkyv(serialize_bounds(__S: rkyv::ser::Writer + rkyv::ser::Allocator, + __S::Error: rkyv::rancor::Source)) + )] + #serde_tag + #[cfg_attr( + feature = "serde-impl", + serde(rename_all = "camelCase") + )] + #serde_rename + #input + )); + + if let Some(items) = ast_node_impl { + for item_impl in items { + item.extend(item_impl.into_token_stream()); + } + } + + // item.extend(quote! { + // impl<'a> swc_allocator::IntoWith<'a, Box<'a, #ident>> for + // #ident { fn into_with(self, allocator: &'a + // swc_allocator::Allocator) -> Box<'a, #ident> { + // swc_allocator::arean::Box::new_in(self, allocator) + // } + // } + // }); + } + }; + + print("ast_node", item) +} diff --git a/crates/swc_allocator/Cargo.toml b/crates/swc_allocator/Cargo.toml index 30b82b681948..6cc60ea5833a 100644 --- a/crates/swc_allocator/Cargo.toml +++ b/crates/swc_allocator/Cargo.toml @@ -27,6 +27,7 @@ bumpalo = { workspace = true, features = [ "allocator-api2", ] } hashbrown = { workspace = true } +num-bigint = { workspace = true } ptr_meta = { workspace = true } rancor = { workspace = true, optional = true } rkyv = { workspace = true, optional = true } diff --git a/crates/swc_allocator/src/arena/alloc.rs b/crates/swc_allocator/src/arena/alloc.rs new file mode 100644 index 000000000000..11eb38b1451b --- /dev/null +++ b/crates/swc_allocator/src/arena/alloc.rs @@ -0,0 +1,23 @@ +use std::ops::{Deref, DerefMut}; + +use bumpalo::Bump; + +/// The actual storage for [FastAlloc]. +#[derive(Debug, Default)] +pub struct Allocator { + alloc: Bump, +} + +impl Deref for Allocator { + type Target = Bump; + + fn deref(&self) -> &Bump { + &self.alloc + } +} + +impl DerefMut for Allocator { + fn deref_mut(&mut self) -> &mut Bump { + &mut self.alloc + } +} diff --git a/crates/swc_allocator/src/arena/boxed/mod.rs b/crates/swc_allocator/src/arena/boxed/mod.rs new file mode 100644 index 000000000000..13e05472a94a --- /dev/null +++ b/crates/swc_allocator/src/arena/boxed/mod.rs @@ -0,0 +1,160 @@ +//! Faster box type +use std::ops; + +use super::Allocator; + +#[cfg(feature = "rkyv")] +mod rkyv; +#[cfg(feature = "serde")] +mod serde; + +/// Faster alterantive for [`std::boxed::Box`]. +#[repr(transparent)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct Box<'a, T: ?Sized>(pub(crate) bumpalo::boxed::Box<'a, T>); + +impl<'a, T> Box<'a, T> { + /// Allocates memory in the given allocator then places `x` into it. + /// + /// This doesn't actually allocate if `T` is zero-sized. + /// + /// # Examples + /// + /// ``` + /// #![feature(allocator_api)] + /// + /// use std::alloc::System; + /// + /// let five = Box::new_in(5, System); + /// ``` + #[inline(always)] + pub fn new_in(x: T, a: &'a Allocator) -> Box<'a, T> { + Box(bumpalo::boxed::Box::new_in(x, a)) + } + + /// Take ownership of the value stored in this [`Box`], consuming the box in + /// the process. + pub fn into_inner(self) -> T { + bumpalo::boxed::Box::<'a, T>::into_inner(self.0) + } +} + +impl<'a, T: ?Sized> Box<'a, T> { + /// Constructs a box from a raw pointer. + /// + /// After calling this function, the raw pointer is owned by the + /// resulting `Box`. Specifically, the `Box` destructor will call + /// the destructor of `T` and free the allocated memory. For this + /// to be safe, the memory must have been allocated in accordance + /// with the [memory layout] used by `Box` . + /// + /// # Safety + /// + /// This function is unsafe because improper use may lead to + /// memory problems. For example, a double-free may occur if the + /// function is called twice on the same raw pointer. + /// + /// The safety conditions are described in the [memory layout] section. + /// + /// # Examples + /// + /// Recreate a `Box` which was previously converted to a raw pointer + /// using [`Box::into_raw`]: + /// ``` + /// let x = Box::new(5); + /// let ptr = Box::into_raw(x); + /// let x = unsafe { Box::from_raw(ptr) }; + /// ``` + /// Manually create a `Box` from scratch by using the global allocator: + /// ``` + /// use std::alloc::{alloc, Layout}; + /// + /// unsafe { + /// let ptr = alloc(Layout::new::()) as *mut i32; + /// // In general .write is required to avoid attempting to destruct + /// // the (uninitialized) previous contents of `ptr`, though for this + /// // simple example `*ptr = 5` would have worked as well. + /// ptr.write(5); + /// let x = Box::from_raw(ptr); + /// } + /// ``` + /// + /// [memory layout]: self#memory-layout + /// [`Layout`]: crate::Layout + #[inline(always)] + pub unsafe fn from_raw(ptr: *mut T) -> Box<'a, T> { + Box(bumpalo::boxed::Box::from_raw(ptr)) + } + + /// consumes the `box`, returning a wrapped raw pointer. + /// + /// the pointer will be properly aligned and non-null. + /// + /// after calling this function, the caller is responsible for the + /// value previously managed by the `box`. in particular, the + /// caller should properly destroy `t`. the easiest way to + /// do this is to convert the raw pointer back into a `box` with the + /// [`box::from_raw`] function, allowing the `box` destructor to perform + /// the cleanup. + /// + /// note: this is an associated function, which means that you have + /// to call it as `box::into_raw(b)` instead of `b.into_raw()`. this + /// is so that there is no conflict with a method on the inner type. + /// + /// # examples + /// + /// converting the raw pointer back into a `box` with [`box::from_raw`] + /// for automatic cleanup: + /// ``` + /// use bumpalo::{bump, boxed::box}; + /// + /// let b = bump::new(); + /// + /// let x = box::new_in(string::from("hello"), &b); + /// let ptr = box::into_raw(x); + /// let x = unsafe { box::from_raw(ptr) }; // note that new `x`'s lifetime is unbound. it must be bound to the `b` immutable borrow before `b` is reset. + /// ``` + /// manual cleanup by explicitly running the destructor: + /// ``` + /// use std::ptr; + /// use bumpalo::{bump, boxed::box}; + /// + /// let b = bump::new(); + /// + /// let mut x = box::new_in(string::from("hello"), &b); + /// let p = box::into_raw(x); + /// unsafe { + /// ptr::drop_in_place(p); + /// } + /// ``` + #[inline] + pub fn into_raw(b: Box<'a, T>) -> *mut T { + bumpalo::boxed::Box::into_raw(b.0) + } +} + +impl ops::Deref for Box<'_, T> { + type Target = T; + + fn deref(&self) -> &T { + self.0.as_ref() + } +} + +impl ops::DerefMut for Box<'_, T> { + fn deref_mut(&mut self) -> &mut T { + self.0.as_mut() + } +} + +impl AsRef for Box<'_, T> { + fn as_ref(&self) -> &T { + self + } +} + +impl AsMut for Box<'_, T> { + fn as_mut(&mut self) -> &mut T { + self + } +} diff --git a/crates/swc_allocator/src/arena/boxed/rkyv.rs b/crates/swc_allocator/src/arena/boxed/rkyv.rs new file mode 100644 index 000000000000..49d53300bc02 --- /dev/null +++ b/crates/swc_allocator/src/arena/boxed/rkyv.rs @@ -0,0 +1,82 @@ +use rancor::Fallible; +use rkyv::{ + boxed::{ArchivedBox, BoxResolver}, + Archive, ArchiveUnsized, Place, Serialize, SerializeUnsized, +}; + +use super::Box; + +impl Archive for Box<'_, T> { + type Archived = ArchivedBox; + type Resolver = BoxResolver; + + #[inline] + fn resolve(&self, resolver: Self::Resolver, out: Place) { + ArchivedBox::resolve_from_ref(self.as_ref(), resolver, out); + } +} + +impl + ?Sized, S: Fallible + ?Sized> Serialize for Box<'_, T> { + fn serialize( + &self, + serializer: &mut S, + ) -> Result::Error> { + ArchivedBox::serialize_from_ref(self.as_ref(), serializer) + } +} + +// impl Deserialize, D> for ArchivedBox +// where +// T: ArchiveUnsized + LayoutRaw + ?Sized, +// T::Archived: DeserializeUnsized, +// D: Fallible + ?Sized, +// D::Error: Source, +// { +// fn deserialize(&self, deserializer: &mut D) -> Result, D::Error> { +// let metadata = self.get().deserialize_metadata(); +// let layout = T::layout_raw(metadata).into_error()?; +// let data_address = if layout.size() > 0 { +// unsafe { alloc::alloc(layout) } +// } else { +// polyfill::dangling(&layout).as_ptr() +// }; + +// let out = ptr_meta::from_raw_parts_mut(data_address.cast(), +// metadata); + +// unsafe { +// self.get().deserialize_unsized(deserializer, out)?; +// } +// unsafe { Ok(Box::from_raw(out)) } +// } +// } + +// impl + ?Sized, U: ?Sized> PartialEq> +// for ArchivedBox { #[inline] +// fn eq(&self, other: &Box) -> bool { +// self.get().eq(other.as_ref()) +// } +// } + +// impl + ?Sized, U: ?Sized> +// PartialOrd> for ArchivedBox { #[inline] +// fn partial_cmp(&self, other: &Box) -> Option { +// self.get().partial_cmp(other.as_ref()) +// } +// } + +// mod polyfill { + +// use core::{alloc::Layout, ptr::NonNull}; + +// pub fn dangling(layout: &Layout) -> NonNull { +// #[cfg(miri)] +// { +// layout.dangling() +// } +// #[cfg(not(miri))] +// unsafe { +// NonNull::new_unchecked(layout.align() as *mut u8) +// } +// } +// } diff --git a/crates/swc_allocator/src/arena/boxed/serde.rs b/crates/swc_allocator/src/arena/boxed/serde.rs new file mode 100644 index 000000000000..4a2a4b80d4a6 --- /dev/null +++ b/crates/swc_allocator/src/arena/boxed/serde.rs @@ -0,0 +1,27 @@ +use serde::{Serialize, Serializer}; + +use super::Box; + +impl Serialize for Box<'_, T> +where + T: Serialize, +{ + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + self.0.serialize(serializer) + } +} + +// impl<'de, T> Deserialize<'de> for Box<'de, T> +// where +// T: Deserialize<'de>, +// { +// fn deserialize(deserializer: D) -> Result, D::Error> +// where +// D: Deserializer<'de>, +// { +// Ok(Box(T::deserialize(deserializer)?)) +// } +// } diff --git a/crates/swc_allocator/src/arena/clone_in.rs b/crates/swc_allocator/src/arena/clone_in.rs new file mode 100644 index 000000000000..6561eb4f9a20 --- /dev/null +++ b/crates/swc_allocator/src/arena/clone_in.rs @@ -0,0 +1,112 @@ +/// References: +/// +/// +/// The original code is MIT licensed. +use std::cell::Cell; + +use super::{Allocator, Box, Vec}; + +/// A trait to explicitly clone an object into an arena allocator. +/// +/// As a convention `Cloned` associated type should always be the same as +/// `Self`, It'd only differ in the lifetime, Here's an example: +/// +/// ``` +/// impl<'old_alloc, 'new_alloc> CloneIn<'new_alloc> for Struct<'old_alloc> { +/// type Cloned = Struct<'new_alloc>; +/// fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned { +/// Struct { a: self.a.clone_in(allocator), b: self.b.clone_in(allocator) } +/// } +/// } +/// ``` +/// +/// Implementations of this trait on non-allocated items usually short-circuit +/// to `Clone::clone`; However, it **isn't** guaranteed. +pub trait CloneIn<'new_alloc>: Sized { + /// The type of the cloned object. + /// + /// This should always be `Self` with a different lifetime. + type Cloned; + + /// Clone `self` into the given `allocator`. `allocator` may be the same one + /// that `self` is already in. + fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned; +} + +impl<'alloc, T, C> CloneIn<'alloc> for Option +where + T: CloneIn<'alloc, Cloned = C>, +{ + type Cloned = Option; + + fn clone_in(&self, allocator: &'alloc Allocator) -> Self::Cloned { + self.as_ref().map(|it| it.clone_in(allocator)) + } +} + +impl<'new_alloc, T, C: 'new_alloc> CloneIn<'new_alloc> for Box<'_, T> +where + T: CloneIn<'new_alloc, Cloned = C>, +{ + type Cloned = Box<'new_alloc, C>; + + fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned { + Box::new_in(self.as_ref().clone_in(allocator), allocator) + } +} + +impl<'new_alloc, T, C: 'new_alloc> CloneIn<'new_alloc> for Vec<'_, T> +where + T: CloneIn<'new_alloc, Cloned = C>, +{ + type Cloned = Vec<'new_alloc, C>; + + fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned { + Vec::from_iter_in(self.iter().map(|it| it.clone_in(allocator)), allocator) + } +} + +impl<'alloc, T: Copy> CloneIn<'alloc> for Cell { + type Cloned = Cell; + + fn clone_in(&self, _: &'alloc Allocator) -> Self::Cloned { + Cell::new(self.get()) + } +} + +impl<'new_alloc> CloneIn<'new_alloc> for &str { + type Cloned = &'new_alloc str; + + fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned { + allocator.alloc_str(self) + } +} + +macro_rules! impl_clone_in { + ($($t:ty)*) => { + $( + impl<'alloc> CloneIn<'alloc> for $t { + type Cloned = Self; + #[inline(always)] + fn clone_in(&self, _: &'alloc Allocator) -> Self { + *self + } + } + )* + } +} + +impl_clone_in! { + usize u8 u16 u32 u64 u128 + isize i8 i16 i32 i64 i128 + f32 f64 + bool char +} + +impl<'a> CloneIn<'a> for num_bigint::BigInt { + type Cloned = num_bigint::BigInt; + + fn clone_in(&self, _: &'a Allocator) -> Self::Cloned { + self.clone() + } +} diff --git a/crates/swc_allocator/src/arena/mod.rs b/crates/swc_allocator/src/arena/mod.rs new file mode 100644 index 000000000000..26d06a1548f6 --- /dev/null +++ b/crates/swc_allocator/src/arena/mod.rs @@ -0,0 +1,12 @@ +//! Experimental arena allocator + +mod alloc; +mod boxed; +mod clone_in; +mod vec; + +pub use alloc::Allocator; + +pub use boxed::Box; +pub use clone_in::CloneIn; +pub use vec::Vec; diff --git a/crates/swc_allocator/src/arena/vec/mod.rs b/crates/swc_allocator/src/arena/vec/mod.rs new file mode 100644 index 000000000000..2f2c560c5bf2 --- /dev/null +++ b/crates/swc_allocator/src/arena/vec/mod.rs @@ -0,0 +1,229 @@ +//! Faster vec type. +use std::ops::{Deref, DerefMut}; + +use super::{Allocator, Box}; + +#[cfg(feature = "rkyv")] +mod rkyv; +#[cfg(feature = "serde")] +mod serde; + +/// Faster version of [`std::vec::Vec`]. +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[repr(transparent)] +pub struct Vec<'a, T>(bumpalo::collections::Vec<'a, T>); + +impl<'a, T> Vec<'a, T> { + /// Constructs a new, empty `Vec`. + /// + /// The vector will not allocate until elements are pushed onto it. + /// + /// # Examples + /// + /// ``` + /// # #![allow(unused_mut)] + /// let mut vec: Vec = Vec::new(); + /// ``` + /// + /// Note: This is slower than using [Self::new_in] with cached [FastAlloc]. + #[inline(always)] + pub fn new_in(alloc: &'a Allocator) -> Self { + Self(bumpalo::collections::Vec::new_in(alloc)) + } + + /// Constructs a new, empty `Vec` with at least the specified capacity + /// with the provided allocator. + /// + /// The vector will be able to hold at least `capacity` elements without + /// reallocating. This method is allowed to allocate for more elements than + /// `capacity`. If `capacity` is 0, the vector will not allocate. + /// + /// It is important to note that although the returned vector has the + /// minimum *capacity* specified, the vector will have a zero *length*. For + /// an explanation of the difference between length and capacity, see + /// *[Capacity and reallocation]*. + /// + /// If it is important to know the exact allocated capacity of a `Vec`, + /// always use the [`capacity`] method after construction. + /// + /// For `Vec` where `T` is a zero-sized type, there will be no + /// allocation and the capacity will always be `usize::MAX`. + /// + /// [Capacity and reallocation]: #capacity-and-reallocation + /// [`capacity`]: Vec::capacity + /// + /// # Panics + /// + /// Panics if the new capacity exceeds `isize::MAX` bytes. + /// + /// See [std::vec::Vec::with_capacity_in] for more information. + #[inline(always)] + pub fn with_capacity_in(capacity: usize, alloc: &'a Allocator) -> Self { + Self(bumpalo::collections::Vec::with_capacity_in(capacity, alloc)) + } + + /// Create a new [`Vec`] whose elements are taken from an iterator and + /// allocated in the given `allocator`. + /// + /// This is behaviorially identical to [`FromIterator::from_iter`]. + #[inline] + pub fn from_iter_in>(iter: I, allocator: &'a Allocator) -> Self { + let iter = iter.into_iter(); + let hint = iter.size_hint(); + let capacity = hint.1.unwrap_or(hint.0); + let mut vec = Vec::with_capacity_in(capacity, allocator); + vec.extend(iter); + vec + } + + /// Converts the vector into [`Box<[T]>`][owned slice]. + /// + /// Before doing the conversion, this method discards excess capacity like + /// [`shrink_to_fit`]. + /// + /// [owned slice]: Box + /// [`shrink_to_fit`]: Vec::shrink_to_fit + /// + /// # Examples + /// + /// ``` + /// let v = vec![1, 2, 3]; + /// + /// let slice = v.into_boxed_slice(); + /// ``` + /// + /// Any excess capacity is removed: + /// + /// ``` + /// let mut vec = Vec::with_capacity(10); + /// vec.extend([1, 2, 3]); + /// + /// assert!(vec.capacity() >= 10); + /// let slice = vec.into_boxed_slice(); + /// assert_eq!(slice.into_vec().capacity(), 3); + /// ``` + #[inline(always)] + pub fn into_boxed_slice(self) -> Box<'a, [T]> { + Box(self.0.into_boxed_slice()) + } +} + +impl<'a, T> Deref for Vec<'a, T> { + type Target = bumpalo::collections::Vec<'a, T>; + + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl DerefMut for Vec<'_, T> { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + +impl<'a, T> IntoIterator for Vec<'a, T> { + type IntoIter = as IntoIterator>::IntoIter; + type Item = T; + + #[inline(always)] + fn into_iter(self) -> Self::IntoIter { + self.0.into_iter() + } +} + +impl<'a, T> IntoIterator for &'a Vec<'a, T> { + type IntoIter = std::slice::Iter<'a, T>; + type Item = &'a T; + + #[inline(always)] + fn into_iter(self) -> Self::IntoIter { + self.iter() + } +} + +impl<'a, T> IntoIterator for &'a mut Vec<'a, T> { + type IntoIter = std::slice::IterMut<'a, T>; + type Item = &'a mut T; + + #[inline(always)] + fn into_iter(self) -> Self::IntoIter { + self.iter_mut() + } +} + +impl Extend for Vec<'_, T> { + #[inline(always)] + fn extend>(&mut self, iter: I) { + self.0.extend(iter) + } +} + +impl AsRef<[T]> for Vec<'_, T> { + #[inline(always)] + fn as_ref(&self) -> &[T] { + self.0.as_ref() + } +} + +/// Creates a [`Vec`] containing the arguments. +/// +/// `vec!` allows `Vec`s to be defined with the same syntax as array +/// expressions. There are two forms of this macro: +/// +/// - Create a [`Vec`] containing a given list of elements: +/// +/// ``` +/// use bumpalo::Bump; +/// +/// let b = Bump::new(); +/// let v = bumpalo::vec![in &b; 1, 2, 3]; +/// assert_eq!(v, [1, 2, 3]); +/// ``` +/// +/// - Create a [`Vec`] from a given element and size: +/// +/// ``` +/// use bumpalo::Bump; +/// +/// let b = Bump::new(); +/// let v = bumpalo::vec![in &b; 1; 3]; +/// assert_eq!(v, [1, 1, 1]); +/// ``` +/// +/// Note that unlike array expressions, this syntax supports all elements +/// which implement [`Clone`] and the number of elements doesn't have to be +/// a constant. +/// +/// This will use `clone` to duplicate an expression, so one should be careful +/// using this with types having a non-standard `Clone` implementation. For +/// example, `bumpalo::vec![in ≎ Rc::new(1); 5]` will create a vector of +/// five references to the same boxed integer value, not five references +/// pointing to independently boxed integers. +/// +/// [`Vec`]: collections/vec/struct.Vec.html +/// [`Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html +#[macro_export] +macro_rules! vec { + (in $alloc:expr; $elem:expr; $n:expr) => {{ + let n = $n; + let mut v = swc_allocator::arena::Vec::with_capacity_in(n, $alloc); + if n > 0 { + let elem = $elem; + for _ in 0..n - 1 { + v.push(elem.clone()); + } + v.push(elem); + } + v + }}; + (in $alloc:expr) => { swc_allocator::arena::Vec::new_in($alloc) }; + (in $alloc:expr; $($x:expr),*) => {{ + let mut v = swc_allocator::arena::Vec::new_in($alloc); + $( v.push($x); )* + v + }}; + (in $alloc:expr; $($x:expr,)*) => (swc_allocator::vec![in $alloc; $($x),*]) +} diff --git a/crates/swc_allocator/src/arena/vec/rkyv.rs b/crates/swc_allocator/src/arena/vec/rkyv.rs new file mode 100644 index 000000000000..5b8a9d244308 --- /dev/null +++ b/crates/swc_allocator/src/arena/vec/rkyv.rs @@ -0,0 +1,68 @@ +use rancor::Fallible; +use rkyv::{ + ser::{Allocator, Writer}, + vec::ArchivedVec, + Archive, +}; + +use super::Vec; + +impl Archive for Vec<'_, T> +where + T: Archive, +{ + type Archived = ArchivedVec; + type Resolver = rkyv::vec::VecResolver; + + fn resolve(&self, resolver: Self::Resolver, out: rkyv::Place) { + ArchivedVec::resolve_from_slice(self, resolver, out); + } +} + +impl, S: Fallible + Allocator + Writer + ?Sized> rkyv::Serialize + for Vec<'_, T> +{ + fn serialize( + &self, + serializer: &mut S, + ) -> Result::Error> { + ArchivedVec::::serialize_from_slice(self, serializer) + } +} + +// impl Deserialize, D> for +// ArchivedVec where +// [T::Archived]: DeserializeUnsized<[T], D>, +// D::Error: Source, +// { +// fn deserialize(&self, deserializer: &mut D) -> Result, ::Error> { let metadata = +// self.as_slice().deserialize_metadata(); let layout = <[T] as +// LayoutRaw>::layout_raw(metadata).into_error()?; let data_address = if +// layout.size() > 0 { unsafe { alloc::alloc(layout) } +// } else { +// polyfill::dangling(&layout).as_ptr() +// }; +// let out = ptr_meta::from_raw_parts_mut(data_address.cast(), +// metadata); unsafe { +// self.as_slice().deserialize_unsized(deserializer, out)?; +// } +// unsafe { Ok(Box::<[T]>::from_raw(out).into()) } +// } +// } + +// mod polyfill { + +// use core::{alloc::Layout, ptr::NonNull}; + +// pub fn dangling(layout: &Layout) -> NonNull { +// #[cfg(miri)] +// { +// layout.dangling() +// } +// #[cfg(not(miri))] +// unsafe { +// NonNull::new_unchecked(layout.align() as *mut u8) +// } +// } +// } diff --git a/crates/swc_allocator/src/arena/vec/serde.rs b/crates/swc_allocator/src/arena/vec/serde.rs new file mode 100644 index 000000000000..1ded9161345d --- /dev/null +++ b/crates/swc_allocator/src/arena/vec/serde.rs @@ -0,0 +1,30 @@ +use serde::{Serialize, Serializer}; + +use super::Vec; + +impl Serialize for Vec<'_, T> +where + T: Serialize, +{ + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + self.as_slice().serialize(serializer) + } +} + +// impl<'de, T> Deserialize<'de> for Vec +// where +// T: Deserialize<'de>, +// { +// fn deserialize(deserializer: D) -> Result, D::Error> +// where +// D: Deserializer<'de>, +// { +// let visitor = VecVisitor { +// marker: PhantomData, +// }; +// deserializer.deserialize_seq(visitor) +// } +// } diff --git a/crates/swc_allocator/src/lib.rs b/crates/swc_allocator/src/lib.rs index 1ca1f9deb4a5..5d1598480537 100644 --- a/crates/swc_allocator/src/lib.rs +++ b/crates/swc_allocator/src/lib.rs @@ -37,6 +37,7 @@ pub use crate::alloc::Allocator; mod alloc; +pub mod arena; #[cfg(feature = "nightly")] pub mod boxed; pub mod collections; diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc_atoms/Cargo.toml index b55f2ba7d42b..51d348342d9a 100644 --- a/crates/swc_atoms/Cargo.toml +++ b/crates/swc_atoms/Cargo.toml @@ -17,11 +17,12 @@ rkyv-impl = ["__rkyv", "rkyv", "bytecheck", "rancor"] [dependencies] # bytecheck version should be in sync with rkyv version. Do not bump individually. -arbitrary = { workspace = true, optional = true } -bytecheck = { workspace = true, optional = true } -hstr = { workspace = true } -once_cell = { workspace = true } -rancor = { workspace = true, optional = true } -rkyv = { workspace = true, optional = true } -rustc-hash = { workspace = true } -serde = { workspace = true } +arbitrary = { workspace = true, optional = true } +bytecheck = { workspace = true, optional = true } +hstr = { workspace = true } +once_cell = { workspace = true } +rancor = { workspace = true, optional = true } +rkyv = { workspace = true, optional = true } +rustc-hash = { workspace = true } +serde = { workspace = true } +swc_allocator = { version = "2.0.0", path = "../swc_allocator" } diff --git a/crates/swc_atoms/src/lib.rs b/crates/swc_atoms/src/lib.rs index 1ed9365a6ca1..4cda2c392df4 100644 --- a/crates/swc_atoms/src/lib.rs +++ b/crates/swc_atoms/src/lib.rs @@ -20,6 +20,7 @@ use std::{ use once_cell::sync::Lazy; use serde::Serializer; +use swc_allocator::arena::CloneIn; pub use self::{atom as js_word, Atom as JsWord}; @@ -32,6 +33,14 @@ pub use self::{atom as js_word, Atom as JsWord}; #[cfg_attr(feature = "rkyv-impl", repr(C))] pub struct Atom(hstr::Atom); +impl<'a> CloneIn<'a> for Atom { + type Cloned = Atom; + + fn clone_in(&self, _: &'a swc_allocator::arena::Allocator) -> Self::Cloned { + self.clone() + } +} + #[cfg(feature = "arbitrary")] #[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] impl<'a> arbitrary::Arbitrary<'a> for Atom { diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index b5d7203155ba..40d1a5be1f90 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -59,6 +59,7 @@ unicode-width = { workspace = true } url = { workspace = true } ast_node = { version = "3.0.0", path = "../ast_node" } +ast_node_arena = { version = "3.0.0", path = "../ast_node_arena" } better_scoped_tls = { version = "1.0.0", path = "../better_scoped_tls" } from_variant = { version = "2.0.0", path = "../from_variant" } swc_allocator = { version = "2.0.0", path = "../swc_allocator", default-features = false } diff --git a/crates/swc_common/src/arena.rs b/crates/swc_common/src/arena.rs new file mode 100644 index 000000000000..60557154c9fa --- /dev/null +++ b/crates/swc_common/src/arena.rs @@ -0,0 +1,125 @@ +use std::{fmt::Debug, mem::replace}; + +pub use ast_node_arena::{ast_node, CloneIn}; +use swc_allocator::arena::{Allocator, Box, CloneIn, Vec}; + +use crate::{BytePos, EqIgnoreSpan, Span, Spanned, SyntaxContext, TypeEq, DUMMY_SP}; + +pub trait AstNode<'a>: Debug + PartialEq + CloneIn<'a> + Spanned { + const TYPE: &'static str; +} + +impl EqIgnoreSpan for Vec<'_, T> +where + T: EqIgnoreSpan, +{ + fn eq_ignore_span(&self, other: &Self) -> bool { + self.len() == other.len() + && self + .iter() + .zip(other.iter()) + .all(|(a, b)| a.eq_ignore_span(b)) + } +} + +impl EqIgnoreSpan for Box<'_, N> +where + N: EqIgnoreSpan, +{ + #[inline] + fn eq_ignore_span(&self, other: &Self) -> bool { + (**self).eq_ignore_span(&**other) + } +} + +impl TypeEq for Box<'_, N> +where + N: TypeEq, +{ + #[inline] + fn type_eq(&self, other: &Self) -> bool { + (**self).type_eq(&**other) + } +} + +impl<'a> CloneIn<'a> for SyntaxContext { + type Cloned = SyntaxContext; + + fn clone_in(&self, _: &'a Allocator) -> Self::Cloned { + *self + } +} +impl Spanned for Box<'_, S> +where + S: ?Sized + Spanned, +{ + fn span(&self) -> Span { + ::span(self) + } + + #[inline] + fn span_lo(&self) -> BytePos { + ::span_lo(self) + } + + #[inline] + fn span_hi(&self) -> BytePos { + ::span_hi(self) + } +} + +impl<'a> CloneIn<'a> for BytePos { + type Cloned = BytePos; + + fn clone_in(&self, _: &'a Allocator) -> Self::Cloned { + BytePos(self.0) + } +} + +pub trait Take<'a>: Sized { + fn take(&mut self, alloc: &'a Allocator) -> Self { + replace(self, Self::dummy(alloc)) + } + + /// Create a dummy value of this type. + fn dummy(alloc: &'a Allocator) -> Self; + + /// Mutate `self` using `op`, which accepts owned data. + #[inline] + fn map_with_mut(&mut self, alloc: &'a Allocator, op: F) + where + F: FnOnce(Self) -> Self, + { + let dummy = Self::dummy(alloc); + let cur_val = replace(self, dummy); + let new_val = op(cur_val); + let _dummy = replace(self, new_val); + } +} + +impl<'a, T> Take<'a> for Option { + fn dummy(_: &'a Allocator) -> Self { + None + } +} + +impl<'a, T> Take<'a> for Box<'a, T> +where + T: Take<'a>, +{ + fn dummy(alloc: &'a Allocator) -> Self { + Box::new_in(T::dummy(alloc), alloc) + } +} + +impl<'a, T> Take<'a> for Vec<'a, T> { + fn dummy(alloc: &'a Allocator) -> Self { + Vec::new_in(alloc) + } +} + +impl<'a> Take<'a> for Span { + fn dummy(_: &'a Allocator) -> Self { + DUMMY_SP + } +} diff --git a/crates/swc_common/src/lib.rs b/crates/swc_common/src/lib.rs index 7f8e8e07fa92..f07888651fd9 100644 --- a/crates/swc_common/src/lib.rs +++ b/crates/swc_common/src/lib.rs @@ -57,6 +57,7 @@ pub trait AstNode: Debug + PartialEq + Clone + Spanned { const TYPE: &'static str; } +pub mod arena; pub mod cache; pub mod collections; pub mod comments; diff --git a/crates/swc_common/src/syntax_pos.rs b/crates/swc_common/src/syntax_pos.rs index a02acd9d40d0..e94067dad8a3 100644 --- a/crates/swc_common/src/syntax_pos.rs +++ b/crates/swc_common/src/syntax_pos.rs @@ -9,6 +9,7 @@ use std::{ sync::atomic::AtomicU32, }; +use ast_node_arena::CloneIn; #[cfg(feature = "parking_lot")] use parking_lot::Mutex; use serde::{Deserialize, Serialize}; @@ -31,7 +32,7 @@ pub mod hygiene; /// able to use many of the functions on spans in `source_map` and you cannot /// assume that the length of the `span = hi - lo`; there may be space in the /// `BytePos` range between files. -#[derive(Clone, Copy, Hash, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] +#[derive(Clone, CloneIn, Copy, Hash, PartialEq, Eq, Ord, PartialOrd, Serialize, Deserialize)] #[cfg_attr( any(feature = "rkyv-impl"), derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index a7031cfeb317..eaa097d7e7c7 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -26,24 +26,28 @@ rkyv-impl = [ "rancor", "swc_atoms/rkyv-impl", "swc_common/rkyv-impl", + "swc_allocator/rkyv", ] serde-impl = ["serde"] [dependencies] -arbitrary = { workspace = true, features = ["derive"], optional = true } -bitflags = { workspace = true } -bytecheck = { workspace = true, optional = true } -is-macro = { workspace = true } -num-bigint = { workspace = true, features = ["serde"] } -phf = { workspace = true, features = ["macros"] } -rancor = { workspace = true, optional = true } -rkyv = { workspace = true, optional = true } -scoped-tls = { workspace = true } -serde = { workspace = true, features = ["derive"], optional = true } -string_enum = { version = "1.0.0", path = "../string_enum" } -swc_atoms = { version = "3.0.0", path = "../swc_atoms" } -swc_common = { version = "5.0.0", path = "../swc_common" } -swc_visit = { version = "2.0.0", path = "../swc_visit" } +arbitrary = { workspace = true, features = ["derive"], optional = true } +bitflags = { workspace = true } +bytecheck = { workspace = true, optional = true } +is-macro = { workspace = true } +num-bigint = { workspace = true, features = ["serde"] } +phf = { workspace = true, features = ["macros"] } +rancor = { workspace = true, optional = true } +rkyv = { workspace = true, optional = true } +scoped-tls = { workspace = true } +serde = { workspace = true, features = ["derive"], optional = true } +string_enum = { version = "1.0.0", path = "../string_enum" } +swc_allocator = { version = "2.0.0", path = "../swc_allocator", features = [ + "serde", +] } +swc_atoms = { version = "3.0.0", path = "../swc_atoms" } +swc_common = { version = "5.0.0", path = "../swc_common" } +swc_visit = { version = "2.0.0", path = "../swc_visit" } unicode-id-start = { workspace = true } [dev-dependencies] diff --git a/crates/swc_ecma_ast/src/arena/class.rs b/crates/swc_ecma_ast/src/arena/class.rs new file mode 100644 index 000000000000..263ac6b67026 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/class.rs @@ -0,0 +1,388 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + EqIgnoreSpan, Span, SyntaxContext, DUMMY_SP, +}; + +use super::{ + expr::Expr, + function::{Function, ParamOrTsParamProp}, + ident::PrivateName, + prop::PropName, + stmt::BlockStmt, + typescript::{ + Accessibility, TsExprWithTypeArgs, TsIndexSignature, TsTypeAnn, TsTypeParamDecl, + TsTypeParamInstantiation, + }, + BigInt, ComputedPropName, EmptyStmt, Id, Ident, IdentName, Number, +}; + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Class<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Vec<'a, ClassMember<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub super_class: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_abstract: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub super_type_params: Option>>, + + /// Typescript extension. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub implements: Vec<'a, TsExprWithTypeArgs<'a>>, +} + +impl<'a> Take<'a> for Class<'a> { + fn dummy(alloc: &'a swc_allocator::arena::Allocator) -> Self { + Class { + span: DUMMY_SP, + ctxt: SyntaxContext::default(), + decorators: Vec::new_in(alloc), + body: Vec::new_in(alloc), + super_class: None, + is_abstract: false, + type_params: None, + super_type_params: None, + implements: Vec::new_in(alloc), + } + } +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ClassMember<'a> { + // #[tag("Constructor")] + Constructor(Box<'a, Constructor<'a>>), + /// `es2015` + // #[tag("ClassMethod")] + Method(Box<'a, ClassMethod<'a>>), + // #[tag("PrivateMethod")] + PrivateMethod(Box<'a, PrivateMethod<'a>>), + /// stage 0 / Typescript + // #[tag("ClassProperty")] + ClassProp(Box<'a, ClassProp<'a>>), + // #[tag("PrivateProperty")] + PrivateProp(Box<'a, PrivateProp<'a>>), + // #[tag("TsIndexSignature")] + TsIndexSignature(Box<'a, TsIndexSignature<'a>>), + // #[tag("EmptyStatement")] + Empty(Box<'a, EmptyStmt>), + + /// Stage 3 + // #[tag("StaticBlock")] + StaticBlock(Box<'a, StaticBlock<'a>>), + + /// Stage 3 + // #[tag("AutoAccessor")] + AutoAccessor(Box<'a, AutoAccessor<'a>>), +} + +// impl Take for ClassMember { +// fn dummy() -> Self { +// ClassMember::Empty(EmptyStmt { span: DUMMY_SP }) +// } +// } + +#[ast_node("ClassProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ClassProp<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + + pub key: PropName<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub value: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_static: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + + /// Typescript extension. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + + /// Typescript extension. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_abstract: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_optional: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_override: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub readonly: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub declare: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub definite: bool, +} + +#[ast_node("PrivateProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct PrivateProp<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub ctxt: SyntaxContext, + + pub key: PrivateName, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub value: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_static: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + + /// Typescript extension. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_optional: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_override: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub readonly: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub definite: bool, +} + +#[ast_node("ClassMethod")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ClassMethod<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + pub key: PropName<'a>, + pub function: Box<'a, Function<'a>>, + pub kind: MethodKind, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_static: bool, + #[doc = r" Typescript extension."] + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + #[doc = r" Typescript extension."] + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_abstract: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_optional: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_override: bool, +} + +#[ast_node("PrivateMethod")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct PrivateMethod<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + pub key: PrivateName, + pub function: Box<'a, Function<'a>>, + pub kind: MethodKind, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_static: bool, + #[doc = r" Typescript extension."] + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + #[doc = r" Typescript extension."] + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_abstract: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_optional: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_override: bool, +} + +#[ast_node("Constructor")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Constructor<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub key: PropName<'a>, + + pub params: Vec<'a, ParamOrTsParamProp<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_optional: bool, +} + +#[ast_node("Decorator")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Decorator<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[derive(Debug, Clone, CloneIn, Copy, PartialEq, Eq, Hash, EqIgnoreSpan, Default)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] +pub enum MethodKind { + #[default] + #[cfg_attr(feature = "serde-impl", serde(rename = "method"))] + Method, + #[cfg_attr(feature = "serde-impl", serde(rename = "getter"))] + Getter, + #[cfg_attr(feature = "serde-impl", serde(rename = "setter"))] + Setter, +} + +#[ast_node("StaticBlock")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct StaticBlock<'a> { + pub span: Span, + pub body: BlockStmt<'a>, +} + +// impl Take for StaticBlock { +// fn dummy() -> Self { +// StaticBlock { +// span: DUMMY_SP, +// body: Take::dummy(), +// } +// } +// } + +/// Either a private name or a public name. +#[ast_node] +#[derive(Is, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Key<'a> { + // #[tag("PrivateName")] + Private(PrivateName), + // #[tag("Identifier")] + // #[tag("StringLiteral")] + // #[tag("NumericLiteral")] + // #[tag("Computed")] + // #[tag("BigIntLiteral")] + Public(PropName<'a>), +} + +// bridge_from!(Key, IdentName, Ident); +// bridge_from!(Key, PropName, IdentName); +// bridge_from!(Key, PropName, Id); +// bridge_from!(Key, PropName, Number); +// bridge_from!(Key, PropName, ComputedPropName); +// bridge_from!(Key, PropName, BigInt); + +// impl Take for Key { +// fn dummy() -> Self { +// Default::default() +// } +// } + +// impl Default for Key { +// fn default() -> Self { +// Key::Public(Default::default()) +// } +// } + +#[ast_node("AutoAccessor")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AutoAccessor<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + + pub key: Key<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub value: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_static: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + + /// Typescript extension. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_abstract: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_override: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub definite: bool, +} + +// impl Take for AutoAccessor { +// fn dummy() -> AutoAccessor { +// AutoAccessor { +// span: Take::dummy(), +// key: Take::dummy(), +// value: Take::dummy(), +// type_ann: None, +// is_static: false, +// decorators: Take::dummy(), +// accessibility: None, +// is_abstract: false, +// is_override: false, +// definite: false, +// } +// } +// } diff --git a/crates/swc_ecma_ast/src/arena/decl.rs b/crates/swc_ecma_ast/src/arena/decl.rs new file mode 100644 index 000000000000..8ee19135f552 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/decl.rs @@ -0,0 +1,220 @@ +use is_macro::Is; +use string_enum::StringEnum; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + EqIgnoreSpan, Span, SyntaxContext, DUMMY_SP, +}; + +use super::{ + class::Class, + expr::Expr, + function::Function, + ident::Ident, + pat::Pat, + typescript::{TsEnumDecl, TsInterfaceDecl, TsModuleDecl, TsTypeAliasDecl}, +}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Decl<'a> { + // #[tag("ClassDeclaration")] + Class(Box<'a, ClassDecl<'a>>), + // #[tag("FunctionDeclaration")] + #[is(name = "fn_decl")] + Fn(Box<'a, FnDecl<'a>>), + // #[tag("VariableDeclaration")] + Var(Box<'a, VarDecl<'a>>), + // #[tag("UsingDeclaration")] + Using(Box<'a, UsingDecl<'a>>), + + // #[tag("TsInterfaceDeclaration")] + TsInterface(Box<'a, TsInterfaceDecl<'a>>), + // #[tag("TsTypeAliasDeclaration")] + TsTypeAlias(Box<'a, TsTypeAliasDecl<'a>>), + // #[tag("TsEnumDeclaration")] + TsEnum(Box<'a, TsEnumDecl<'a>>), + // #[tag("TsModuleDeclaration")] + TsModule(Box<'a, TsModuleDecl<'a>>), +} + +// macro_rules! bridge_decl { +// ($($variant_ty:ty),*) => { +// $( +// bridge_from!(Decl<'a>, Box<'a, $variant_ty>, $variant_ty); +// bridge_from!(Box<'a, Decl<'a>>, Decl<'a>, $variant_ty); +// bridge_from!(crate::Stmt<'a>, Box<'a, Decl<'a>>, $variant_ty); +// bridge_from!(Box<'a, crate::Stmt<'a>>, crate::Stmt<'a>, +// $variant_ty); bridge_from!(crate::ModuleItem<'a>, Box<'a, +// crate::Stmt<'a>>, $variant_ty); )* +// }; +// } + +// bridge_decl!( +// ClassDecl<'a>, +// FnDecl<'a>, +// VarDecl<'a>, +// UsingDecl<'a>, +// TsInterfaceDecl<'a>, +// TsTypeAliasDecl<'a>, +// TsEnumDecl<'a>, +// TsModuleDecl<'a> +// ); + +// impl Take for Decl { +// fn dummy() -> Self { +// Decl::Var(Default::default()) +// } +// } + +#[ast_node("FunctionDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct FnDecl<'a> { + #[cfg_attr(feature = "serde-impl", serde(rename = "identifier"))] + pub ident: Ident, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub declare: bool, + + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[span] + pub function: Box<'a, Function<'a>>, +} + +// impl Take for FnDecl { +// fn dummy() -> Self { +// FnDecl { +// ident: Take::dummy(), +// declare: Default::default(), +// function: Take::dummy(), +// } +// } +// } + +#[ast_node("ClassDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ClassDecl<'a> { + #[cfg_attr(feature = "serde-impl", serde(rename = "identifier"))] + pub ident: Ident, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub declare: bool, + + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[span] + pub class: Box<'a, Class<'a>>, +} + +impl<'a> Take<'a> for ClassDecl<'a> { + fn dummy(alloc: &'a swc_allocator::arena::Allocator) -> Self { + Self { + ident: Ident::default(), + declare: false, + class: Box::new_in(Class::dummy(alloc), alloc), + } + } +} + +#[ast_node("VariableDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct VarDecl<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub kind: VarDeclKind, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub declare: bool, + + #[cfg_attr(feature = "serde-impl", serde(rename = "declarations"))] + pub decls: Vec<'a, VarDeclarator<'a>>, +} + +impl<'a> Take<'a> for VarDecl<'a> { + fn dummy(alloc: &'a swc_allocator::arena::Allocator) -> Self { + Self { + span: DUMMY_SP, + ctxt: SyntaxContext::default(), + kind: VarDeclKind::default(), + declare: false, + decls: Vec::new_in(alloc), + } + } +} + +#[derive( + StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default, +)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +pub enum VarDeclKind { + /// `var` + #[default] + Var, + /// `let` + Let, + /// `const` + Const, +} + +#[ast_node("VariableDeclarator")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct VarDeclarator<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "id"))] + pub name: Pat<'a>, + + /// Initialization expression. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub init: Option>, + + /// Typescript only + #[cfg_attr(feature = "serde-impl", serde(default))] + pub definite: bool, +} + +// impl Take for VarDeclarator { +// fn dummy() -> Self { +// VarDeclarator { +// span: DUMMY_SP, +// name: Take::dummy(), +// init: Take::dummy(), +// definite: Default::default(), +// } +// } +// } + +#[ast_node("UsingDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct UsingDecl<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_await: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decls: Vec<'a, VarDeclarator<'a>>, +} + +// impl Take for UsingDecl { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// is_await: Default::default(), +// decls: Take::dummy(), +// } +// } +// } diff --git a/crates/swc_ecma_ast/src/arena/expr.rs b/crates/swc_ecma_ast/src/arena/expr.rs new file mode 100644 index 000000000000..3f99e08ecad6 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/expr.rs @@ -0,0 +1,1711 @@ +#![allow(clippy::vec_box)] +use std::{borrow::Cow, mem::transmute}; + +use is_macro::Is; +use string_enum::StringEnum; +use swc_allocator::arena::{Allocator, Box, Vec}; +use swc_atoms::Atom; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + BytePos, EqIgnoreSpan, Span, Spanned, SyntaxContext, DUMMY_SP, +}; + +use super::{ + class::Class, + function::Function, + ident::{Ident, PrivateName}, + jsx::{JSXElement, JSXEmptyExpr, JSXFragment, JSXMemberExpr, JSXNamespacedName}, + lit::Lit, + pat::Pat, + prop::Prop, + stmt::BlockStmt, + typescript::{ + TsAsExpr, TsConstAssertion, TsInstantiation, TsNonNullExpr, TsSatisfiesExpr, TsTypeAnn, + TsTypeAssertion, TsTypeParamDecl, TsTypeParamInstantiation, + }, + ArrayPat, AssignOp, BinaryOp, BindingIdent, ComputedPropName, Id, IdentName, ImportPhase, + Invalid, KeyValueProp, Number, ObjectPat, PropName, Str, UnaryOp, UpdateOp, +}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Expr<'a> { + // #[tag("ThisExpression")] + This(Box<'a, ThisExpr>), + + // #[tag("ArrayExpression")] + Array(Box<'a, ArrayLit<'a>>), + + // #[tag("ObjectExpression")] + Object(Box<'a, ObjectLit<'a>>), + + // #[tag("FunctionExpression")] + #[is(name = "fn_expr")] + Fn(Box<'a, FnExpr<'a>>), + + // #[tag("UnaryExpression")] + Unary(Box<'a, UnaryExpr<'a>>), + + /// `++v`, `--v`, `v++`, `v--` + // #[tag("UpdateExpression")] + Update(Box<'a, UpdateExpr<'a>>), + + // #[tag("BinaryExpression")] + Bin(Box<'a, BinExpr<'a>>), + + // #[tag("AssignmentExpression")] + Assign(Box<'a, AssignExpr<'a>>), + + // + // Logical { + // + // op: LogicalOp, + // left: Box, + // right: Box, + // }, + /// A member expression. If computed is true, the node corresponds to a + /// computed (a[b]) member expression and property is an Expression. If + /// computed is false, the node corresponds to a static (a.b) member + /// expression and property is an Identifier. + // #[tag("MemberExpression")] + Member(Box<'a, MemberExpr<'a>>), + + // #[tag("SuperPropExpression")] + SuperProp(Box<'a, SuperPropExpr<'a>>), + + /// true ? 'a' : 'b' + // #[tag("ConditionalExpression")] + Cond(Box<'a, CondExpr<'a>>), + + // #[tag("CallExpression")] + Call(Box<'a, CallExpr<'a>>), + + /// `new Cat()` + // #[tag("NewExpression")] + New(Box<'a, NewExpr<'a>>), + + // #[tag("SequenceExpression")] + Seq(Box<'a, SeqExpr<'a>>), + + // #[tag("Identifier")] + Ident(Box<'a, Ident>), + + // #[tag("StringLiteral")] + // #[tag("BooleanLiteral")] + // #[tag("NullLiteral")] + // #[tag("NumericLiteral")] + // #[tag("RegExpLiteral")] + // #[tag("JSXText")] + // #[tag("BigIntLiteral")] + Lit(Box<'a, Lit<'a>>), + + // #[tag("TemplateLiteral")] + Tpl(Box<'a, Tpl<'a>>), + + // #[tag("TaggedTemplateExpression")] + TaggedTpl(Box<'a, TaggedTpl<'a>>), + + // #[tag("ArrowFunctionExpression")] + Arrow(Box<'a, ArrowExpr<'a>>), + + // #[tag("ClassExpression")] + Class(Box<'a, ClassExpr<'a>>), + + // #[tag("YieldExpression")] + #[is(name = "yield_expr")] + Yield(Box<'a, YieldExpr<'a>>), + + // #[tag("MetaProperty")] + MetaProp(Box<'a, MetaPropExpr>), + + // #[tag("AwaitExpression")] + #[is(name = "await_expr")] + Await(Box<'a, AwaitExpr<'a>>), + + // #[tag("ParenthesisExpression")] + Paren(Box<'a, ParenExpr<'a>>), + + // #[tag("JSXMemberExpression")] + JSXMember(Box<'a, JSXMemberExpr<'a>>), + + // #[tag("JSXNamespacedName")] + JSXNamespacedName(Box<'a, JSXNamespacedName>), + + // #[tag("JSXEmptyExpression")] + JSXEmpty(Box<'a, JSXEmptyExpr>), + + // #[tag("JSXElement")] + JSXElement(Box<'a, JSXElement<'a>>), + + // #[tag("JSXFragment")] + JSXFragment(Box<'a, JSXFragment<'a>>), + + // #[tag("TsTypeAssertion")] + TsTypeAssertion(Box<'a, TsTypeAssertion<'a>>), + + // #[tag("TsConstAssertion")] + TsConstAssertion(Box<'a, TsConstAssertion<'a>>), + + // #[tag("TsNonNullExpression")] + TsNonNull(Box<'a, TsNonNullExpr<'a>>), + + // #[tag("TsAsExpression")] + TsAs(Box<'a, TsAsExpr<'a>>), + + // #[tag("TsInstantiation")] + TsInstantiation(Box<'a, TsInstantiation<'a>>), + + // #[tag("TsSatisfiesExpression")] + TsSatisfies(Box<'a, TsSatisfiesExpr<'a>>), + + // #[tag("PrivateName")] + PrivateName(Box<'a, PrivateName>), + + // #[tag("OptionalChainingExpression")] + OptChain(Box<'a, OptChainExpr<'a>>), + + // #[tag("Invalid")] + Invalid(Box<'a, Invalid>), +} + +// Memory layout depends on the version of rustc. +// #[cfg(target_pointer_width = "64")] +// assert_eq_size!(Expr, [u8; 80]); + +impl<'a> Expr<'a> { + // /// Creates `void 0`. + // #[inline] + // pub fn undefined(span: Span) -> Box { + // UnaryExpr { + // span, + // op: op!("void"), + // arg: Lit::Num(Number { + // span, + // value: 0.0, + // raw: None, + // }) + // .into(), + // } + // .into() + // } + + // pub fn leftmost(&self) -> Option<&Ident> { + // match self { + // Expr::Ident(i) => Some(i), + // Expr::Member(MemberExpr { obj, .. }) => obj.leftmost(), + // Expr::OptChain(opt) => opt.base.as_member()?.obj.leftmost(), + // _ => None, + // } + // } + + pub fn is_ident_ref_to(&self, ident: &str) -> bool { + match self { + Expr::Ident(i) => i.sym == ident, + _ => false, + } + } + + /// Unwraps an expression with a given function. + /// + /// If the provided function returns [Some], the function is called again + /// with the returned value. If the provided functions returns [None], + /// the last expression is returned. + pub fn unwrap_with(&self, mut op: F) -> &Expr<'a> + where + F: for<'b> FnMut(&'b Expr<'a>) -> Option<&'b Expr<'a>>, + { + let mut cur = self; + loop { + match op(cur) { + Some(next) => cur = next, + None => return cur, + } + } + } + + /// Unwraps an expression with a given function. + /// + /// If the provided function returns [Some], the function is called again + /// with the returned value. If the provided functions returns [None], + /// the last expression is returned. + pub fn unwrap_mut_with(&'a mut self, mut op: F) -> &'a mut Expr<'a> + where + F: FnMut(&'a mut Expr<'a>) -> Option<&'a mut Expr<'a>>, + { + let mut cur = self; + loop { + match unsafe { + // Safety: Polonius is not yet stable + op(transmute::<&mut _, &mut _>(cur)) + } { + Some(next) => cur = next, + None => { + return cur; + } + } + } + } + + /// Normalize parenthesized expressions. + /// + /// This will normalize `(foo)`, `((foo))`, ... to `foo`. + /// + /// If `self` is not a parenthesized expression, it will be returned as is. + pub fn unwrap_parens(&self) -> &Expr<'a> { + self.unwrap_with(|e| { + if let Expr::Paren(expr) = e { + Some(&expr.expr) + } else { + None + } + }) + } + + /// Normalize parenthesized expressions. + /// + /// This will normalize `(foo)`, `((foo))`, ... to `foo`. + /// + /// If `self` is not a parenthesized expression, it will be returned as is. + pub fn unwrap_parens_mut(&'a mut self) -> &mut Expr<'a> { + self.unwrap_mut_with(|e| { + if let Expr::Paren(expr) = e { + Some(&mut expr.expr) + } else { + None + } + }) + } + + // /// Normalize sequences and parenthesized expressions. + // /// + // /// This returns the last expression of a sequence expression or the + // /// expression of a parenthesized expression. + // pub fn unwrap_seqs_and_parens(&self) -> &Self { + // self.unwrap_with(|expr| match expr { + // Expr::Seq(SeqExpr { exprs, .. }) => exprs.last().map(|v| &**v), + // Expr::Paren(ParenExpr { expr, .. }) => Some(expr), + // _ => None, + // }) + // } + + // /// Creates an expression from `exprs`. This will return first element if + // /// the length is 1 and a sequential expression otherwise. + // /// + // /// # Panics + // /// + // /// Panics if `exprs` is empty. + // pub fn from_exprs(mut exprs: Vec>) -> Box { + // debug_assert!(!exprs.is_empty(), "`exprs` must not be empty"); + + // if exprs.len() == 1 { + // exprs.remove(0) + // } else { + // SeqExpr { + // span: DUMMY_SP, + // exprs, + // } + // .into() + // } + // } + + // /// Returns true for `eval` and member expressions. + // pub fn directness_maters(&self) -> bool { + // self.is_ident_ref_to("eval") || matches!(self, Expr::Member(..)) + // } + + // pub fn with_span(mut self, span: Span) -> Expr { + // self.set_span(span); + // self + // } + + // pub fn set_span(&mut self, span: Span) { + // match self { + // Expr::Ident(i) => { + // i.span = span; + // } + // Expr::This(e) => e.span = span, + // Expr::Array(e) => e.span = span, + // Expr::Object(e) => e.span = span, + // Expr::Fn(e) => e.function.span = span, + // Expr::Unary(e) => e.span = span, + // Expr::Update(e) => e.span = span, + // Expr::Bin(e) => e.span = span, + // Expr::Assign(e) => e.span = span, + // Expr::Member(e) => e.span = span, + // Expr::SuperProp(e) => e.span = span, + // Expr::Cond(e) => e.span = span, + // Expr::Call(e) => e.span = span, + // Expr::New(e) => e.span = span, + // Expr::Seq(e) => e.span = span, + // Expr::Tpl(e) => e.span = span, + // Expr::TaggedTpl(e) => e.span = span, + // Expr::Arrow(e) => e.span = span, + // Expr::Class(e) => e.class.span = span, + // Expr::Yield(e) => e.span = span, + // Expr::Invalid(e) => e.span = span, + // Expr::TsAs(e) => e.span = span, + // Expr::TsTypeAssertion(e) => e.span = span, + // Expr::TsConstAssertion(e) => e.span = span, + // Expr::TsSatisfies(e) => e.span = span, + // Expr::TsNonNull(e) => e.span = span, + // Expr::TsInstantiation(e) => e.span = span, + // Expr::MetaProp(e) => e.span = span, + // Expr::Await(e) => e.span = span, + // Expr::Paren(e) => e.span = span, + // Expr::JSXMember(e) => e.span = span, + // Expr::JSXNamespacedName(e) => e.span = span, + // Expr::JSXEmpty(e) => e.span = span, + // Expr::JSXElement(e) => e.span = span, + // Expr::JSXFragment(e) => e.span = span, + // Expr::PrivateName(e) => e.span = span, + // Expr::OptChain(e) => e.span = span, + // Expr::Lit(e) => e.set_span(span), + // } + // } +} + +// Implement Clone without inline to avoid multiple copies of the +// implementation. +// impl Clone for Expr { +// fn clone(&self) -> Self { +// use Expr::*; +// match self { +// This(e) => This(e.clone()), +// Array(e) => Array(e.clone()), +// Object(e) => Object(e.clone()), +// Fn(e) => Fn(e.clone()), +// Unary(e) => Unary(e.clone()), +// Update(e) => Update(e.clone()), +// Bin(e) => Bin(e.clone()), +// Assign(e) => Assign(e.clone()), +// Member(e) => Member(e.clone()), +// SuperProp(e) => SuperProp(e.clone()), +// Cond(e) => Cond(e.clone()), +// Call(e) => Call(e.clone()), +// New(e) => New(e.clone()), +// Seq(e) => Seq(e.clone()), +// Ident(e) => Ident(e.clone()), +// Lit(e) => Lit(e.clone()), +// Tpl(e) => Tpl(e.clone()), +// TaggedTpl(e) => TaggedTpl(e.clone()), +// Arrow(e) => Arrow(e.clone()), +// Class(e) => Class(e.clone()), +// Yield(e) => Yield(e.clone()), +// MetaProp(e) => MetaProp(e.clone()), +// Await(e) => Await(e.clone()), +// Paren(e) => Paren(e.clone()), +// JSXMember(e) => JSXMember(e.clone()), +// JSXNamespacedName(e) => JSXNamespacedName(e.clone()), +// JSXEmpty(e) => JSXEmpty(e.clone()), +// JSXElement(e) => JSXElement(e.clone()), +// JSXFragment(e) => JSXFragment(e.clone()), +// TsTypeAssertion(e) => TsTypeAssertion(e.clone()), +// TsConstAssertion(e) => TsConstAssertion(e.clone()), +// TsNonNull(e) => TsNonNull(e.clone()), +// TsAs(e) => TsAs(e.clone()), +// TsInstantiation(e) => TsInstantiation(e.clone()), +// PrivateName(e) => PrivateName(e.clone()), +// OptChain(e) => OptChain(e.clone()), +// Invalid(e) => Invalid(e.clone()), +// TsSatisfies(e) => TsSatisfies(e.clone()), +// } +// } +// } + +impl<'a> Take<'a> for Expr<'a> { + fn dummy(alloc: &'a Allocator) -> Self { + Expr::Invalid(Box::new_in(Invalid { span: DUMMY_SP }, alloc)) + } +} + +// impl Default for Expr { +// fn default() -> Self { +// Expr::Invalid(Default::default()) +// } +// } + +// bridge_expr_from!(Ident, IdentName); +// bridge_expr_from!(Ident, Id); +// bridge_expr_from!(FnExpr<'a>, Function<'a>); +// bridge_expr_from!(ClassExpr<'a>, Class<'a>); + +// macro_rules! boxed_expr { +// ($T:ty) => { +// bridge_from!(Expr<'a>, Box<'a, $T>, $T); +// bridge_from!(Box<'a, Expr<'a>>, Expr, $T); +// }; +// } + +// boxed_expr!(ThisExpr); +// boxed_expr!(ArrayLit<'a>); +// boxed_expr!(ObjectLit<'a>); +// boxed_expr!(FnExpr<'a>); +// boxed_expr!(UnaryExpr<'a>); +// boxed_expr!(UpdateExpr<'a>); +// boxed_expr!(BinExpr<'a>); +// boxed_expr!(AssignExpr<'a>); +// boxed_expr!(MemberExpr<'a>); +// boxed_expr!(SuperPropExpr<'a>); +// boxed_expr!(CondExpr<'a>); +// boxed_expr!(CallExpr<'a>); +// boxed_expr!(NewExpr<'a>); +// boxed_expr!(SeqExpr<'a>); +// // bridge_from!(Box<'a, Expr<'a>>, Expr<'a>, Ident); +// boxed_expr!(Lit<'a>); +// boxed_expr!(Tpl<'a>); +// boxed_expr!(TaggedTpl<'a>); +// boxed_expr!(ArrowExpr<'a>); +// boxed_expr!(ClassExpr<'a>); +// boxed_expr!(YieldExpr<'a>); +// boxed_expr!(MetaPropExpr); +// boxed_expr!(AwaitExpr<'a>); +// boxed_expr!(ParenExpr<'a>); +// boxed_expr!(JSXMemberExpr<'a>); +// boxed_expr!(JSXNamespacedName); +// boxed_expr!(JSXEmptyExpr); +// boxed_expr!(JSXElement<'a>); +// boxed_expr!(JSXFragment<'a>); +// boxed_expr!(TsTypeAssertion<'a>); +// boxed_expr!(TsSatisfiesExpr<'a>); +// boxed_expr!(TsConstAssertion<'a>); +// boxed_expr!(TsNonNullExpr<'a>); +// boxed_expr!(TsAsExpr<'a>); +// boxed_expr!(TsInstantiation<'a>); +// boxed_expr!(PrivateName); +// boxed_expr!(OptChainExpr<'a>); +// boxed_expr!(Invalid); + +#[ast_node("ThisExpression")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ThisExpr { + pub span: Span, +} + +// impl Take for ThisExpr { +// fn dummy() -> Self { +// ThisExpr { span: DUMMY_SP } +// } +// } + +/// Array literal. +#[ast_node("ArrayExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ArrayLit<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "elements"))] + pub elems: Vec<'a, Option>>, +} + +// impl Take for ArrayLit { +// fn dummy() -> Self { +// ArrayLit { +// span: DUMMY_SP, +// elems: Default::default(), +// } +// } +// } + +/// Object literal. +#[ast_node("ObjectExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ObjectLit<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "properties"))] + pub props: Vec<'a, PropOrSpread<'a>>, +} + +// impl ObjectLit { +// /// See [ImportWith] for details. +// /// +// /// Returns [None] if this is not a valid for `with` of +// [crate::ImportDecl]. pub fn as_import_with(&self) -> Option { +// let mut values = Vec::new(); +// for prop in &self.props { +// match prop { +// PropOrSpread::Spread(..) => return None, +// PropOrSpread::Prop(prop) => match &**prop { +// Prop::KeyValue(kv) => { +// let key = match &kv.key { +// PropName::Ident(i) => i.clone(), +// PropName::Str(s) => +// IdentName::new(s.value.clone(), s.span), _ => +// return None, }; + +// values.push(ImportWithItem { +// key, +// value: match &*kv.value { +// Expr::Lit(Lit::Str(s)) => s.clone(), +// _ => return None, +// }, +// }); +// } +// _ => return None, +// }, +// } +// } + +// Some(ImportWith { +// span: self.span, +// values, +// }) +// } +// } + +// impl<'a> FromWith<'a, ImportWith<'a>> for ObjectLit<'a> { +// fn from_with(v: ImportWith<'a>, allocator: &'a swc_allocator::Allocator) +// -> Self { ObjectLit { +// span: v.span, +// props: Vec::from_iter_in( +// v.values.into_iter().map(|item| { +// PropOrSpread::Prop(Box::new_in( +// Prop::KeyValue( +// KeyValueProp { +// key: +// PropName::Ident(item.key.into_with(allocator)), +// value: Lit::Str(item.value.into_with(allocator)) +// .into_with(allocator), } +// .into_with(allocator), +// ), +// allocator, +// )) +// }), +// allocator, +// ), +// } +// } +// } + +/// According to the current spec `with` of [crate::ImportDecl] can only have +/// strings or idents as keys, can't be nested, can only have string literals as +/// values: + +#[derive(Debug, CloneIn, PartialEq, Eq, Hash, EqIgnoreSpan)] +pub struct ImportWith<'a> { + pub span: Span, + pub values: Vec<'a, ImportWithItem>, +} + +// impl ImportWith { +// pub fn get(&self, key: &str) -> Option<&Str> { +// self.values.iter().find_map(|item| { +// if item.key.sym == key { +// Some(&item.value) +// } else { +// None +// } +// }) +// } +// } + +#[derive(Debug, CloneIn, PartialEq, Eq, Hash, EqIgnoreSpan)] +pub struct ImportWithItem { + pub key: IdentName, + pub value: Str, +} + +// impl Take for ObjectLit { +// fn dummy() -> Self { +// ObjectLit { +// span: DUMMY_SP, +// props: Default::default(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum PropOrSpread<'a> { + /// Spread properties, e.g., `{a: 1, ...obj, b: 2}`. + // #[tag("SpreadElement")] + Spread(Box<'a, SpreadElement<'a>>), + + // #[tag("*")] + Prop(Box<'a, Prop<'a>>), +} + +// bridge_from!(PropOrSpread<'a>, Box<'a, Prop<'a>>, Prop<'a>); + +// impl Take for PropOrSpread { +// fn dummy() -> Self { +// PropOrSpread::Spread(SpreadElement { +// dot3_token: DUMMY_SP, +// expr: Take::dummy(), +// }) +// } +// } + +#[ast_node("SpreadElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SpreadElement<'a> { + #[cfg_attr(feature = "serde-impl", serde(rename = "spread"))] + #[span(lo)] + pub dot3_token: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "arguments"))] + #[span(hi)] + pub expr: Expr<'a>, +} + +// impl Take for SpreadElement { +// fn dummy() -> Self { +// SpreadElement { +// dot3_token: DUMMY_SP, +// expr: Take::dummy(), +// } +// } +// } + +#[ast_node("UnaryExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct UnaryExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "operator"))] + pub op: UnaryOp, + + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Expr<'a>, +} + +// impl Take for UnaryExpr { +// fn dummy() -> Self { +// UnaryExpr { +// span: DUMMY_SP, +// op: op!("!"), +// arg: Take::dummy(), +// } +// } +// } + +#[ast_node("UpdateExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct UpdateExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "operator"))] + pub op: UpdateOp, + + pub prefix: bool, + + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Expr<'a>, +} + +// impl Take for UpdateExpr { +// fn dummy() -> Self { +// UpdateExpr { +// span: DUMMY_SP, +// op: op!("++"), +// prefix: false, +// arg: Take::dummy(), +// } +// } +// } + +#[ast_node("BinaryExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct BinExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "operator"))] + pub op: BinaryOp, + + pub left: Expr<'a>, + + pub right: Expr<'a>, +} + +// impl Take for BinExpr { +// fn dummy() -> Self { +// BinExpr { +// span: DUMMY_SP, +// op: op!("*"), +// left: Take::dummy(), +// right: Take::dummy(), +// } +// } +// } + +/// Function expression. +#[ast_node("FunctionExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct FnExpr<'a> { + #[cfg_attr(feature = "serde-impl", serde(default, rename = "identifier"))] + pub ident: Option, + + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[span] + pub function: Box<'a, Function<'a>>, +} + +// impl Take for FnExpr { +// fn dummy() -> Self { +// FnExpr { +// ident: None, +// function: Take::dummy(), +// } +// } +// } + +// impl<'a> FromWith<'a, Box<'a, Function<'a>>> for FnExpr<'a> { +// fn from_with(value: Box<'a, Function<'a>>, _: &'a +// swc_allocator::Allocator) -> Self { Self { +// ident: None, +// function: value, +// } +// } +// } + +// bridge_from!(FnExpr<'a>, Box<'a, Function<'a>>, Function<'a>); + +/// Class expression. +#[ast_node("ClassExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ClassExpr<'a> { + #[cfg_attr(feature = "serde-impl", serde(default, rename = "identifier"))] + pub ident: Option, + + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[span] + pub class: Box<'a, Class<'a>>, +} + +// impl Take for ClassExpr { +// fn dummy() -> Self { +// ClassExpr { +// ident: None, +// class: Take::dummy(), +// } +// } +// } + +impl<'a> From>> for ClassExpr<'a> { + fn from(class: Box<'a, Class<'a>>) -> Self { + Self { ident: None, class } + } +} + +// bridge_from!(ClassExpr<'a>, Box<'a, Class<'a>>, Class<'a>); + +#[ast_node("AssignmentExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AssignExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "operator"))] + pub op: AssignOp, + + pub left: AssignTarget<'a>, + + pub right: Expr<'a>, +} + +// impl Take for AssignExpr { +// fn dummy() -> Self { +// AssignExpr { +// span: DUMMY_SP, +// op: op!("="), +// left: Take::dummy(), +// right: Take::dummy(), +// } +// } +// } + +// impl AssignExpr { +// pub fn is_simple_assign(&self) -> bool { +// self.op == op!("=") && self.left.as_ident().is_some() +// } +// } + +#[ast_node("MemberExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct MemberExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "object"))] + pub obj: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "property"))] + pub prop: MemberProp<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum MemberProp<'a> { + // #[tag("Identifier")] + Ident(Box<'a, IdentName>), + // #[tag("PrivateName")] + PrivateName(PrivateName), + // #[tag("Computed")] + Computed(Box<'a, ComputedPropName<'a>>), +} + +// impl MemberProp { +// pub fn is_ident_with(&self, sym: &str) -> bool { +// matches!(self, MemberProp::Ident(i) if i.sym == sym) +// } +// } + +#[ast_node("SuperPropExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SuperPropExpr<'a> { + pub span: Span, + + pub obj: Super, + + #[cfg_attr(feature = "serde-impl", serde(rename = "property"))] + pub prop: SuperProp<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum SuperProp<'a> { + // #[tag("Identifier")] + Ident(Box<'a, IdentName>), + // #[tag("Computed")] + Computed(Box<'a, ComputedPropName<'a>>), +} + +// impl Take for MemberExpr { +// fn dummy() -> Self { +// MemberExpr { +// span: DUMMY_SP, +// obj: Take::dummy(), +// prop: Take::dummy(), +// } +// } +// } + +// impl Take for MemberProp { +// fn dummy() -> Self { +// Default::default() +// } +// } + +// impl Default for MemberProp { +// fn default() -> Self { +// MemberProp::Ident(Default::default()) +// } +// } + +// impl Take for SuperProp { +// fn dummy() -> Self { +// SuperProp::Ident(Default::default()) +// } +// } + +// impl Default for SuperProp { +// fn default() -> Self { +// SuperProp::Ident(Default::default()) +// } +// } + +#[ast_node("ConditionalExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct CondExpr<'a> { + pub span: Span, + + pub test: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "consequent"))] + pub cons: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "alternate"))] + pub alt: Expr<'a>, +} + +// impl Take for CondExpr { +// fn dummy() -> Self { +// CondExpr { +// span: DUMMY_SP, +// test: Take::dummy(), +// cons: Take::dummy(), +// alt: Take::dummy(), +// } +// } +// } + +#[ast_node("CallExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct CallExpr<'a> { + pub span: Span, + pub ctxt: SyntaxContext, + + pub callee: Callee<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "arguments"))] + pub args: Vec<'a, ExprOrSpread<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, + // pub type_params: Option, +} + +// impl Take for CallExpr { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("NewExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct NewExpr<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub callee: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "arguments"))] + pub args: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, + // pub type_params: Option, +} + +// impl Take for NewExpr { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("SequenceExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SeqExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expressions"))] + pub exprs: Vec<'a, Expr<'a>>, +} + +// impl Take for SeqExpr { +// fn dummy() -> Self { +// SeqExpr { +// span: DUMMY_SP, +// exprs: Take::dummy(), +// } +// } +// } + +#[ast_node("ArrowFunctionExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ArrowExpr<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub params: Vec<'a, Pat<'a>>, + + pub body: BlockStmtOrExpr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "async"))] + pub is_async: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "generator"))] + pub is_generator: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeParameters"))] + pub type_params: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub return_type: Option>>, +} + +// impl Take for ArrowExpr { +// fn dummy() -> Self { +// ArrowExpr { +// ..Default::default() +// } +// } +// } + +#[ast_node("YieldExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct YieldExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "argument"))] + pub arg: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub delegate: bool, +} + +// impl Take for YieldExpr { +// fn dummy() -> Self { +// YieldExpr { +// span: DUMMY_SP, +// arg: Take::dummy(), +// delegate: false, +// } +// } +// } + +#[ast_node("MetaProperty")] +#[derive(Eq, Hash, EqIgnoreSpan, Copy, Clone)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct MetaPropExpr { + pub span: Span, + pub kind: MetaPropKind, +} + +#[derive(StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +pub enum MetaPropKind { + /// `new.target` + NewTarget, + /// `import.meta` + ImportMeta, +} + +#[ast_node("AwaitExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AwaitExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Expr<'a>, +} + +#[ast_node("TemplateLiteral")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Tpl<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expressions"))] + pub exprs: Vec<'a, Expr<'a>>, + + pub quasis: Vec<'a, TplElement>, +} + +// impl Take for Tpl { +// fn dummy() -> Self { +// Tpl { +// span: DUMMY_SP, +// exprs: Take::dummy(), +// quasis: Take::dummy(), +// } +// } +// } + +#[ast_node("TaggedTemplateExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TaggedTpl<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub tag: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeParameters"))] + pub type_params: Option>>, + + /// This is boxed to reduce the type size of [Expr]. + #[cfg_attr(feature = "serde-impl", serde(rename = "template"))] + pub tpl: Box<'a, Tpl<'a>>, +} + +// impl Take for TaggedTpl { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("TemplateElement")] +#[derive(Eq, Hash, EqIgnoreSpan, Default)] +pub struct TplElement { + pub span: Span, + pub tail: bool, + + /// This value is never used by `swc_ecma_codegen`, and this fact is + /// considered as a public API. + /// + /// If you are going to use codegen right after creating a [TplElement], you + /// don't have to worry about this value. + pub cooked: Option, + + /// You may need to perform. `.replace("\r\n", "\n").replace('\r', "\n")` on + /// this value. + pub raw: Atom, +} + +// impl Take for TplElement { +// fn dummy() -> Self { +// TplElement { +// span: DUMMY_SP, +// tail: Default::default(), +// cooked: None, +// raw: Default::default(), +// } +// } +// } + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for TplElement { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let cooked = Some(u.arbitrary::()?.into()); + let raw = u.arbitrary::()?.into(); + + Ok(Self { + span, + tail: false, + cooked, + raw, + }) + } +} + +#[ast_node("ParenthesisExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ParenExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} +// impl Take for ParenExpr { +// fn dummy() -> Self { +// ParenExpr { +// span: DUMMY_SP, +// expr: Take::dummy(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Callee<'a> { + // #[tag("Super")] + #[is(name = "super_")] + Super(Box<'a, Super>), + + // #[tag("Import")] + Import(Box<'a, Import>), + + // #[tag("*")] + Expr(Expr<'a>), +} + +// impl Default for Callee { +// fn default() -> Self { +// Callee::Super(Default::default()) +// } +// } + +// impl Take for Callee { +// fn dummy() -> Self { +// Callee::Super(Take::dummy()) +// } +// } + +#[ast_node("Super")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan, Default)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Super { + pub span: Span, +} + +// impl Take for Super { +// fn dummy() -> Self { +// Super { span: DUMMY_SP } +// } +// } + +#[ast_node("Import")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Import { + pub span: Span, + pub phase: ImportPhase, +} + +// impl Take for Import { +// fn dummy() -> Self { +// Import { +// span: DUMMY_SP, +// phase: ImportPhase::default(), +// } +// } +// } + +#[derive(CloneIn, Debug, PartialEq, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr(any(feature = "rkyv-impl"), derive(rkyv::Archive, rkyv::Serialize))] +#[cfg_attr( + feature = "rkyv", + rkyv(serialize_bounds(__S: rkyv::ser::Writer + rkyv::ser::Allocator, + __S::Error: rkyv::rancor::Source)) +)] +#[cfg_attr( + feature = "rkyv-impl", + rkyv(bytecheck(bounds( + __C: rkyv::validation::ArchiveContext, + __C::Error: rkyv::rancor::Source + ))) + )] +#[cfg_attr(feature = "rkyv-impl", repr(C))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize))] +pub struct ExprOrSpread<'a> { + #[cfg_attr(feature = "serde-impl", serde(default))] + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub spread: Option, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub expr: Expr<'a>, +} + +impl Spanned for ExprOrSpread<'_> { + #[inline] + fn span(&self) -> Span { + let expr = self.expr.span(); + match self.spread { + Some(spread) => expr.with_lo(spread.lo()), + None => expr, + } + } + + #[inline] + fn span_lo(&self) -> BytePos { + match self.spread { + Some(s) => s.lo, + None => self.expr.span_lo(), + } + } + + #[inline] + fn span_hi(&self) -> BytePos { + self.expr.span_hi() + } +} + +// impl<'a> From>> for ExprOrSpread<'a> { +// fn from(expr: Expr<'a>) -> Self { +// Self { expr, spread: None } +// } +// } + +// bridge_from!(ExprOrSpread<'a>, Box<'a, Expr<'a>>, Expr<'a>); + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum BlockStmtOrExpr<'a> { + // #[tag("BlockStatement")] + BlockStmt(Box<'a, BlockStmt<'a>>), + // #[tag("*")] + Expr(Expr<'a>), +} + +// impl Default for BlockStmtOrExpr { +// fn default() -> Self { +// BlockStmtOrExpr::BlockStmt(Default::default()) +// } +// } + +// impl From for BlockStmtOrExpr +// where +// T: Into, +// { +// fn from(e: T) -> Self { +// Self::Expr(Box::new(e.into())) +// } +// } + +// impl Take for BlockStmtOrExpr { +// fn dummy() -> Self { +// BlockStmtOrExpr::Expr(Take::dummy()) +// } +// } + +#[ast_node] +#[derive(Is, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum AssignTarget<'a> { + // #[tag("Identifier")] + // #[tag("MemberExpression")] + // #[tag("SuperPropExpression")] + // #[tag("OptionalChainingExpression")] + // #[tag("ParenthesisExpression")] + // #[tag("TsAsExpression")] + // #[tag("TsSatisfiesExpression")] + // #[tag("TsNonNullExpression")] + // #[tag("TsTypeAssertion")] + // #[tag("TsInstantiation")] + Simple(SimpleAssignTarget<'a>), + // #[tag("ArrayPattern")] + // #[tag("ObjectPattern")] + Pat(AssignTargetPat<'a>), +} + +impl<'a> AssignTarget<'a> { + pub fn try_from_pat(p: Pat<'a>, alloc: &'a Allocator) -> Result> { + Ok(match p { + Pat::Array(a) => AssignTargetPat::Array(a).into(), + Pat::Object(o) => AssignTargetPat::Object(o).into(), + Pat::Ident(i) => SimpleAssignTarget::Ident(i).into(), + Pat::Invalid(i) => SimpleAssignTarget::Invalid(i).into(), + Pat::Expr(e) => match Self::try_from_expr(e, alloc) { + Ok(v) => v, + Err(e) => return Err(e.into()), + }, + _ => return Err(p), + }) + } + + pub fn try_from_expr(e: Expr<'a>, alloc: &'a Allocator) -> Result> { + Ok(Self::Simple(SimpleAssignTarget::try_from_expr(e, alloc)?)) + } +} + +#[ast_node] +#[derive(Is, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum AssignTargetPat<'a> { + // #[tag("ArrayPattern")] + Array(Box<'a, ArrayPat<'a>>), + // #[tag("ObjectPattern")] + Object(Box<'a, ObjectPat<'a>>), + // #[tag("Invalid")] + Invalid(Box<'a, Invalid>), +} + +// impl Take for AssignTargetPat { +// fn dummy() -> Self { +// Default::default() +// } +// } + +// impl Default for AssignTargetPat { +// fn default() -> Self { +// AssignTargetPat::Invalid(Take::dummy()) +// } +// } + +impl<'a> From> for Pat<'a> { + fn from(pat: AssignTargetPat<'a>) -> Self { + match pat { + AssignTargetPat::Array(a) => a.into(), + AssignTargetPat::Object(o) => o.into(), + AssignTargetPat::Invalid(i) => i.into(), + } + } +} + +impl<'a> TryFrom> for AssignTargetPat<'a> { + type Error = Pat<'a>; + + fn try_from(p: Pat<'a>) -> Result { + Ok(match p { + Pat::Array(a) => AssignTargetPat::Array(a), + Pat::Object(o) => AssignTargetPat::Object(o), + Pat::Invalid(i) => AssignTargetPat::Invalid(i), + + _ => return Err(p), + }) + } +} + +#[ast_node] +#[derive(Is, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum SimpleAssignTarget<'a> { + /// Note: This type is to help implementing visitor and the field `type_ann` + /// is always [None]. + // #[tag("Identifier")] + Ident(Box<'a, BindingIdent<'a>>), + // #[tag("MemberExpression")] + Member(Box<'a, MemberExpr<'a>>), + // #[tag("SuperPropExpression")] + SuperProp(Box<'a, SuperPropExpr<'a>>), + // #[tag("ParenthesisExpression")] + Paren(Box<'a, ParenExpr<'a>>), + // #[tag("OptionalChainingExpression")] + OptChain(Box<'a, OptChainExpr<'a>>), + // #[tag("TsAsExpression")] + TsAs(Box<'a, TsAsExpr<'a>>), + // #[tag("TsSatisfiesExpression")] + TsSatisfies(Box<'a, TsSatisfiesExpr<'a>>), + // #[tag("TsNonNullExpression")] + TsNonNull(Box<'a, TsNonNullExpr<'a>>), + // #[tag("TsTypeAssertion")] + TsTypeAssertion(Box<'a, TsTypeAssertion<'a>>), + // #[tag("TsInstantiation")] + TsInstantiation(Box<'a, TsInstantiation<'a>>), + + // #[tag("Invaliid")] + Invalid(Box<'a, Invalid>), +} + +impl<'a> SimpleAssignTarget<'a> { + pub fn try_from_expr(e: Expr<'a>, alloc: &'a Allocator) -> Result> { + Ok(match e { + Expr::Ident(i) => SimpleAssignTarget::Ident(Box::new_in(i.into_inner().into(), alloc)), + Expr::Member(m) => SimpleAssignTarget::Member(m), + Expr::SuperProp(s) => SimpleAssignTarget::SuperProp(s), + Expr::OptChain(s) => SimpleAssignTarget::OptChain(s), + Expr::Paren(s) => SimpleAssignTarget::Paren(s), + Expr::TsAs(a) => SimpleAssignTarget::TsAs(a), + Expr::TsSatisfies(s) => SimpleAssignTarget::TsSatisfies(s), + Expr::TsNonNull(n) => SimpleAssignTarget::TsNonNull(n), + Expr::TsTypeAssertion(a) => SimpleAssignTarget::TsTypeAssertion(a), + Expr::TsInstantiation(a) => SimpleAssignTarget::TsInstantiation(a), + _ => return Err(e), + }) + } + + pub fn into_expr(self, alloc: &'a Allocator) -> Expr<'a> { + match self { + SimpleAssignTarget::Ident(binding_ident) => { + Expr::Ident(Box::new_in(binding_ident.into_inner().into(), alloc)) + } + SimpleAssignTarget::Member(member_expr) => Expr::Member(member_expr), + SimpleAssignTarget::SuperProp(super_prop_expr) => Expr::SuperProp(super_prop_expr), + SimpleAssignTarget::Paren(paren_expr) => Expr::Paren(paren_expr), + SimpleAssignTarget::OptChain(opt_chain_expr) => Expr::OptChain(opt_chain_expr), + SimpleAssignTarget::TsAs(ts_as_expr) => Expr::TsAs(ts_as_expr), + SimpleAssignTarget::TsSatisfies(ts_satisfies_expr) => { + Expr::TsSatisfies(ts_satisfies_expr) + } + SimpleAssignTarget::TsNonNull(ts_non_null_expr) => Expr::TsNonNull(ts_non_null_expr), + SimpleAssignTarget::TsTypeAssertion(ts_type_assertion) => { + Expr::TsTypeAssertion(ts_type_assertion) + } + SimpleAssignTarget::TsInstantiation(ts_instantiation) => { + Expr::TsInstantiation(ts_instantiation) + } + SimpleAssignTarget::Invalid(invalid) => Expr::Invalid(invalid), + } + } +} + +// bridge_from!(SimpleAssignTarget<'a>, BindingIdent<'a>, Ident); + +// impl SimpleAssignTarget { +// pub fn leftmost(&self) -> Option> { +// match self { +// SimpleAssignTarget::Ident(i) => { +// Some(Cow::Owned(Ident::new(i.sym.clone(), i.span, i.ctxt))) +// } +// SimpleAssignTarget::Member(MemberExpr { obj, .. }) => +// obj.leftmost().map(Cow::Borrowed), _ => None, +// } +// } +// } + +// impl Take for SimpleAssignTarget { +// fn dummy() -> Self { +// SimpleAssignTarget::Invalid(Take::dummy()) +// } +// } + +// macro_rules! bridge_assign_target { +// ($bridge:ty, $src:ty) => { +// bridge_from!($bridge, Box<'a, $src>, $src); +// bridge_from!(Box<'a, $bridge>, $bridge, $src); +// bridge_from!(AssignTarget<'a>, Box<'a, $bridge>, $src); +// }; +// } + +// bridge_from!(AssignTarget<'a>, BindingIdent<'a>, Ident); +// bridge_assign_target!(SimpleAssignTarget<'a>, BindingIdent<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, MemberExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, SuperPropExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, ParenExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, TsAsExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, TsSatisfiesExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, TsNonNullExpr<'a>); +// bridge_assign_target!(SimpleAssignTarget<'a>, TsTypeAssertion<'a>); +// bridge_assign_target!(AssignTargetPat<'a>, ArrayPat<'a>); +// bridge_assign_target!(AssignTargetPat<'a>, ObjectPat<'a>); + +// impl<'a> FromWith<'a, SimpleAssignTarget<'a>> for Expr<'a> { +// fn from_with(s: SimpleAssignTarget<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { match s { +// SimpleAssignTarget::Ident(i) => Box::new_in(i.into_inner().id, +// allocator).into(), SimpleAssignTarget::Member(m) => +// m.into_with(allocator), SimpleAssignTarget::SuperProp(s) => +// s.into_with(allocator), SimpleAssignTarget::Paren(s) => +// s.into_with(allocator), SimpleAssignTarget::OptChain(s) => +// s.into_with(allocator), SimpleAssignTarget::TsAs(a) => +// a.into_with(allocator), SimpleAssignTarget::TsSatisfies(s) => +// s.into_with(allocator), SimpleAssignTarget::TsNonNull(n) => +// n.into_with(allocator), SimpleAssignTarget::TsTypeAssertion(a) => +// a.into_with(allocator), SimpleAssignTarget::TsInstantiation(a) => +// a.into_with(allocator), SimpleAssignTarget::Invalid(i) => +// i.into_with(allocator), } +// } +// } + +// impl AssignTarget { +// pub fn as_ident(&self) -> Option<&BindingIdent> { +// self.as_simple()?.as_ident() +// } + +// pub fn as_ident_mut(&mut self) -> Option<&mut BindingIdent> { +// self.as_mut_simple()?.as_mut_ident() +// } +// } + +// impl Default for AssignTarget { +// fn default() -> Self { +// SimpleAssignTarget::dummy().into() +// } +// } + +// impl Take for AssignTarget { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("OptionalChainingExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct OptChainExpr<'a> { + pub span: Span, + pub optional: bool, + pub base: OptChainBase<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum OptChainBase<'a> { + // #[tag("MemberExpression")] + Member(Box<'a, MemberExpr<'a>>), + // #[tag("CallExpression")] + Call(Box<'a, OptCall<'a>>), +} + +// impl Default for OptChainBase { +// fn default() -> Self { +// OptChainBase::Member(Default::default()) +// } +// } + +#[ast_node("CallExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct OptCall<'a> { + pub span: Span, + + pub ctxt: SyntaxContext, + + pub callee: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "arguments"))] + pub args: Vec<'a, ExprOrSpread<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, + // pub type_params: Option, +} + +// impl Take for OptChainExpr { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// optional: false, +// base: Box::new(OptChainBase::Member(Take::dummy())), +// } +// } +// } + +// impl<'a> FromWith<'a, OptChainBase<'a>> for Expr<'a> { +// fn from_with(opt: OptChainBase<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { match opt { +// OptChainBase::Call(call) => { +// let OptCall { +// span, +// ctxt, +// callee, +// args, +// type_args, +// } = call.into_inner(); +// Self::Call(Box::new_in( +// CallExpr { +// callee: Callee::Expr(callee), +// args, +// span, +// type_args, +// ctxt, +// }, +// allocator, +// )) +// } +// OptChainBase::Member(member) => Self::Member(member), +// } +// } +// } + +// impl Take for OptCall { +// fn dummy() -> Self { +// Self { +// ..Default::default() +// } +// } +// } + +impl<'a> From> for CallExpr<'a> { + fn from( + OptCall { + span, + ctxt, + callee, + args, + type_args, + }: OptCall<'a>, + ) -> Self { + Self { + span, + callee: Callee::Expr(callee), + args, + type_args, + ctxt, + } + } +} + +// bridge_from!(Box<'a, CallExpr<'a>>, CallExpr<'a>, OptCall<'a>); +// bridge_from!(crate::Expr<'a>, Box<'a, CallExpr<'a>>, OptCall<'a>); +// bridge_from!(Box<'a, crate::Expr<'a>>, crate::Expr<'a>, OptCall<'a>); diff --git a/crates/swc_ecma_ast/src/arena/function.rs b/crates/swc_ecma_ast/src/arena/function.rs new file mode 100644 index 000000000000..72afc5b29405 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/function.rs @@ -0,0 +1,91 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, Take}, + EqIgnoreSpan, Span, SyntaxContext, DUMMY_SP, +}; + +use super::{ + class::Decorator, + pat::Pat, + stmt::BlockStmt, + typescript::{TsParamProp, TsTypeAnn, TsTypeParamDecl}, +}; + +/// Common parts of function and method. +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Function<'a> { + pub params: Vec<'a, Param<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + + pub span: Span, + + pub ctxt: SyntaxContext, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Option>, + + /// if it's a generator. + #[cfg_attr(feature = "serde-impl", serde(default, rename = "generator"))] + pub is_generator: bool, + + /// if it's an async function. + #[cfg_attr(feature = "serde-impl", serde(default, rename = "async"))] + pub is_async: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeParameters"))] + pub type_params: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub return_type: Option>>, +} + +impl<'a> Take<'a> for Function<'a> { + fn dummy(alloc: &'a swc_allocator::arena::Allocator) -> Self { + Self { + params: Vec::new_in(alloc), + decorators: Vec::new_in(alloc), + span: DUMMY_SP, + ctxt: SyntaxContext::default(), + body: None, + is_generator: false, + is_async: false, + type_params: None, + return_type: None, + } + } +} + +#[ast_node("Parameter")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Param<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + pub pat: Pat<'a>, +} + +// impl<'a> FromWith<'a, Pat<'a>> for Param<'a> { +// fn from_with(pat: Pat<'a>, allocator: &'a swc_allocator::Allocator) -> +// Self { Self { +// span: DUMMY_SP, +// decorators: Vec::new_in(allocator), +// pat, +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ParamOrTsParamProp<'a> { + // #[tag("TsParameterProperty")] + TsParamProp(Box<'a, TsParamProp<'a>>), + // #[tag("Parameter")] + Param(Box<'a, Param<'a>>), +} diff --git a/crates/swc_ecma_ast/src/arena/ident.rs b/crates/swc_ecma_ast/src/arena/ident.rs new file mode 100644 index 000000000000..53214441fbeb --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/ident.rs @@ -0,0 +1,653 @@ +use std::{ + borrow::Cow, + fmt::Display, + ops::{Deref, DerefMut}, +}; + +use phf::phf_set; +use swc_allocator::arena::{Allocator, Box}; +use swc_atoms::{js_word, Atom}; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + BytePos, EqIgnoreSpan, Mark, Span, Spanned, SyntaxContext, DUMMY_SP, +}; + +use super::{typescript::TsTypeAnn, Expr}; + +/// Identifier used as a pattern. +#[derive(CloneIn, Debug, PartialEq, Eq, Hash, EqIgnoreSpan, Default)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr(any(feature = "rkyv-impl"), derive(rkyv::Archive, rkyv::Serialize))] +#[cfg_attr( + feature = "rkyv-impl", + rkyv(serialize_bounds(__S: rkyv::ser::Writer + rkyv::ser::Allocator, + __S::Error: rkyv::rancor::Source)) +)] +#[cfg_attr( + feature = "rkyv-impl", + rkyv(bytecheck(bounds( + __C: rkyv::validation::ArchiveContext, + __C::Error: rkyv::rancor::Source + ))) +)] +#[cfg_attr(feature = "rkyv-impl", repr(C))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize))] +pub struct BindingIdent<'a> { + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub id: Ident, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub type_ann: Option>>, +} + +// impl<'a> IntoWith<'a, Box<'a, BindingIdent<'a>>> for BindingIdent<'a> { +// fn into_with(self, allocator: &'a swc_allocator::Allocator) -> Box<'a, +// BindingIdent<'a>> { Box::new_in(self, allocator) +// } +// } + +impl Spanned for BindingIdent<'_> { + fn span(&self) -> Span { + match &self.type_ann { + Some(ann) => Span::new(self.id.span.lo(), ann.span().hi()), + None => self.id.span, + } + } +} + +impl Deref for BindingIdent<'_> { + type Target = Ident; + + fn deref(&self) -> &Self::Target { + &self.id + } +} + +impl DerefMut for BindingIdent<'_> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.id + } +} + +impl AsRef for BindingIdent<'_> { + fn as_ref(&self) -> &str { + &self.sym + } +} + +// impl<'a> FromWith<'a, BindingIdent<'a>> for Expr<'a> { +// fn from_with(value: BindingIdent<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { Box::new_in(Expr::Ident(value. +// into_with(allocator)), allocator) } +// } + +impl From<&BindingIdent<'_>> for Ident { + fn from(bi: &BindingIdent) -> Self { + Ident { + span: bi.span, + ctxt: bi.ctxt, + sym: bi.sym.clone(), + optional: bi.optional, + } + } +} + +impl BindingIdent<'_> { + /// See [`Ident::to_id`] for documentation. + pub fn to_id(&self) -> Id { + (self.sym.clone(), self.ctxt) + } +} + +// impl Take for BindingIdent { +// fn dummy() -> Self { +// Default::default() +// } +// } + +impl From for BindingIdent<'_> { + fn from(id: Ident) -> Self { + BindingIdent { id, type_ann: None } + } +} + +// bridge_from!(BindingIdent<'a>, Ident, Id); + +/// A complete identifier with span. +/// +/// Identifier of swc consists of two parts. The first one is symbol, which is +/// stored using an interned string, [Atom] . The second +/// one is [SyntaxContext][swc_common::SyntaxContext], which can be +/// used to distinguish identifier with same symbol. +/// +/// Let me explain this with an example. +/// +/// ```ts +/// let a = 5 +/// { +/// let a = 3; +/// } +/// ``` +/// In the code above, there are two variables with the symbol a. +/// +/// +/// Other compilers typically uses type like `Scope`, and store them nested, but +/// in rust, type like `Scope` requires [Arc>] so swc uses +/// different approach. Instead of passing scopes, swc annotates two variables +/// with different tag, which is named +/// [SyntaxContext]. The notation for the syntax +/// context is #n where n is a number. e.g. `foo#1` +/// +/// For the example above, after applying resolver pass, it becomes. +/// +/// ```ts +/// let a#1 = 5 +/// { +/// let a#2 = 3; +/// } +/// ``` +/// +/// Thanks to the `tag` we attached, we can now distinguish them. +/// +/// ([Atom], [SyntaxContext]) +/// +/// See [Id], which is a type alias for this. +/// +/// This can be used to store all variables in a module to single hash map. +/// +/// # Comparison +/// +/// While comparing two identifiers, you can use `.to_id()`. +/// +/// # HashMap +/// +/// There's a type named [Id] which only contains minimal information to +/// distinguish identifiers. +#[ast_node("Identifier")] +#[derive(Clone, Eq, Hash, Default)] +pub struct Ident { + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub span: Span, + + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub ctxt: SyntaxContext, + + #[cfg_attr(feature = "serde-impl", serde(rename = "value"))] + pub sym: Atom, + + /// TypeScript only. Used in case of an optional parameter. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub optional: bool, +} + +impl From> for Ident { + fn from(bi: BindingIdent<'_>) -> Self { + bi.id + } +} + +impl From for Ident { + fn from(bi: Atom) -> Self { + Ident::new_no_ctxt(bi, DUMMY_SP) + } +} +// bridge_from!(Ident, Atom, &'_ str); +// bridge_from!(Ident, Atom, Cow<'_, str>); +// bridge_from!(Ident, Atom, String); + +impl From<(Atom, Span)> for Ident { + fn from((sym, span): (Atom, Span)) -> Self { + Ident { + span, + sym, + ..Default::default() + } + } +} + +impl EqIgnoreSpan for Ident { + fn eq_ignore_span(&self, other: &Self) -> bool { + if self.sym != other.sym { + return false; + } + + self.ctxt.eq_ignore_span(&other.ctxt) + } +} + +impl From for Ident { + fn from(id: Id) -> Self { + Ident::new(id.0, DUMMY_SP, id.1) + } +} + +impl From for Id { + fn from(i: Ident) -> Self { + (i.sym, i.ctxt) + } +} + +#[repr(C, align(64))] +struct Align64(pub(crate) T); + +const T: bool = true; +const F: bool = false; + +impl Ident { + /// In `op`, [EqIgnoreSpan] of [Ident] will ignore the syntax context. + pub fn within_ignored_ctxt(op: F) -> Ret + where + F: FnOnce() -> Ret, + { + SyntaxContext::within_ignored_ctxt(op) + } + + /// Preserve syntax context while drop `span.lo` and `span.hi`. + pub fn without_loc(mut self) -> Ident { + self.span.lo = BytePos::DUMMY; + self.span.hi = BytePos::DUMMY; + self + } + + /// Creates `Id` using `Atom` and `SyntaxContext` of `self`. + pub fn to_id(&self) -> Id { + (self.sym.clone(), self.ctxt) + } + + /// Returns true if `c` is a valid character for an identifier start. + #[inline] + pub fn is_valid_start(c: char) -> bool { + // This contains `$` (36) and `_` (95) + const ASCII_START: Align64<[bool; 128]> = Align64([ + F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, + F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, + F, F, F, F, F, F, F, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, + T, T, T, T, F, F, F, F, T, F, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, + T, T, T, T, T, T, T, F, F, F, F, F, + ]); + + if c.is_ascii() { + return ASCII_START.0[c as usize]; + } + + unicode_id_start::is_id_start_unicode(c) + } + + /// Returns true if `c` is a valid character for an identifier part after + /// start. + #[inline] + pub fn is_valid_continue(c: char) -> bool { + // This contains `$` (36) + const ASCII_CONTINUE: Align64<[bool; 128]> = Align64([ + F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, + F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, T, T, T, T, T, T, T, T, T, T, + F, F, F, F, F, F, F, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, + T, T, T, T, F, F, F, F, T, F, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, + T, T, T, T, T, T, T, F, F, F, F, F, + ]); + + if c.is_ascii() { + return ASCII_CONTINUE.0[c as usize]; + } + + unicode_id_start::is_id_continue_unicode(c) + } + + /// Alternative for `toIdentifier` of babel. + /// + /// Returns [Ok] if it's a valid identifier and [Err] if it's not valid. + /// The returned [Err] contains the valid symbol. + pub fn verify_symbol(s: &str) -> Result<(), String> { + fn is_reserved_symbol(s: &str) -> bool { + s.is_reserved() || s.is_reserved_in_strict_mode(true) || s.is_reserved_in_strict_bind() + } + + if is_reserved_symbol(s) { + let mut buf = String::with_capacity(s.len() + 1); + buf.push('_'); + buf.push_str(s); + return Err(buf); + } + + { + let mut chars = s.chars(); + + if let Some(first) = chars.next() { + if Self::is_valid_start(first) && chars.all(Self::is_valid_continue) { + return Ok(()); + } + } + } + + let mut buf = String::with_capacity(s.len() + 2); + let mut has_start = false; + + for c in s.chars() { + if !has_start && Self::is_valid_start(c) { + has_start = true; + buf.push(c); + continue; + } + + if Self::is_valid_continue(c) { + buf.push(c); + } + } + + if buf.is_empty() { + buf.push('_'); + } + + if is_reserved_symbol(&buf) { + let mut new_buf = String::with_capacity(buf.len() + 1); + new_buf.push('_'); + new_buf.push_str(&buf); + buf = new_buf; + } + + Err(buf) + } + + /// Create a new identifier with the given prefix. + pub fn with_prefix(&self, prefix: &str) -> Ident { + Ident::new( + format!("{}{}", prefix, self.sym).into(), + self.span, + self.ctxt, + ) + } + + /// Create a private identifier that is unique in the file, but with the + /// same symbol. + pub fn into_private(self) -> Ident { + Self::new( + self.sym, + self.span, + SyntaxContext::empty().apply_mark(Mark::new()), + ) + } + + #[inline] + pub fn is_dummy(&self) -> bool { + self.sym == js_word!("") && self.span.is_dummy() + } + + /// Create a new identifier with the given position. + pub fn with_pos(mut self, lo: BytePos, hi: BytePos) -> Ident { + self.span = Span::new(lo, hi); + self + } +} + +#[ast_node("Identifier")] +#[derive(Eq, Hash, Default, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct IdentName { + #[cfg_attr(feature = "__rkyv", rkyv(omit_bounds))] + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "value"))] + pub sym: Atom, +} + +impl From for IdentName { + fn from(sym: Atom) -> Self { + IdentName { + span: DUMMY_SP, + sym, + } + } +} + +impl From<(Atom, Span)> for IdentName { + fn from((sym, span): (Atom, Span)) -> Self { + IdentName { span, sym } + } +} + +// bridge_from!(IdentName, Atom, &'_ str); +// bridge_from!(IdentName, Atom, Cow<'_, str>); +// bridge_from!(IdentName, Atom, String); +// bridge_from!(IdentName, Ident, &'_ BindingIdent<'_>); +// bridge_from!(IdentName, Ident, BindingIdent<'_>); + +impl AsRef for IdentName { + fn as_ref(&self) -> &str { + &self.sym + } +} + +impl IdentName { + pub const fn new(sym: Atom, span: Span) -> Self { + Self { span, sym } + } +} + +impl<'a> Take<'a> for IdentName { + fn dummy(_: &'a Allocator) -> Self { + Default::default() + } +} + +impl From for IdentName { + fn from(i: Ident) -> Self { + IdentName { + span: i.span, + sym: i.sym, + } + } +} + +impl From for Ident { + fn from(i: IdentName) -> Self { + Ident { + span: i.span, + sym: i.sym, + ..Default::default() + } + } +} + +// bridge_from!(BindingIdent<'a>, Ident, Atom); +// bridge_from!(BindingIdent<'a>, Atom, &'_ str); +// bridge_from!(BindingIdent<'a>, Atom, Cow<'_, str>); +// bridge_from!(BindingIdent<'a>, Atom, String); + +impl From for BindingIdent<'_> { + fn from(i: IdentName) -> Self { + BindingIdent { + id: i.into(), + type_ann: None, + } + } +} + +/// See [Ident] for documentation. +pub type Id = (Atom, SyntaxContext); + +impl<'a> Take<'a> for Ident { + fn dummy(_: &'a Allocator) -> Self { + Ident::new_no_ctxt(js_word!(""), DUMMY_SP) + } +} + +impl Display for Ident { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}{:?}", self.sym, self.ctxt) + } +} + +impl Display for IdentName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.sym) + } +} + +impl Display for BindingIdent<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}{:?}", self.sym, self.ctxt) + } +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Ident { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let sym = u.arbitrary::()?; + + let optional = u.arbitrary()?; + + Ok(Self { + span, + sym, + optional, + ctxt: Default::default(), + }) + } +} + +#[ast_node("PrivateName")] +#[derive(Eq, Hash, EqIgnoreSpan, Default)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct PrivateName { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "value"))] + pub name: Atom, +} + +impl AsRef for Ident { + fn as_ref(&self) -> &str { + &self.sym + } +} + +impl Ident { + pub const fn new(sym: Atom, span: Span, ctxt: SyntaxContext) -> Self { + Ident { + span, + ctxt, + sym, + optional: false, + } + } + + #[inline(never)] + pub fn new_private(sym: Atom, span: Span) -> Self { + Self::new(sym, span, SyntaxContext::empty().apply_mark(Mark::new())) + } + + pub const fn new_no_ctxt(sym: Atom, span: Span) -> Self { + Self::new(sym, span, SyntaxContext::empty()) + } +} + +static RESERVED: phf::Set<&str> = phf_set!( + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "enum", + "export", + "extends", + "false", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "null", + "package", + "return", + "super", + "switch", + "this", + "throw", + "true", + "try", + "typeof", + "var", + "void", + "while", + "with", +); + +static RESSERVED_IN_STRICT_MODE: phf::Set<&str> = phf_set!( + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "yield", +); + +static RESSERVED_IN_STRICT_BIND: phf::Set<&str> = phf_set!("eval", "arguments",); + +static RESERVED_IN_ES3: phf::Set<&str> = phf_set!( + "abstract", + "boolean", + "byte", + "char", + "double", + "final", + "float", + "goto", + "int", + "long", + "native", + "short", + "synchronized", + "throws", + "transient", + "volatile", +); + +pub trait EsReserved: AsRef { + fn is_reserved(&self) -> bool { + RESERVED.contains(self.as_ref()) + } + + fn is_reserved_in_strict_mode(&self, is_module: bool) -> bool { + if is_module && self.as_ref() == "await" { + return true; + } + RESSERVED_IN_STRICT_MODE.contains(self.as_ref()) + } + + fn is_reserved_in_strict_bind(&self) -> bool { + RESSERVED_IN_STRICT_BIND.contains(self.as_ref()) + } + + fn is_reserved_in_es3(&self) -> bool { + RESERVED_IN_ES3.contains(self.as_ref()) + } + + fn is_reserved_in_any(&self) -> bool { + RESERVED.contains(self.as_ref()) + || RESSERVED_IN_STRICT_MODE.contains(self.as_ref()) + || RESSERVED_IN_STRICT_BIND.contains(self.as_ref()) + || RESERVED_IN_ES3.contains(self.as_ref()) + } +} + +impl EsReserved for Atom {} +impl EsReserved for IdentName {} +impl EsReserved for Ident {} +impl EsReserved for BindingIdent<'_> {} +impl EsReserved for &'_ str {} +impl EsReserved for String {} diff --git a/crates/swc_ecma_ast/src/arena/jsx.rs b/crates/swc_ecma_ast/src/arena/jsx.rs new file mode 100644 index 000000000000..ce2feba6ffae --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/jsx.rs @@ -0,0 +1,307 @@ +use is_macro::Is; +use swc_allocator::arena::{Allocator, Box, Vec}; +use swc_atoms::Atom; +use swc_common::{arena::ast_node, arena::Take, EqIgnoreSpan, Span, DUMMY_SP}; + +use super::{ + expr::{Expr, SpreadElement}, + ident::Ident, + lit::Lit, + typescript::TsTypeParamInstantiation, + IdentName, +}; + +/// Used for `obj` property of `JSXMemberExpr`. +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXObject<'a> { + // #[tag("JSXMemberExpression")] + JSXMemberExpr(Box<'a, JSXMemberExpr<'a>>), + // #[tag("Identifier")] + Ident(Box<'a, Ident>), +} + +#[ast_node("JSXMemberExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXMemberExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "object"))] + pub obj: JSXObject<'a>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "property"))] + pub prop: IdentName, +} + +/// XML-based namespace syntax: +#[ast_node("JSXNamespacedName")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXNamespacedName { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "namespace"))] + pub ns: IdentName, + pub name: IdentName, +} + +#[ast_node("JSXEmptyExpression")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXEmptyExpr { + pub span: Span, +} + +#[ast_node("JSXExpressionContainer")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXExprContainer<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: JSXExpr<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXExpr<'a> { + // #[tag("JSXEmptyExpression")] + JSXEmptyExpr(Box<'a, JSXEmptyExpr>), + // #[tag("*")] + Expr(Expr<'a>), +} + +#[ast_node("JSXSpreadChild")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXSpreadChild<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXElementName<'a> { + // #[tag("Identifier")] + Ident(Box<'a, Ident>), + // #[tag("JSXMemberExpression")] + JSXMemberExpr(Box<'a, JSXMemberExpr<'a>>), + // #[tag("JSXNamespacedName")] + JSXNamespacedName(Box<'a, JSXNamespacedName>), +} + +// impl Take for JSXElementName { +// fn dummy() -> Self { +// JSXElementName::Ident(Take::dummy()) +// } +// } + +#[ast_node("JSXOpeningElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXOpeningElement<'a> { + pub name: JSXElementName<'a>, + + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "attributes"))] + pub attrs: Vec<'a, JSXAttrOrSpread<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "selfClosing"))] + pub self_closing: bool, + + /// Note: This field's name is different from one from babel because it is + /// misleading + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, +} + +// impl Take for JSXOpeningElement { +// fn dummy() -> Self { +// JSXOpeningElement { +// name: Take::dummy(), +// span: DUMMY_SP, +// attrs: Take::dummy(), +// self_closing: Default::default(), +// type_args: Take::dummy(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXAttrOrSpread<'a> { + // #[tag("JSXAttribute")] + JSXAttr(Box<'a, JSXAttr<'a>>), + // #[tag("SpreadElement")] + SpreadElement(Box<'a, SpreadElement<'a>>), +} + +#[ast_node("JSXClosingElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXClosingElement<'a> { + pub span: Span, + pub name: JSXElementName<'a>, +} + +#[ast_node("JSXAttribute")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXAttr<'a> { + pub span: Span, + pub name: JSXAttrName<'a>, + /// Babel uses Expr instead of JSXAttrValue + pub value: Option>, +} + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXAttrName<'a> { + // #[tag("Identifier")] + Ident(Box<'a, IdentName>), + // #[tag("JSXNamespacedName")] + JSXNamespacedName(Box<'a, JSXNamespacedName>), +} + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXAttrValue<'a> { + // #[tag("StringLiteral")] + // #[tag("BooleanLiteral")] + // #[tag("NullLiteral")] + // #[tag("NumericLiteral")] + // #[tag("RegExpLiteral")] + // #[tag("JSXText")] + Lit(Box<'a, Lit<'a>>), + + // #[tag("JSXExpressionContainer")] + JSXExprContainer(Box<'a, JSXExprContainer<'a>>), + + // #[tag("JSXElement")] + JSXElement(Box<'a, JSXElement<'a>>), + + // #[tag("JSXFragment")] + JSXFragment(Box<'a, JSXFragment<'a>>), +} + +#[ast_node("JSXText")] +#[derive(Eq, Hash, EqIgnoreSpan)] +pub struct JSXText { + pub span: Span, + pub value: Atom, + pub raw: Atom, +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for JSXText { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let value = u.arbitrary::()?.into(); + let raw = u.arbitrary::()?.into(); + + Ok(Self { span, value, raw }) + } +} + +#[ast_node("JSXElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXElement<'a> { + pub span: Span, + pub opening: JSXOpeningElement<'a>, + pub children: Vec<'a, JSXElementChild<'a>>, + pub closing: Option>, +} + +// impl Take for JSXElement { +// fn dummy() -> Self { +// JSXElement { +// span: DUMMY_SP, +// opening: Take::dummy(), +// children: Take::dummy(), +// closing: Take::dummy(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum JSXElementChild<'a> { + // #[tag("JSXText")] + JSXText(Box<'a, JSXText>), + + // #[tag("JSXExpressionContainer")] + JSXExprContainer(Box<'a, JSXExprContainer<'a>>), + + // #[tag("JSXSpreadChild")] + JSXSpreadChild(Box<'a, JSXSpreadChild<'a>>), + + // #[tag("JSXElement")] + JSXElement(Box<'a, JSXElement<'a>>), + + // #[tag("JSXFragment")] + JSXFragment(Box<'a, JSXFragment<'a>>), +} + +#[ast_node("JSXFragment")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXFragment<'a> { + pub span: Span, + + pub opening: JSXOpeningFragment, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub children: Vec<'a, JSXElementChild<'a>>, + + pub closing: JSXClosingFragment, +} + +// impl Take for JSXFragment { +// fn dummy() -> Self { +// JSXFragment { +// span: DUMMY_SP, +// opening: Take::dummy(), +// children: Take::dummy(), +// closing: Take::dummy(), +// } +// } +// } + +#[ast_node("JSXOpeningFragment")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXOpeningFragment { + pub span: Span, +} + +impl<'a> Take<'a> for JSXOpeningFragment { + fn dummy(_: &'a Allocator) -> Self { + JSXOpeningFragment { span: DUMMY_SP } + } +} + +#[ast_node("JSXClosingFragment")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct JSXClosingFragment { + pub span: Span, +} + +impl<'a> Take<'a> for JSXClosingFragment { + fn dummy(_: &'a Allocator) -> Self { + JSXClosingFragment { span: DUMMY_SP } + } +} diff --git a/crates/swc_ecma_ast/src/arena/lit.rs b/crates/swc_ecma_ast/src/arena/lit.rs new file mode 100644 index 000000000000..cc52ee923621 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/lit.rs @@ -0,0 +1,468 @@ +use std::{ + borrow::Cow, + fmt::{self, Display, Formatter}, + hash::{Hash, Hasher}, +}; + +use is_macro::Is; +use num_bigint::BigInt as BigIntValue; +use swc_allocator::arena::{Allocator, Box}; +use swc_atoms::{js_word, Atom}; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + EqIgnoreSpan, Span, DUMMY_SP, +}; + +use super::jsx::JSXText; + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan, Is)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Lit<'a> { + // #[tag("StringLiteral")] + Str(Box<'a, Str>), + // #[tag("BooleanLiteral")] + Bool(Box<'a, Bool>), + // #[tag("NullLiteral")] + Null(Box<'a, Null>), + // #[tag("NumericLiteral")] + Num(Box<'a, Number>), + // #[tag("BigIntLiteral")] + BigInt(Box<'a, BigInt<'a>>), + // #[tag("RegExpLiteral")] + Regex(Box<'a, Regex>), + // #[tag("JSXText")] + JSXText(Box<'a, JSXText>), +} + +// macro_rules! bridge_lit_from { +// ($bridge: ty, $src:ty) => { +// // bridge_expr_from!(crate::Lit<'a>, $src); +// bridge_from!(Box<'a, $bridge>, $bridge, $src); +// bridge_from!(Lit<'a>, Box<'a, $bridge>, $src); +// }; +// } + +// bridge_expr_from!(Lit<'a>, Str); +// bridge_expr_from!(Lit<'a>, Bool); +// bridge_expr_from!(Lit<'a>, Number); +// bridge_expr_from!(Lit<'a>, BigInt<'a>); +// bridge_expr_from!(Lit<'a>, Regex); +// bridge_expr_from!(Lit<'a>, Null); +// bridge_expr_from!(Lit<'a>, JSXText); + +// bridge_lit_from!(Str, &'_ str); +// bridge_lit_from!(Str, Atom); +// bridge_lit_from!(Str, Cow<'_, str>); +// bridge_lit_from!(Str, String); +// bridge_lit_from!(Bool, bool); +// bridge_lit_from!(Number, f64); +// bridge_lit_from!(Number, usize); +// bridge_lit_from!(BigInt<'a>, BigIntValue); + +impl Lit<'_> { + pub fn set_span(&mut self, span: Span) { + match self { + Lit::Str(s) => s.span = span, + Lit::Bool(b) => b.span = span, + Lit::Null(n) => n.span = span, + Lit::Num(n) => n.span = span, + Lit::BigInt(n) => n.span = span, + Lit::Regex(n) => n.span = span, + Lit::JSXText(n) => n.span = span, + } + } +} + +#[ast_node("BigIntLiteral")] +#[derive(Eq, Hash)] +pub struct BigInt<'a> { + pub span: Span, + #[cfg_attr(any(feature = "rkyv-impl"), rkyv(with = EncodeBigInt))] + pub value: Box<'a, BigIntValue>, + + /// Use `None` value only for transformations to avoid recalculate + /// characters in big integer + pub raw: Option, +} + +impl EqIgnoreSpan for BigInt<'_> { + fn eq_ignore_span(&self, other: &Self) -> bool { + self.value == other.value + } +} + +#[cfg(feature = "rkyv-impl")] +#[derive(Debug, Clone, Copy, CloneIn)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(C))] +pub struct EncodeBigInt; + +#[cfg(feature = "rkyv-impl")] +impl rkyv::with::ArchiveWith> for EncodeBigInt { + type Archived = rkyv::Archived; + type Resolver = rkyv::Resolver; + + fn resolve_with( + field: &Box, + resolver: Self::Resolver, + out: rkyv::Place, + ) { + use rkyv::Archive; + + let s = field.to_string(); + s.resolve(resolver, out); + } +} + +#[cfg(feature = "rkyv-impl")] +impl rkyv::with::SerializeWith, S> for EncodeBigInt +where + S: ?Sized + rancor::Fallible + rkyv::ser::Writer, + S::Error: rancor::Source, +{ + fn serialize_with( + field: &Box, + serializer: &mut S, + ) -> Result { + let field = field.to_string(); + rkyv::string::ArchivedString::serialize_from_str(&field, serializer) + } +} + +// #[cfg(feature = "rkyv-impl")] +// impl rkyv::with::DeserializeWith, Box, +// D> for EncodeBigInt where +// D: ?Sized + rancor::Fallible, +// { +// fn deserialize_with( +// field: &rkyv::Archived, +// deserializer: &mut D, +// ) -> Result, D::Error> { +// use rkyv::Deserialize; + +// let s: String = field.deserialize(deserializer)?; + +// Ok(Box::new(s.parse().unwrap())) +// } +// } + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for BigInt { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let value = Box::new(u.arbitrary::()?.into()); + let raw = Some(u.arbitrary::()?.into()); + + Ok(Self { span, value, raw }) + } +} + +// impl<'a> FromWith<'a, BigIntValue> for BigInt<'a> { +// fn from_with(value: BigIntValue, allocator: &'a swc_allocator::Allocator) +// -> Self { BigInt { +// span: DUMMY_SP, +// value: Box::new_in(value, allocator), +// raw: None, +// } +// } +// } + +/// A string literal. +#[ast_node("StringLiteral")] +#[derive(Clone, Eq, Hash)] +pub struct Str { + pub span: Span, + + pub value: Atom, + + /// Use `None` value only for transformations to avoid recalculate escaped + /// characters in strings + pub raw: Option, +} + +impl<'a> Take<'a> for Str { + fn dummy(_: &'a Allocator) -> Self { + Str { + span: DUMMY_SP, + value: js_word!(""), + raw: None, + } + } +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Str { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let value = u.arbitrary::()?.into(); + let raw = Some(u.arbitrary::()?.into()); + + Ok(Self { span, value, raw }) + } +} + +impl Str { + #[inline] + pub fn is_empty(&self) -> bool { + self.value.is_empty() + } + + pub fn from_tpl_raw(tpl_raw: &str) -> Atom { + let mut buf = String::with_capacity(tpl_raw.len()); + + let mut iter = tpl_raw.chars(); + + while let Some(c) = iter.next() { + match c { + '\\' => { + if let Some(next) = iter.next() { + match next { + '`' | '$' | '\\' => { + buf.push(next); + } + 'b' => { + buf.push('\u{0008}'); + } + 'f' => { + buf.push('\u{000C}'); + } + 'n' => { + buf.push('\n'); + } + 'r' => { + buf.push('\r'); + } + 't' => { + buf.push('\t'); + } + 'v' => { + buf.push('\u{000B}'); + } + _ => { + buf.push('\\'); + buf.push(next); + } + } + } + } + + c => { + buf.push(c); + } + } + } + + buf.into() + } +} + +impl EqIgnoreSpan for Str { + fn eq_ignore_span(&self, other: &Self) -> bool { + self.value == other.value + } +} + +impl From for Str { + #[inline] + fn from(value: Atom) -> Self { + Str { + span: DUMMY_SP, + value, + raw: None, + } + } +} + +// bridge_from!(Str, Atom, &'_ str); +// bridge_from!(Str, Atom, String); +// bridge_from!(Str, Atom, Cow<'_, str>); + +/// A boolean literal. +/// +/// +/// # Creation +/// +/// If you are creating a boolean literal with a dummy span, please use +/// `true.into()` or `false.into()`, instead of creating this struct directly. +/// +/// All of `Box`, `Expr`, `Lit`, `Bool` implements `From`. +#[ast_node("BooleanLiteral")] +#[derive(Copy, Clone, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Bool { + pub span: Span, + pub value: bool, +} + +impl<'a> Take<'a> for Bool { + fn dummy(_: &'a Allocator) -> Self { + Bool { + span: DUMMY_SP, + value: false, + } + } +} + +impl From for Bool { + #[inline] + fn from(value: bool) -> Self { + Bool { + span: DUMMY_SP, + value, + } + } +} + +#[ast_node("NullLiteral")] +#[derive(Copy, Clone, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Null { + pub span: Span, +} + +impl<'a> Take<'a> for Null { + fn dummy(_: &'a Allocator) -> Self { + Null { span: DUMMY_SP } + } +} + +#[ast_node("RegExpLiteral")] +#[derive(Eq, Hash, EqIgnoreSpan)] +pub struct Regex { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "pattern"))] + pub exp: Atom, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub flags: Atom, +} + +impl<'a> Take<'a> for Regex { + fn dummy(_: &'a Allocator) -> Self { + Self { + span: DUMMY_SP, + exp: Default::default(), + flags: Default::default(), + } + } +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Regex { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let exp = u.arbitrary::()?.into(); + let flags = "".into(); // TODO + + Ok(Self { span, exp, flags }) + } +} + +/// A numeric literal. +/// +/// +/// # Creation +/// +/// If you are creating a numeric literal with a dummy span, please use +/// `literal.into()`, instead of creating this struct directly. +/// +/// All of `Box`, `Expr`, `Lit`, `Number` implements `From<64>` and +/// `From`. + +#[ast_node("NumericLiteral")] +pub struct Number { + pub span: Span, + /// **Note**: This should not be `NaN`. Use [crate::Ident] to represent NaN. + /// + /// If you store `NaN` in this field, a hash map will behave strangely. + pub value: f64, + + /// Use `None` value only for transformations to avoid recalculate + /// characters in number literal + pub raw: Option, +} + +impl Eq for Number {} + +impl EqIgnoreSpan for Number { + fn eq_ignore_span(&self, other: &Self) -> bool { + self.value == other.value && self.value.is_sign_positive() == other.value.is_sign_positive() + } +} + +#[allow(clippy::derived_hash_with_manual_eq)] +#[allow(clippy::transmute_float_to_int)] +impl Hash for Number { + fn hash(&self, state: &mut H) { + fn integer_decode(val: f64) -> (u64, i16, i8) { + let bits: u64 = val.to_bits(); + let sign: i8 = if bits >> 63 == 0 { 1 } else { -1 }; + let mut exponent: i16 = ((bits >> 52) & 0x7ff) as i16; + let mantissa = if exponent == 0 { + (bits & 0xfffffffffffff) << 1 + } else { + (bits & 0xfffffffffffff) | 0x10000000000000 + }; + + exponent -= 1023 + 52; + (mantissa, exponent, sign) + } + + self.span.hash(state); + integer_decode(self.value).hash(state); + self.raw.hash(state); + } +} + +impl Display for Number { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + if self.value.is_infinite() { + if self.value.is_sign_positive() { + Display::fmt("Infinity", f) + } else { + Display::fmt("-Infinity", f) + } + } else { + Display::fmt(&self.value, f) + } + } +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Number { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let value = u.arbitrary::()?; + let raw = Some(u.arbitrary::()?.into()); + + Ok(Self { span, value, raw }) + } +} + +impl From for Number { + #[inline] + fn from(value: f64) -> Self { + Number { + span: DUMMY_SP, + value, + raw: None, + } + } +} + +impl From for Number { + #[inline] + fn from(value: usize) -> Self { + Number { + span: DUMMY_SP, + value: value as _, + raw: None, + } + } +} diff --git a/crates/swc_ecma_ast/src/arena/mod.rs b/crates/swc_ecma_ast/src/arena/mod.rs new file mode 100644 index 000000000000..0eb6f1f6f6a6 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/mod.rs @@ -0,0 +1,430 @@ +pub use num_bigint::BigInt as BigIntValue; +#[cfg(feature = "serde")] +use serde::{Deserialize, Serialize}; +use swc_allocator::arena::{Allocator, Box}; +use swc_common::{ + arena::{ast_node, Take}, + pass::Either, + EqIgnoreSpan, Span, +}; + +pub use self::{ + class::{ + AutoAccessor, Class, ClassMember, ClassMethod, ClassProp, Constructor, Decorator, Key, + MethodKind, PrivateMethod, PrivateProp, StaticBlock, + }, + decl::{ClassDecl, Decl, FnDecl, UsingDecl, VarDecl, VarDeclKind, VarDeclarator}, + expr::*, + function::{Function, Param, ParamOrTsParamProp}, + ident::{BindingIdent, EsReserved, Id, Ident, IdentName, PrivateName}, + jsx::{ + JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue, JSXClosingElement, JSXClosingFragment, + JSXElement, JSXElementChild, JSXElementName, JSXEmptyExpr, JSXExpr, JSXExprContainer, + JSXFragment, JSXMemberExpr, JSXNamespacedName, JSXObject, JSXOpeningElement, + JSXOpeningFragment, JSXSpreadChild, JSXText, + }, + lit::{BigInt, Bool, Lit, Null, Number, Regex, Str}, + module::{Module, ModuleItem, Program, Script}, + module_decl::{ + DefaultDecl, ExportAll, ExportDecl, ExportDefaultDecl, ExportDefaultExpr, + ExportDefaultSpecifier, ExportNamedSpecifier, ExportNamespaceSpecifier, ExportSpecifier, + ImportDecl, ImportDefaultSpecifier, ImportNamedSpecifier, ImportPhase, ImportSpecifier, + ImportStarAsSpecifier, ModuleDecl, ModuleExportName, NamedExport, + }, + pat::{ + ArrayPat, AssignPat, AssignPatProp, KeyValuePatProp, ObjectPat, ObjectPatProp, Pat, RestPat, + }, + prop::{ + AssignProp, ComputedPropName, GetterProp, KeyValueProp, MethodProp, Prop, PropName, + SetterProp, + }, + stmt::{ + BlockStmt, BreakStmt, CatchClause, ContinueStmt, DebuggerStmt, DoWhileStmt, EmptyStmt, + ExprStmt, ForHead, ForInStmt, ForOfStmt, ForStmt, IfStmt, LabeledStmt, ReturnStmt, Stmt, + SwitchCase, SwitchStmt, ThrowStmt, TryStmt, VarDeclOrExpr, WhileStmt, WithStmt, + }, + typescript::{ + Accessibility, TruePlusMinus, TsArrayType, TsAsExpr, TsCallSignatureDecl, + TsConditionalType, TsConstAssertion, TsConstructSignatureDecl, TsConstructorType, + TsEntityName, TsEnumDecl, TsEnumMember, TsEnumMemberId, TsExportAssignment, + TsExprWithTypeArgs, TsExternalModuleRef, TsFnOrConstructorType, TsFnParam, TsFnType, + TsGetterSignature, TsImportEqualsDecl, TsImportType, TsIndexSignature, TsIndexedAccessType, + TsInferType, TsInstantiation, TsInterfaceBody, TsInterfaceDecl, TsIntersectionType, + TsKeywordType, TsKeywordTypeKind, TsLit, TsLitType, TsMappedType, TsMethodSignature, + TsModuleBlock, TsModuleDecl, TsModuleName, TsModuleRef, TsNamespaceBody, TsNamespaceDecl, + TsNamespaceExportDecl, TsNonNullExpr, TsOptionalType, TsParamProp, TsParamPropParam, + TsParenthesizedType, TsPropertySignature, TsQualifiedName, TsRestType, TsSatisfiesExpr, + TsSetterSignature, TsThisType, TsThisTypeOrIdent, TsTplLitType, TsTupleElement, + TsTupleType, TsType, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, TsTypeElement, TsTypeLit, + TsTypeOperator, TsTypeOperatorOp, TsTypeParam, TsTypeParamDecl, TsTypeParamInstantiation, + TsTypePredicate, TsTypeQuery, TsTypeQueryExpr, TsTypeRef, TsUnionOrIntersectionType, + TsUnionType, + }, +}; +pub use super::{ + list::ListFormat, + operators::{AssignOp, BinaryOp, UnaryOp, UpdateOp}, + source_map::{SourceMapperExt, SpanExt}, +}; + +mod class; +mod decl; +mod expr; +mod function; +mod ident; +mod jsx; +mod lit; +mod module; +mod module_decl; +mod pat; +mod prop; +mod stmt; +mod typescript; + +/// A map from the [Program] to the [Program]. +/// +/// This trait is used to implement transformations. The implementor may decide +/// to implement [Fold] or [VisitMut] if the transform is fine to start from an +/// arbitrary node. +/// +/// Tuple of [Pass] implementations also implements [Pass], but it's limited to +/// 12 items for fast compile time. If you have more passes, nest it like `(a, +/// (b, c), (d, e))` +pub trait Pass<'a> { + fn process(&mut self, program: &mut Program<'a>); +} + +/// Optional pass implementation. +impl<'a, P> Pass<'a> for Option

+where + P: Pass<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + if let Some(pass) = self { + pass.process(program); + } + } +} + +impl<'a, P: ?Sized> Pass<'a> for Box<'a, P> +where + P: Pass<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + (**self).process(program); + } +} + +impl<'a, P: ?Sized> Pass<'a> for &'_ mut P +where + P: Pass<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + (**self).process(program); + } +} + +impl<'a, L, R> Pass<'a> for Either +where + L: Pass<'a>, + R: Pass<'a>, +{ + #[inline] + fn process(&mut self, program: &mut Program<'a>) { + match self { + Either::Left(l) => l.process(program), + Either::Right(r) => r.process(program), + } + } +} + +impl<'a, P> Pass<'a> for swc_visit::Optional

+where + P: Pass<'a>, +{ + #[inline] + fn process(&mut self, program: &mut Program<'a>) { + if self.enabled { + self.visitor.process(program); + } + } +} + +impl<'a, P> Pass<'a> for swc_visit::Repeat

+where + P: Pass<'a> + swc_visit::Repeated, +{ + #[inline] + fn process(&mut self, program: &mut Program<'a>) { + loop { + self.pass.reset(); + self.pass.process(program); + + if !self.pass.changed() { + break; + } + } + } +} + +impl<'a> Program<'a> { + #[inline(always)] + pub fn mutate

(&mut self, mut pass: P) + where + P: Pass<'a>, + { + pass.process(self); + } + + #[inline(always)] + pub fn apply

(mut self, mut pass: P) -> Self + where + P: Pass<'a>, + { + pass.process(&mut self); + self + } +} + +macro_rules! impl_pass_for_tuple { + ( + [$idx:tt, $name:ident], $([$idx_rest:tt, $name_rest:ident]),* + ) => { + impl<'a, $name, $($name_rest),*> Pass<'a> for ($name, $($name_rest),*) + where + $name: Pass<'a>, + $($name_rest: Pass<'a>),* + { + #[inline] + fn process(&mut self, program: &mut Program<'a>) { + self.$idx.process(program); + + $( + self.$idx_rest.process(program); + )* + + } + } + }; +} + +impl_pass_for_tuple!([0, A], [1, B]); +impl_pass_for_tuple!([0, A], [1, B], [2, C]); +impl_pass_for_tuple!([0, A], [1, B], [2, C], [3, D]); +impl_pass_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E]); +impl_pass_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E], [5, F]); +impl_pass_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E], [5, F], [6, G]); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H] +); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I] +); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J] +); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K] +); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K], + [11, L] +); +impl_pass_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K], + [11, L], + [12, M] +); + +#[inline(always)] +pub fn noop_pass<'a>() -> impl Pass<'a> { + fn noop(_: &mut Program<'_>) {} + + fn_pass(noop) +} + +#[inline(always)] +pub fn fn_pass<'a>(f: impl FnMut(&mut Program<'a>)) -> impl Pass<'a> { + FnPass { f } +} + +struct FnPass { + f: F, +} + +impl<'a, F> Pass<'a> for FnPass +where + F: FnMut(&mut Program<'a>), +{ + fn process(&mut self, program: &mut Program<'a>) { + (self.f)(program); + } +} + +/// Represents a invalid node. +#[ast_node("Invalid")] +#[derive(Eq, Default, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct Invalid { + pub span: Span, +} + +impl<'a> Take<'a> for Invalid { + fn dummy(_: &'a Allocator) -> Self { + Invalid::default() + } +} + +/// Warning: The particular implementation of serialization and deserialization +/// of the ast nodes may change in the future, and so these types would be +/// removed. It's safe to say they will be serializable in some form or another, +/// but not necessarily with these specific types underlying the implementation. +/// As such, *use these types at your own risk*. +#[cfg(feature = "rkyv-impl")] +#[doc(hidden)] +pub use self::{ + class::{ + ArchivedAutoAccessor, ArchivedClass, ArchivedClassMember, ArchivedClassMethod, + ArchivedClassProp, ArchivedConstructor, ArchivedDecorator, ArchivedKey, ArchivedMethodKind, + ArchivedPrivateMethod, ArchivedPrivateProp, ArchivedStaticBlock, + }, + decl::{ + ArchivedClassDecl, ArchivedDecl, ArchivedFnDecl, ArchivedUsingDecl, ArchivedVarDecl, + ArchivedVarDeclKind, ArchivedVarDeclarator, + }, + expr::{ + ArchivedArrayLit, ArchivedArrowExpr, ArchivedAssignExpr, ArchivedAssignTarget, + ArchivedAwaitExpr, ArchivedBinExpr, ArchivedBlockStmtOrExpr, ArchivedCallExpr, + ArchivedCallee, ArchivedClassExpr, ArchivedCondExpr, ArchivedExpr, ArchivedExprOrSpread, + ArchivedFnExpr, ArchivedImport, ArchivedMemberExpr, ArchivedMemberProp, + ArchivedMetaPropExpr, ArchivedMetaPropKind, ArchivedNewExpr, ArchivedObjectLit, + ArchivedOptCall, ArchivedOptChainBase, ArchivedOptChainExpr, ArchivedParenExpr, + ArchivedPropOrSpread, ArchivedSeqExpr, ArchivedSpreadElement, ArchivedSuper, + ArchivedSuperProp, ArchivedSuperPropExpr, ArchivedTaggedTpl, ArchivedThisExpr, ArchivedTpl, + ArchivedTplElement, ArchivedUnaryExpr, ArchivedUpdateExpr, ArchivedYieldExpr, + }, + function::{ArchivedFunction, ArchivedParam, ArchivedParamOrTsParamProp}, + ident::{ArchivedBindingIdent, ArchivedIdent, ArchivedIdentName, ArchivedPrivateName}, + jsx::{ + ArchivedJSXAttr, ArchivedJSXAttrName, ArchivedJSXAttrOrSpread, ArchivedJSXAttrValue, + ArchivedJSXClosingElement, ArchivedJSXClosingFragment, ArchivedJSXElement, + ArchivedJSXElementChild, ArchivedJSXElementName, ArchivedJSXEmptyExpr, ArchivedJSXExpr, + ArchivedJSXExprContainer, ArchivedJSXFragment, ArchivedJSXMemberExpr, + ArchivedJSXNamespacedName, ArchivedJSXObject, ArchivedJSXOpeningElement, + ArchivedJSXOpeningFragment, ArchivedJSXSpreadChild, ArchivedJSXText, + }, + lit::{ + ArchivedBigInt, ArchivedBool, ArchivedLit, ArchivedNull, ArchivedNumber, ArchivedRegex, + ArchivedStr, + }, + module::{ArchivedModule, ArchivedModuleItem, ArchivedProgram, ArchivedScript}, + module_decl::{ + ArchivedDefaultDecl, ArchivedExportAll, ArchivedExportDecl, ArchivedExportDefaultDecl, + ArchivedExportDefaultExpr, ArchivedExportDefaultSpecifier, ArchivedExportNamedSpecifier, + ArchivedExportNamespaceSpecifier, ArchivedExportSpecifier, ArchivedImportDecl, + ArchivedImportDefaultSpecifier, ArchivedImportNamedSpecifier, ArchivedImportSpecifier, + ArchivedImportStarAsSpecifier, ArchivedModuleDecl, ArchivedModuleExportName, + ArchivedNamedExport, + }, + pat::{ + ArchivedArrayPat, ArchivedAssignPat, ArchivedAssignPatProp, ArchivedKeyValuePatProp, + ArchivedObjectPat, ArchivedObjectPatProp, ArchivedPat, ArchivedRestPat, + }, + prop::{ + ArchivedAssignProp, ArchivedComputedPropName, ArchivedGetterProp, ArchivedKeyValueProp, + ArchivedMethodProp, ArchivedProp, ArchivedPropName, ArchivedSetterProp, + }, + stmt::{ + ArchivedBlockStmt, ArchivedBreakStmt, ArchivedCatchClause, ArchivedContinueStmt, + ArchivedDebuggerStmt, ArchivedDoWhileStmt, ArchivedEmptyStmt, ArchivedExprStmt, + ArchivedForHead, ArchivedForInStmt, ArchivedForOfStmt, ArchivedForStmt, ArchivedIfStmt, + ArchivedLabeledStmt, ArchivedReturnStmt, ArchivedStmt, ArchivedSwitchCase, + ArchivedSwitchStmt, ArchivedThrowStmt, ArchivedTryStmt, ArchivedVarDeclOrExpr, + ArchivedWhileStmt, ArchivedWithStmt, + }, + typescript::{ + ArchivedAccessibility, ArchivedTruePlusMinus, ArchivedTsArrayType, ArchivedTsAsExpr, + ArchivedTsCallSignatureDecl, ArchivedTsConditionalType, ArchivedTsConstAssertion, + ArchivedTsConstructSignatureDecl, ArchivedTsConstructorType, ArchivedTsEntityName, + ArchivedTsEnumDecl, ArchivedTsEnumMember, ArchivedTsEnumMemberId, + ArchivedTsExportAssignment, ArchivedTsExprWithTypeArgs, ArchivedTsExternalModuleRef, + ArchivedTsFnOrConstructorType, ArchivedTsFnParam, ArchivedTsFnType, + ArchivedTsGetterSignature, ArchivedTsImportEqualsDecl, ArchivedTsImportType, + ArchivedTsIndexSignature, ArchivedTsIndexedAccessType, ArchivedTsInferType, + ArchivedTsInstantiation, ArchivedTsInterfaceBody, ArchivedTsInterfaceDecl, + ArchivedTsIntersectionType, ArchivedTsKeywordType, ArchivedTsKeywordTypeKind, + ArchivedTsLit, ArchivedTsLitType, ArchivedTsMappedType, ArchivedTsMethodSignature, + ArchivedTsModuleBlock, ArchivedTsModuleDecl, ArchivedTsModuleName, ArchivedTsModuleRef, + ArchivedTsNamespaceBody, ArchivedTsNamespaceDecl, ArchivedTsNamespaceExportDecl, + ArchivedTsNonNullExpr, ArchivedTsOptionalType, ArchivedTsParamProp, + ArchivedTsParamPropParam, ArchivedTsParenthesizedType, ArchivedTsPropertySignature, + ArchivedTsQualifiedName, ArchivedTsRestType, ArchivedTsSatisfiesExpr, + ArchivedTsSetterSignature, ArchivedTsThisType, ArchivedTsThisTypeOrIdent, + ArchivedTsTplLitType, ArchivedTsTupleElement, ArchivedTsTupleType, ArchivedTsType, + ArchivedTsTypeAliasDecl, ArchivedTsTypeAnn, ArchivedTsTypeAssertion, ArchivedTsTypeElement, + ArchivedTsTypeLit, ArchivedTsTypeOperator, ArchivedTsTypeOperatorOp, ArchivedTsTypeParam, + ArchivedTsTypeParamDecl, ArchivedTsTypeParamInstantiation, ArchivedTsTypePredicate, + ArchivedTsTypeQuery, ArchivedTsTypeQueryExpr, ArchivedTsTypeRef, + ArchivedTsUnionOrIntersectionType, ArchivedTsUnionType, + }, +}; +#[cfg(feature = "rkyv-impl")] +#[doc(hidden)] +pub use super::operators::{ArchivedAssignOp, ArchivedBinaryOp, ArchivedUnaryOp, ArchivedUpdateOp}; diff --git a/crates/swc_ecma_ast/src/arena/module.rs b/crates/swc_ecma_ast/src/arena/module.rs new file mode 100644 index 000000000000..5179e8f09790 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/module.rs @@ -0,0 +1,123 @@ +use is_macro::Is; +use swc_allocator::arena::{Allocator, Box, Vec}; +use swc_atoms::Atom; +use swc_common::{arena::ast_node, arena::Take, EqIgnoreSpan, Span, DUMMY_SP}; + +use super::{module_decl::ModuleDecl, stmt::Stmt}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Program<'a> { + // #[tag("Module")] + Module(Box<'a, Module<'a>>), + // #[tag("Script")] + Script(Box<'a, Script<'a>>), +} + +impl<'a> Take<'a> for Program<'a> { + fn dummy(alloc: &'a Allocator) -> Self { + Program::Script(Box::new_in( + Script { + span: DUMMY_SP, + shebang: None, + body: Vec::new_in(alloc), + }, + alloc, + )) + } +} + +#[ast_node("Module")] +#[derive(Eq, Hash, EqIgnoreSpan)] +pub struct Module<'a> { + pub span: Span, + + pub body: Vec<'a, ModuleItem<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "interpreter"))] + pub shebang: Option, +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Module { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let body = u.arbitrary()?; + Ok(Self { + span, + body, + shebang: None, + }) + } +} + +// impl Take for Module { +// fn dummy() -> Self { +// Module { +// span: DUMMY_SP, +// body: Take::dummy(), +// shebang: Take::dummy(), +// } +// } +// } + +#[ast_node("Script")] +#[derive(Eq, Hash, EqIgnoreSpan)] +pub struct Script<'a> { + pub span: Span, + + pub body: Vec<'a, Stmt<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "interpreter"))] + pub shebang: Option, +} + +#[cfg(feature = "arbitrary")] +#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] +impl<'a> arbitrary::Arbitrary<'a> for Script { + fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { + let span = u.arbitrary()?; + let body = u.arbitrary()?; + Ok(Self { + span, + body, + shebang: None, + }) + } +} + +// impl Take for Script { +// fn dummy() -> Self { +// Script { +// span: DUMMY_SP, +// body: Take::dummy(), +// shebang: Take::dummy(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ModuleItem<'a> { + // #[tag("ImportDeclaration")] + // #[tag("ExportDeclaration")] + // #[tag("ExportNamedDeclaration")] + // #[tag("ExportDefaultDeclaration")] + // #[tag("ExportDefaultExpression")] + // #[tag("ExportAllDeclaration")] + // #[tag("TsImportEqualsDeclaration")] + // #[tag("TsExportAssignment")] + // #[tag("TsNamespaceExportDeclaration")] + ModuleDecl(ModuleDecl<'a>), + // #[tag("*")] + Stmt(Stmt<'a>), +} + +// impl Take for ModuleItem { +// fn dummy() -> Self { +// Self::Stmt(Default::default()) +// } +// } diff --git a/crates/swc_ecma_ast/src/arena/module_decl.rs b/crates/swc_ecma_ast/src/arena/module_decl.rs new file mode 100644 index 000000000000..fa581eef9f7d --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/module_decl.rs @@ -0,0 +1,401 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_atoms::Atom; +use swc_common::{ + arena::{ast_node, CloneIn, Take}, + EqIgnoreSpan, Span, DUMMY_SP, +}; + +use super::{ + decl::Decl, + expr::{ClassExpr, Expr, FnExpr}, + ident::Ident, + lit::Str, + typescript::{TsExportAssignment, TsImportEqualsDecl, TsInterfaceDecl, TsNamespaceExportDecl}, + BindingIdent, IdentName, ObjectLit, +}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ModuleDecl<'a> { + // #[tag("ImportDeclaration")] + Import(Box<'a, ImportDecl<'a>>), + + // #[tag("ExportDeclaration")] + ExportDecl(Box<'a, ExportDecl<'a>>), + + // #[tag("ExportNamedDeclaration")] + ExportNamed(Box<'a, NamedExport<'a>>), + + // #[tag("ExportDefaultDeclaration")] + ExportDefaultDecl(Box<'a, ExportDefaultDecl<'a>>), + + // #[tag("ExportDefaultExpression")] + ExportDefaultExpr(Box<'a, ExportDefaultExpr<'a>>), + + // #[tag("ExportAllDeclaration")] + ExportAll(Box<'a, ExportAll<'a>>), + + // #[tag("TsImportEqualsDeclaration")] + TsImportEquals(Box<'a, TsImportEqualsDecl<'a>>), + + // #[tag("TsExportAssignment")] + TsExportAssignment(Box<'a, TsExportAssignment<'a>>), + + // #[tag("TsNamespaceExportDeclaration")] + TsNamespaceExport(Box<'a, TsNamespaceExportDecl>), +} + +// boxed!(ModuleDecl, [TsImportEqualsDecl]); + +// macro_rules! module_decl { +// ([$($variant:ty),*]) => { +// $( +// bridge_from!(crate::ModuleItem, crate::ModuleDecl, $variant); +// )* +// }; +// } + +// module_decl!([ +// ImportDecl, +// ExportDecl, +// NamedExport, +// ExportDefaultDecl, +// ExportDefaultExpr, +// ExportAll, +// TsImportEqualsDecl, +// TsExportAssignment, +// TsNamespaceExportDecl +// ]); + +// impl Take for ModuleDecl { +// fn dummy() -> Self { +// ImportDecl::dummy().into() +// } +// } + +/// Default exports other than **direct** function expression or class +/// expression. +/// +/// +/// # Note +/// +/// ```ts +/// export default function Foo() { +/// } +/// ``` +/// +/// is [`ExportDefaultDecl`] and it's hoisted. +/// +/// ```ts +/// export default (function Foo() { +/// }) +/// ``` +/// +/// is [`ExportDefaultExpr`] and it's not hoisted. +#[ast_node("ExportDefaultExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportDefaultExpr<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node("ExportDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportDecl<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "declaration"))] + pub decl: Decl<'a>, +} + +#[ast_node("ImportDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ImportDecl<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub specifiers: Vec<'a, ImportSpecifier<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "source"))] + pub src: Box<'a, Str>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeOnly"))] + pub type_only: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub with: Option>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub phase: ImportPhase, +} + +#[derive(Debug, Copy, Clone, CloneIn, PartialEq, Eq, Hash, Default, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] +pub enum ImportPhase { + #[default] + #[cfg_attr(feature = "serde-impl", serde(rename = "evaluation"))] + Evaluation, + #[cfg_attr(feature = "serde-impl", serde(rename = "source"))] + Source, + #[cfg_attr(feature = "serde-impl", serde(rename = "defer"))] + Defer, +} + +// impl Take for ImportDecl { +// fn dummy() -> Self { +// ImportDecl { +// span: DUMMY_SP, +// specifiers: Take::dummy(), +// src: Take::dummy(), +// type_only: Default::default(), +// with: Take::dummy(), +// phase: Default::default(), +// } +// } +// } + +/// `export * from 'mod'` +#[ast_node("ExportAllDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportAll<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "source"))] + pub src: Box<'a, Str>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "typeOnly"))] + pub type_only: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub with: Option>>, +} + +// impl Take for ExportAll { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// src: Take::dummy(), +// type_only: Default::default(), +// with: Take::dummy(), +// } +// } +// } + +/// `export { foo } from 'mod'` +/// `export { foo as bar } from 'mod'` +#[ast_node("ExportNamedDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct NamedExport<'a> { + pub span: Span, + + pub specifiers: Vec<'a, ExportSpecifier<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "source"))] + pub src: Option>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "typeOnly"))] + pub type_only: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub with: Option>>, +} + +// impl Take for NamedExport { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// specifiers: Take::dummy(), +// src: Take::dummy(), +// type_only: Default::default(), +// with: Take::dummy(), +// } +// } +// } + +#[ast_node("ExportDefaultDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportDefaultDecl<'a> { + pub span: Span, + + pub decl: DefaultDecl<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum DefaultDecl<'a> { + // #[tag("ClassExpression")] + Class(Box<'a, ClassExpr<'a>>), + + // #[tag("FunctionExpression")] + #[is(name = "fn_expr")] + Fn(Box<'a, FnExpr<'a>>), + + // #[tag("TsInterfaceDeclaration")] + TsInterfaceDecl(Box<'a, TsInterfaceDecl<'a>>), +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ImportSpecifier<'a> { + // #[tag("ImportSpecifier")] + Named(Box<'a, ImportNamedSpecifier<'a>>), + // #[tag("ImportDefaultSpecifier")] + Default(Box<'a, ImportDefaultSpecifier>), + // #[tag("ImportNamespaceSpecifier")] + Namespace(Box<'a, ImportStarAsSpecifier>), +} + +impl ImportSpecifier<'_> { + pub fn is_type_only(&self) -> bool { + match self { + ImportSpecifier::Named(named) => named.is_type_only, + ImportSpecifier::Default(..) | ImportSpecifier::Namespace(..) => false, + } + } + + pub fn local(&self) -> &Ident { + match self { + ImportSpecifier::Named(named) => &named.local, + ImportSpecifier::Default(default) => &default.local, + ImportSpecifier::Namespace(ns) => &ns.local, + } + } + + pub fn local_mut(&mut self) -> &mut Ident { + match self { + ImportSpecifier::Named(named) => &mut named.local, + ImportSpecifier::Default(default) => &mut default.local, + ImportSpecifier::Namespace(ns) => &mut ns.local, + } + } +} + +/// e.g. `import foo from 'mod.js'` +#[ast_node("ImportDefaultSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ImportDefaultSpecifier { + pub span: Span, + + pub local: Ident, +} +/// e.g. `import * as foo from 'mod.js'`. +#[ast_node("ImportNamespaceSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ImportStarAsSpecifier { + pub span: Span, + + pub local: Ident, +} +/// e.g. local = foo, imported = None `import { foo } from 'mod.js'` +/// e.g. local = bar, imported = Some(foo) for `import { foo as bar } from +/// 'mod.js'` +#[ast_node("ImportSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ImportNamedSpecifier<'a> { + pub span: Span, + + pub local: Ident, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub imported: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_type_only: bool, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ExportSpecifier<'a> { + // #[tag("ExportNamespaceSpecifier")] + Namespace(Box<'a, ExportNamespaceSpecifier<'a>>), + + // #[tag("ExportDefaultSpecifier")] + Default(Box<'a, ExportDefaultSpecifier>), + + // #[tag("ExportSpecifier")] + Named(Box<'a, ExportNamedSpecifier<'a>>), +} + +/// `export * as foo from 'src';` +#[ast_node("ExportNamespaceSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportNamespaceSpecifier<'a> { + pub span: Span, + + pub name: ModuleExportName<'a>, +} + +// export v from 'mod'; +#[ast_node("ExportDefaultSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportDefaultSpecifier { + #[span] + pub exported: Ident, +} + +#[ast_node("ExportSpecifier")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExportNamedSpecifier<'a> { + pub span: Span, + /// `foo` in `export { foo as bar }` + pub orig: ModuleExportName<'a>, + /// `Some(bar)` in `export { foo as bar }` + #[cfg_attr(feature = "serde-impl", serde(default))] + pub exported: Option>, + /// `type` in `export { type foo as bar }` + #[cfg_attr(feature = "serde-impl", serde(default))] + pub is_type_only: bool, +} + +#[ast_node] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +// https://tc39.es/ecma262/#prod-ModuleExportName +pub enum ModuleExportName<'a> { + // #[tag("Identifier")] + Ident(Box<'a, Ident>), + + // #[tag("StringLiteral")] + Str(Box<'a, Str>), +} + +// bridge_from!(Box<'a, Ident>, Ident, BindingIdent<'a>); +// bridge_from!(ModuleExportName<'a>, Box<'a, Ident>, BindingIdent<'a>); +// bridge_from!(Box<'a, Ident>, Ident, IdentName); +// bridge_from!(ModuleExportName<'a>, Box<'a, Ident>, IdentName); + +impl ModuleExportName<'_> { + /// Get the atom of the export name. + pub fn atom(&self) -> &Atom { + match self { + ModuleExportName::Ident(i) => &i.sym, + ModuleExportName::Str(s) => &s.value, + } + } +} diff --git a/crates/swc_ecma_ast/src/arena/pat.rs b/crates/swc_ecma_ast/src/arena/pat.rs new file mode 100644 index 000000000000..a5eaaab9b8a9 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/pat.rs @@ -0,0 +1,199 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, CloneIn}, + arena::Take, + EqIgnoreSpan, Span, DUMMY_SP, +}; + +use super::{ + expr::Expr, + ident::{BindingIdent, Ident}, + prop::PropName, + typescript::TsTypeAnn, + Id, IdentName, Invalid, +}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Pat<'a> { + // #[tag("Identifier")] + Ident(Box<'a, BindingIdent<'a>>), + + // #[tag("ArrayPattern")] + Array(Box<'a, ArrayPat<'a>>), + + // #[tag("RestElement")] + Rest(Box<'a, RestPat<'a>>), + + // #[tag("ObjectPattern")] + Object(Box<'a, ObjectPat<'a>>), + + // #[tag("AssignmentPattern")] + Assign(Box<'a, AssignPat<'a>>), + + // #[tag("Invalid")] + Invalid(Box<'a, Invalid>), + + /// Only for for-in / for-of loops. This is *syntactically* valid. + // #[tag("*")] + Expr(Expr<'a>), +} + +// Implement Clone without inline to avoid multiple copies of the +// implementation. +// impl Clone for Pat { +// fn clone(&self) -> Self { +// use Pat::*; +// match self { +// Ident(p) => Ident(p.clone()), +// Array(p) => Array(p.clone()), +// Rest(p) => Rest(p.clone()), +// Object(p) => Object(p.clone()), +// Assign(p) => Assign(p.clone()), +// Invalid(p) => Invalid(p.clone()), +// Expr(p) => Expr(p.clone()), +// } +// } +// } + +// impl Default for Pat { +// fn default() -> Self { +// Invalid { span: DUMMY_SP }.into() +// } +// } +// impl Take for Pat { +// fn dummy() -> Self { +// Default::default() +// } +// } + +// macro_rules! bridge_pat_from { +// ($bridge:ty, $src:ty) => { +// bridge_from!(Box<'a, $bridge>, $bridge, $src); +// bridge_from!(Pat<'a>, Box<'a, $bridge>, $src); +// bridge_from!(crate::Param<'a>, crate::Pat<'a>, $src); +// bridge_from!(Box<'a, Pat<'a>>, crate::Pat<'a>, $src); +// }; +// } + +// bridge_pat_from!(BindingIdent<'a>, Ident); +// bridge_pat_from!(BindingIdent<'a>, IdentName); +// bridge_pat_from!(BindingIdent<'a>, Id); + +// macro_rules! pat_to_other { +// ($T:ty) => { +// bridge_from!(Pat<'a>, Box<'a, $T>, $T); +// bridge_from!(crate::Param<'a>, Pat<'a>, $T); +// bridge_from!(Box<'a, Pat<'a>>, Pat<'a>, $T); +// }; +// } + +// pat_to_other!(BindingIdent<'a>); +// pat_to_other!(ArrayPat<'a>); +// pat_to_other!(ObjectPat<'a>); +// pat_to_other!(AssignPat<'a>); +// pat_to_other!(RestPat<'a>); +// pat_to_other!(Box<'a, Expr<'a>>); + +#[ast_node("ArrayPattern")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ArrayPat<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "elements"))] + pub elems: Vec<'a, Option>>, + + /// Only in an ambient context + #[cfg_attr(feature = "serde-impl", serde(rename = "optional"))] + pub optional: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node("ObjectPattern")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ObjectPat<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "properties"))] + pub props: Vec<'a, ObjectPatProp<'a>>, + + /// Only in an ambient context + #[cfg_attr(feature = "serde-impl", serde(rename = "optional"))] + pub optional: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node("AssignmentPattern")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AssignPat<'a> { + pub span: Span, + + pub left: Pat<'a>, + + pub right: Expr<'a>, +} + +/// EsTree `RestElement` +#[ast_node("RestElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct RestPat<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "rest"))] + pub dot3_token: Span, + + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Pat<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ObjectPatProp<'a> { + // #[tag("KeyValuePatternProperty")] + KeyValue(Box<'a, KeyValuePatProp<'a>>), + + // #[tag("AssignmentPatternProperty")] + Assign(Box<'a, AssignPatProp<'a>>), + + // #[tag("RestElement")] + Rest(Box<'a, RestPat<'a>>), +} + +/// `{key: value}` +#[ast_node("KeyValuePatternProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct KeyValuePatProp<'a> { + #[span(lo)] + pub key: PropName<'a>, + + #[span(hi)] + pub value: Pat<'a>, +} +/// `{key}` or `{key = value}` +#[ast_node("AssignmentPatternProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AssignPatProp<'a> { + pub span: Span, + /// Note: This type is to help implementing visitor and the field `type_ann` + /// is always [None]. + pub key: BindingIdent<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub value: Option>, +} diff --git a/crates/swc_ecma_ast/src/arena/prop.rs b/crates/swc_ecma_ast/src/arena/prop.rs new file mode 100644 index 000000000000..2fa81531f82f --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/prop.rs @@ -0,0 +1,181 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, Take}, + EqIgnoreSpan, Span, DUMMY_SP, +}; + +use super::{ + expr::Expr, + function::Function, + ident::Ident, + lit::{BigInt, Number, Str}, + stmt::BlockStmt, + typescript::TsTypeAnn, + Id, IdentName, Lit, MemberProp, Pat, +}; + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Prop<'a> { + /// `a` in `{ a, }` + // #[tag("Identifier")] + Shorthand(Box<'a, Ident>), + + /// `key: value` in `{ key: value, }` + // #[tag("KeyValueProperty")] + KeyValue(Box<'a, KeyValueProp<'a>>), + + /// This is **invalid** for object literal. + // #[tag("AssignmentProperty")] + Assign(Box<'a, AssignProp<'a>>), + + // #[tag("GetterProperty")] + Getter(Box<'a, GetterProp<'a>>), + + // #[tag("SetterProperty")] + Setter(Box<'a, SetterProp<'a>>), + + // #[tag("MethodProperty")] + Method(Box<'a, MethodProp<'a>>), +} + +// bridge_from!(Box<'a, Ident>, Ident, IdentName); +// bridge_from!(Prop<'a>, Box<'a, Ident>, IdentName); + +#[ast_node("KeyValueProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct KeyValueProp<'a> { + #[span(lo)] + pub key: PropName<'a>, + + #[span(hi)] + pub value: Expr<'a>, +} + +#[ast_node("AssignmentProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct AssignProp<'a> { + pub span: Span, + pub key: Ident, + pub value: Expr<'a>, +} + +#[ast_node("GetterProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct GetterProp<'a> { + pub span: Span, + pub key: PropName<'a>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Option>, +} +#[ast_node("SetterProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SetterProp<'a> { + pub span: Span, + pub key: PropName<'a>, + pub this_param: Option>, + pub param: Pat<'a>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Option>, +} +#[ast_node("MethodProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct MethodProp<'a> { + pub key: PropName<'a>, + + #[cfg_attr(feature = "serde-impl", serde(flatten))] + #[span] + pub function: Box<'a, Function<'a>>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum PropName<'a> { + // #[tag("Identifier")] + Ident(Box<'a, IdentName>), + /// String literal. + // #[tag("StringLiteral")] + Str(Box<'a, Str>), + /// Numeric literal. + // #[tag("NumericLiteral")] + Num(Box<'a, Number>), + // #[tag("Computed")] + Computed(Box<'a, ComputedPropName<'a>>), + // #[tag("BigIntLiteral")] + BigInt(Box<'a, BigInt<'a>>), +} + +// bridge_from!(Box<'a, IdentName>, IdentName, Ident); +// bridge_from!(PropName<'a>, Box<'a, IdentName>, Ident); +// bridge_from!(PropName<'a>, Ident, Id); + +// impl Default for PropName { +// fn default() -> Self { +// PropName::Ident(Default::default()) +// } +// } + +// impl Take for PropName { +// fn dummy() -> Self { +// PropName::Ident(Take::dummy()) +// } +// } + +// impl<'a> FromWith<'a, PropName<'a>> for MemberProp<'a> { +// fn from_with(p: PropName<'a>, allocator: &'a swc_allocator::Allocator) -> +// Self { match p { +// PropName::Ident(p) => MemberProp::Ident(p), +// PropName::Computed(p) => MemberProp::Computed(p), +// PropName::Str(p) => MemberProp::Computed(Box::new_in( +// ComputedPropName { +// span: DUMMY_SP, +// expr: Expr::Lit(Box::new_in(Lit::Str(p), allocator)), +// }, +// allocator, +// )), +// PropName::Num(p) => MemberProp::Computed(Box::new_in( +// ComputedPropName { +// span: DUMMY_SP, +// expr: Expr::Lit(Box::new_in(Lit::Num(p), allocator)), +// }, +// allocator, +// )), +// PropName::BigInt(p) => MemberProp::Computed(Box::new_in( +// ComputedPropName { +// span: DUMMY_SP, +// expr: Expr::Lit(Box::new_in(Lit::BigInt(p), allocator)), +// }, +// allocator, +// )), +// } +// } +// } + +#[ast_node("Computed")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ComputedPropName<'a> { + /// Span including `[` and `]`. + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +// impl Take for ComputedPropName { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// expr: Take::dummy(), +// } +// } +// } diff --git a/crates/swc_ecma_ast/src/arena/stmt.rs b/crates/swc_ecma_ast/src/arena/stmt.rs new file mode 100644 index 000000000000..4d872a3a36d8 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/stmt.rs @@ -0,0 +1,488 @@ +use is_macro::Is; +use swc_allocator::arena::{Box, Vec}; +use swc_common::{ + arena::{ast_node, Take}, + EqIgnoreSpan, Span, SyntaxContext, DUMMY_SP, +}; + +use super::{ + decl::{Decl, VarDecl}, + expr::Expr, + pat::Pat, + Ident, Lit, Str, UsingDecl, +}; + +/// Use when only block statements are allowed. +#[ast_node("BlockStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct BlockStmt<'a> { + /// Span including the braces. + pub span: Span, + + pub ctxt: SyntaxContext, + + pub stmts: Vec<'a, Stmt<'a>>, +} + +// impl Take for BlockStmt { +// fn dummy() -> Self { +// BlockStmt { +// span: DUMMY_SP, +// stmts: Vec::new(), +// ctxt: Default::default(), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum Stmt<'a> { + // #[tag("BlockStatement")] + Block(Box<'a, BlockStmt<'a>>), + + // #[tag("EmptyStatement")] + Empty(Box<'a, EmptyStmt>), + + // #[tag("DebuggerStatement")] + Debugger(Box<'a, DebuggerStmt>), + + // #[tag("WithStatement")] + With(Box<'a, WithStmt<'a>>), + + // #[tag("ReturnStatement")] + #[is(name = "return_stmt")] + Return(Box<'a, ReturnStmt<'a>>), + + // #[tag("LabeledStatement")] + Labeled(Box<'a, LabeledStmt<'a>>), + + // #[tag("BreakStatement")] + #[is(name = "break_stmt")] + Break(Box<'a, BreakStmt>), + + // #[tag("ContinueStatement")] + #[is(name = "continue_stmt")] + Continue(Box<'a, ContinueStmt>), + + // #[tag("IfStatement")] + #[is(name = "if_stmt")] + If(Box<'a, IfStmt<'a>>), + + // #[tag("SwitchStatement")] + Switch(Box<'a, SwitchStmt<'a>>), + + // #[tag("ThrowStatement")] + Throw(Box<'a, ThrowStmt<'a>>), + + /// A try statement. If handler is null then finalizer must be a BlockStmt. + // #[tag("TryStatement")] + #[is(name = "try_stmt")] + Try(Box<'a, TryStmt<'a>>), + + // #[tag("WhileStatement")] + #[is(name = "while_stmt")] + While(Box<'a, WhileStmt<'a>>), + + // #[tag("DoWhileStatement")] + DoWhile(Box<'a, DoWhileStmt<'a>>), + + // #[tag("ForStatement")] + #[is(name = "for_stmt")] + For(Box<'a, ForStmt<'a>>), + + // #[tag("ForInStatement")] + ForIn(Box<'a, ForInStmt<'a>>), + + // #[tag("ForOfStatement")] + ForOf(Box<'a, ForOfStmt<'a>>), + + // #[tag("ClassDeclaration")] + // #[tag("FunctionDeclaration")] + // #[tag("VariableDeclaration")] + // #[tag("TsInterfaceDeclaration")] + // #[tag("TsTypeAliasDeclaration")] + // #[tag("TsEnumDeclaration")] + // #[tag("TsModuleDeclaration")] + // #[tag("UsingDeclaration")] + Decl(Box<'a, Decl<'a>>), + + // #[tag("ExpressionStatement")] + Expr(Box<'a, ExprStmt<'a>>), +} + +// macro_rules! bridge_stmt { +// ($($variant_ty:ty),*) => { +// $( +// bridge_from!(Stmt<'a>, Box<'a, $variant_ty>, $variant_ty); +// bridge_from!(Box<'a, Stmt<'a>>, Stmt<'a>, $variant_ty); +// bridge_from!(crate::ModuleItem<'a>, Box<'a, Stmt<'a>>, +// $variant_ty); )* +// }; +// } + +// bridge_stmt!( +// ExprStmt<'a>, +// BlockStmt<'a>, +// EmptyStmt, +// DebuggerStmt, +// WithStmt<'a>, +// ReturnStmt<'a>, +// LabeledStmt<'a>, +// BreakStmt, +// ContinueStmt, +// IfStmt<'a>, +// SwitchStmt<'a>, +// ThrowStmt<'a>, +// TryStmt<'a>, +// WhileStmt<'a>, +// DoWhileStmt<'a>, +// ForStmt<'a>, +// ForInStmt<'a>, +// ForOfStmt<'a>, +// Decl<'a> +// ); + +impl Stmt<'_> { + pub fn is_use_strict(&self) -> bool { + self.as_expr() + .map(|expr| &expr.expr) + .and_then(|expr| expr.as_lit()) + .and_then(|lit| lit.as_str()) + .and_then(|s| s.raw.as_ref()) + .map_or(false, |value| { + value == "\"use strict\"" || value == "'use strict'" + }) + } + + /// Returns true if the statement does not prevent the directives below + /// `self` from being directives. + pub fn can_precede_directive(&self) -> bool { + match self { + Stmt::Expr(expr) => expr.expr.as_lit().is_some_and(|lit| lit.is_str()), + _ => false, + } + } +} + +// Memory layout depedns on the version of rustc. +// #[cfg(target_pointer_width = "64")] +// assert_eq_size!(Stmt, [u8; 56]); + +// Implement Clone without inline to avoid multiple copies of the +// implementation. +// impl Clone for Stmt { +// fn clone(&self) -> Self { +// use Stmt::*; +// match self { +// Block(s) => Block(s.clone()), +// Empty(s) => Empty(s.clone()), +// Debugger(s) => Debugger(s.clone()), +// With(s) => With(s.clone()), +// Return(s) => Return(s.clone()), +// Labeled(s) => Labeled(s.clone()), +// Break(s) => Break(s.clone()), +// Continue(s) => Continue(s.clone()), +// If(s) => If(s.clone()), +// Switch(s) => Switch(s.clone()), +// Throw(s) => Throw(s.clone()), +// Try(s) => Try(s.clone()), +// While(s) => While(s.clone()), +// DoWhile(s) => DoWhile(s.clone()), +// For(s) => For(s.clone()), +// ForIn(s) => ForIn(s.clone()), +// ForOf(s) => ForOf(s.clone()), +// Decl(s) => Decl(s.clone()), +// Expr(s) => Expr(s.clone()), +// } +// } +// } + +// impl Default for Stmt { +// fn default() -> Self { +// Self::Empty(EmptyStmt { span: DUMMY_SP }) +// } +// } + +// impl Take for Stmt { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("ExpressionStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ExprStmt<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node("EmptyStatement")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct EmptyStmt { + /// Span of semicolon. + pub span: Span, +} + +#[ast_node("DebuggerStatement")] +#[derive(Eq, Hash, Copy, Clone, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct DebuggerStmt { + pub span: Span, +} + +#[ast_node("WithStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct WithStmt<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "object"))] + pub obj: Expr<'a>, + pub body: Stmt<'a>, +} + +#[ast_node("ReturnStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ReturnStmt<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "argument"))] + pub arg: Option>, +} + +#[ast_node("LabeledStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct LabeledStmt<'a> { + pub span: Span, + pub label: Ident, + pub body: Stmt<'a>, +} + +#[ast_node("BreakStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct BreakStmt { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub label: Option, +} + +#[ast_node("ContinueStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ContinueStmt { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub label: Option, +} + +#[ast_node("IfStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct IfStmt<'a> { + pub span: Span, + pub test: Expr<'a>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "consequent"))] + pub cons: Stmt<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "alternate"))] + pub alt: Option>, +} + +#[ast_node("SwitchStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SwitchStmt<'a> { + pub span: Span, + pub discriminant: Expr<'a>, + pub cases: Vec<'a, SwitchCase<'a>>, +} + +#[ast_node("ThrowStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ThrowStmt<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Expr<'a>, +} + +#[ast_node("TryStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TryStmt<'a> { + pub span: Span, + + pub block: BlockStmt<'a>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub handler: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub finalizer: Option>, +} + +#[ast_node("WhileStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct WhileStmt<'a> { + pub span: Span, + pub test: Expr<'a>, + pub body: Stmt<'a>, +} + +#[ast_node("DoWhileStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct DoWhileStmt<'a> { + pub span: Span, + pub test: Expr<'a>, + pub body: Stmt<'a>, +} + +#[ast_node("ForStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ForStmt<'a> { + pub span: Span, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub init: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub test: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub update: Option>, + + pub body: Stmt<'a>, +} + +#[ast_node("ForInStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ForInStmt<'a> { + pub span: Span, + pub left: ForHead<'a>, + pub right: Expr<'a>, + pub body: Stmt<'a>, +} + +#[ast_node("ForOfStatement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct ForOfStmt<'a> { + pub span: Span, + /// Span of the await token. + /// + /// es2018 + /// + /// for-await-of statements, e.g., `for await (const x of xs) {` + #[cfg_attr(feature = "serde-impl", serde(default, rename = "await"))] + pub is_await: bool, + pub left: ForHead<'a>, + pub right: Expr<'a>, + pub body: Stmt<'a>, +} + +// impl Take for ForOfStmt { +// fn dummy() -> Self { +// Default::default() +// } +// } + +#[ast_node("SwitchCase")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct SwitchCase<'a> { + pub span: Span, + + /// None for `default:` + #[cfg_attr(feature = "serde-impl", serde(default))] + pub test: Option>, + + #[cfg_attr(feature = "serde-impl", serde(rename = "consequent"))] + pub cons: Vec<'a, Stmt<'a>>, +} + +// impl Take for SwitchCase { +// fn dummy() -> Self { +// Self { +// span: DUMMY_SP, +// test: None, +// cons: Vec::new(), +// } +// } +// } + +#[ast_node("CatchClause")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct CatchClause<'a> { + pub span: Span, + /// es2019 + /// + /// The param is null if the catch binding is omitted. E.g., try { foo() } + /// catch { bar() } + #[cfg_attr(feature = "serde-impl", serde(default))] + pub param: Option>, + + pub body: BlockStmt<'a>, +} + +/// A head for for-in and for-of loop. +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum ForHead<'a> { + // #[tag("VariableDeclaration")] + VarDecl(Box<'a, VarDecl<'a>>), + + // #[tag("UsingDeclaration")] + UsingDecl(Box<'a, UsingDecl<'a>>), + + // #[tag("*")] + Pat(Pat<'a>), +} + +// bridge_from!(ForHead<'a>, Box<'a, VarDecl<'a>>, VarDecl<'a>); +// bridge_from!(ForHead<'a>, Box<'a, Pat<'a>>, Pat<'a>); + +// impl Take for ForHead { +// fn dummy() -> Self { +// Default::default() +// } +// } + +// impl Default for ForHead { +// fn default() -> Self { +// ForHead::Pat(Take::dummy()) +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum VarDeclOrExpr<'a> { + // #[tag("VariableDeclaration")] + VarDecl(Box<'a, VarDecl<'a>>), + + // #[tag("*")] + Expr(Expr<'a>), +} + +// bridge_from!(VarDeclOrExpr<'a>, Box<'a, VarDecl<'a>>, VarDecl<'a>); +// bridge_from!(VarDeclOrExpr<'a>, Box<'a, Expr<'a>>, Expr<'a>); + +// impl Take for VarDeclOrExpr { +// fn dummy() -> Self { +// VarDeclOrExpr::Expr(Take::dummy()) +// } +// } diff --git a/crates/swc_ecma_ast/src/arena/typescript.rs b/crates/swc_ecma_ast/src/arena/typescript.rs new file mode 100644 index 000000000000..9f320eca1592 --- /dev/null +++ b/crates/swc_ecma_ast/src/arena/typescript.rs @@ -0,0 +1,1123 @@ +#![allow(clippy::vec_box)] +#![allow(missing_copy_implementations)] + +#[cfg(feature = "serde-impl")] +use std::fmt; + +use is_macro::Is; +#[cfg(feature = "serde-impl")] +use serde::{ + de::{self, Unexpected, Visitor}, + Deserialize, Deserializer, Serialize, +}; +use string_enum::StringEnum; +use swc_allocator::arena::{Box, Vec}; +use swc_atoms::Atom; +use swc_common::{ + arena::{ast_node, CloneIn}, + EqIgnoreSpan, Span, +}; + +use super::{ + class::Decorator, + expr::Expr, + ident::Ident, + lit::{Bool, Number, Str}, + module::ModuleItem, + pat::{ArrayPat, AssignPat, ObjectPat, Pat, RestPat}, + BigInt, BindingIdent, IdentName, TplElement, +}; + +#[ast_node("TsTypeAnnotation")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeAnn<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsTypeParameterDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeParamDecl<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "parameters"))] + pub params: Vec<'a, TsTypeParam<'a>>, +} + +#[ast_node("TsTypeParameter")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeParam<'a> { + pub span: Span, + pub name: Ident, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "in"))] + pub is_in: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "out"))] + pub is_out: bool, + + #[cfg_attr(feature = "serde-impl", serde(default, rename = "const"))] + pub is_const: bool, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub constraint: Option>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub default: Option>, +} + +#[ast_node("TsTypeParameterInstantiation")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeParamInstantiation<'a> { + pub span: Span, + pub params: Vec<'a, TsType<'a>>, +} + +#[ast_node("TsParameterProperty")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsParamProp<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub decorators: Vec<'a, Decorator<'a>>, + /// At least one of `accessibility` or `readonly` must be set. + #[cfg_attr(feature = "serde-impl", serde(default))] + pub accessibility: Option, + #[cfg_attr(feature = "serde-impl", serde(rename = "override"))] + pub is_override: bool, + pub readonly: bool, + pub param: TsParamPropParam<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsParamPropParam<'a> { + // #[tag("Identifier")] + Ident(Box<'a, BindingIdent<'a>>), + + // #[tag("AssignmentPattern")] + Assign(Box<'a, AssignPat<'a>>), +} + +#[ast_node("TsQualifiedName")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsQualifiedName<'a> { + pub span: Span, + pub left: TsEntityName<'a>, + pub right: IdentName, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsEntityName<'a> { + // #[tag("TsQualifiedName")] + TsQualifiedName(Box<'a, TsQualifiedName<'a>>), + + // #[tag("Identifier")] + Ident(Box<'a, Ident>), +} + +// ================ +// TypeScript type members (for type literal / interface / class) +// ================ + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsTypeElement<'a> { + // #[tag("TsCallSignatureDeclaration")] + TsCallSignatureDecl(Box<'a, TsCallSignatureDecl<'a>>), + + // #[tag("TsConstructSignatureDeclaration")] + TsConstructSignatureDecl(Box<'a, TsConstructSignatureDecl<'a>>), + + // #[tag("TsPropertySignature")] + TsPropertySignature(Box<'a, TsPropertySignature<'a>>), + + // #[tag("TsGetterSignature")] + TsGetterSignature(Box<'a, TsGetterSignature<'a>>), + + // #[tag("TsSetterSignature")] + TsSetterSignature(Box<'a, TsSetterSignature<'a>>), + + // #[tag("TsMethodSignature")] + TsMethodSignature(Box<'a, TsMethodSignature<'a>>), + + // #[tag("TsIndexSignature")] + TsIndexSignature(Box<'a, TsIndexSignature<'a>>), +} + +#[ast_node("TsCallSignatureDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsCallSignatureDecl<'a> { + pub span: Span, + pub params: Vec<'a, TsFnParam<'a>>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, +} + +#[ast_node("TsConstructSignatureDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsConstructSignatureDecl<'a> { + pub span: Span, + pub params: Vec<'a, TsFnParam<'a>>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, +} + +#[ast_node("TsPropertySignature")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsPropertySignature<'a> { + pub span: Span, + pub readonly: bool, + pub key: Expr<'a>, + pub computed: bool, + pub optional: bool, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node("TsGetterSignature")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsGetterSignature<'a> { + pub span: Span, + pub key: Expr<'a>, + pub computed: bool, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node("TsSetterSignature")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsSetterSignature<'a> { + pub span: Span, + pub key: Expr<'a>, + pub computed: bool, + pub param: TsFnParam<'a>, +} + +#[ast_node("TsMethodSignature")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsMethodSignature<'a> { + pub span: Span, + pub key: Expr<'a>, + pub computed: bool, + pub optional: bool, + pub params: Vec<'a, TsFnParam<'a>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_ann: Option>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, +} + +#[ast_node("TsIndexSignature")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsIndexSignature<'a> { + pub params: Vec<'a, TsFnParam<'a>>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>>, + + pub readonly: bool, + #[cfg_attr(feature = "serde-impl", serde(rename = "static"))] + pub is_static: bool, + pub span: Span, +} + +// ================ +// TypeScript types +// ================ + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsType<'a> { + // #[tag("TsKeywordType")] + TsKeywordType(Box<'a, TsKeywordType>), + + // #[tag("TsThisType")] + TsThisType(Box<'a, TsThisType>), + + // #[tag("TsFunctionType")] + // #[tag("TsConstructorType")] + TsFnOrConstructorType(Box<'a, TsFnOrConstructorType<'a>>), + + // #[tag("TsTypeReference")] + TsTypeRef(Box<'a, TsTypeRef<'a>>), + + // #[tag("TsTypeQuery")] + TsTypeQuery(Box<'a, TsTypeQuery<'a>>), + + // #[tag("TsTypeLiteral")] + TsTypeLit(Box<'a, TsTypeLit<'a>>), + + // #[tag("TsArrayType")] + TsArrayType(Box<'a, TsArrayType<'a>>), + + // #[tag("TsTupleType")] + TsTupleType(Box<'a, TsTupleType<'a>>), + + // #[tag("TsOptionalType")] + TsOptionalType(Box<'a, TsOptionalType<'a>>), + + // #[tag("TsRestType")] + TsRestType(Box<'a, TsRestType<'a>>), + + // #[tag("TsUnionType")] + // #[tag("TsIntersectionType")] + TsUnionOrIntersectionType(Box<'a, TsUnionOrIntersectionType<'a>>), + + // #[tag("TsConditionalType")] + TsConditionalType(Box<'a, TsConditionalType<'a>>), + + // #[tag("TsInferType")] + TsInferType(Box<'a, TsInferType<'a>>), + + // #[tag("TsParenthesizedType")] + TsParenthesizedType(Box<'a, TsParenthesizedType<'a>>), + + // // #[tag("TsTypeOperator")] + TsTypeOperator(Box<'a, TsTypeOperator<'a>>), + + // #[tag("TsIndexedAccessType")] + TsIndexedAccessType(Box<'a, TsIndexedAccessType<'a>>), + + // #[tag("TsMappedType")] + TsMappedType(Box<'a, TsMappedType<'a>>), + + // #[tag("TsLiteralType")] + TsLitType(Box<'a, TsLitType<'a>>), + + // #[tag("TsTypePredicate")] + TsTypePredicate(Box<'a, TsTypePredicate<'a>>), + + // #[tag("TsImportType")] + TsImportType(Box<'a, TsImportType<'a>>), +} + +// Implement Clone without inline to avoid multiple copies of the +// implementation. +// impl Clone for TsType { +// fn clone(&self) -> Self { +// use TsType::*; +// match self { +// TsKeywordType(t) => TsKeywordType(t.clone()), +// TsThisType(t) => TsThisType(t.clone()), +// TsFnOrConstructorType(t) => TsFnOrConstructorType(t.clone()), +// TsTypeRef(t) => TsTypeRef(t.clone()), +// TsTypeQuery(t) => TsTypeQuery(t.clone()), +// TsTypeLit(t) => TsTypeLit(t.clone()), +// TsArrayType(t) => TsArrayType(t.clone()), +// TsTupleType(t) => TsTupleType(t.clone()), +// TsOptionalType(t) => TsOptionalType(t.clone()), +// TsRestType(t) => TsRestType(t.clone()), +// TsUnionOrIntersectionType(t) => +// TsUnionOrIntersectionType(t.clone()), TsConditionalType(t) => +// TsConditionalType(t.clone()), TsInferType(t) => +// TsInferType(t.clone()), TsParenthesizedType(t) => +// TsParenthesizedType(t.clone()), TsTypeOperator(t) => +// TsTypeOperator(t.clone()), TsIndexedAccessType(t) => +// TsIndexedAccessType(t.clone()), TsMappedType(t) => +// TsMappedType(t.clone()), TsLitType(t) => TsLitType(t.clone()), +// TsTypePredicate(t) => TsTypePredicate(t.clone()), +// TsImportType(t) => TsImportType(t.clone()), +// } +// } +// } + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsFnOrConstructorType<'a> { + // #[tag("TsFunctionType")] + TsFnType(Box<'a, TsFnType<'a>>), + // #[tag("TsConstructorType")] + TsConstructorType(Box<'a, TsConstructorType<'a>>), +} + +// impl<'a> FromWith<'a, TsFnType<'a>> for TsType<'a> { +// fn from_with(value: TsFnType<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { TsType::TsFnOrConstructorType( +// TsFnOrConstructorType::TsFnType(Box::new_in(value, +// allocator)).into_with(allocator), ) +// } +// } + +// impl<'a> FromWith<'a, TsConstructorType<'a>> for TsType<'a> { +// fn from_with(value: TsConstructorType<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { TsType::TsFnOrConstructorType( +// TsFnOrConstructorType::TsConstructorType(Box::new_in(value, +// allocator)) .into_with(allocator), +// ) +// } +// } + +// impl<'a> FromWith<'a, TsUnionType<'a>> for TsType<'a> { +// fn from_with(value: TsUnionType<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { +// TsType::TsUnionOrIntersectionType( +// TsUnionOrIntersectionType::TsUnionType(Box::new_in(value, +// allocator)) .into_with(allocator), +// ) +// } +// } + +// impl<'a> FromWith<'a, TsIntersectionType<'a>> for TsType<'a> { +// fn from_with(value: TsIntersectionType<'a>, allocator: &'a +// swc_allocator::Allocator) -> Self { +// TsType::TsUnionOrIntersectionType( +// TsUnionOrIntersectionType::TsIntersectionType(Box::new_in(value, +// allocator)) .into_with(allocator), +// ) +// } +// } + +#[ast_node("TsKeywordType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsKeywordType { + pub span: Span, + pub kind: TsKeywordTypeKind, +} + +#[derive(Debug, Copy, Clone, CloneIn, PartialEq, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] +pub enum TsKeywordTypeKind { + #[cfg_attr(feature = "serde-impl", serde(rename = "any"))] + TsAnyKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "unknown"))] + TsUnknownKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "number"))] + TsNumberKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "object"))] + TsObjectKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "boolean"))] + TsBooleanKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "bigint"))] + TsBigIntKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "string"))] + TsStringKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "symbol"))] + TsSymbolKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "void"))] + TsVoidKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "undefined"))] + TsUndefinedKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "null"))] + TsNullKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "never"))] + TsNeverKeyword, + + #[cfg_attr(feature = "serde-impl", serde(rename = "intrinsic"))] + TsIntrinsicKeyword, +} + +#[ast_node("TsThisType")] +#[derive(Copy, Clone, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsThisType { + pub span: Span, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsFnParam<'a> { + // #[tag("Identifier")] + Ident(Box<'a, BindingIdent<'a>>), + + // #[tag("ArrayPattern")] + Array(Box<'a, ArrayPat<'a>>), + + // #[tag("RestElement")] + Rest(Box<'a, RestPat<'a>>), + + // #[tag("ObjectPattern")] + Object(Box<'a, ObjectPat<'a>>), +} + +#[ast_node("TsFunctionType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsFnType<'a> { + pub span: Span, + pub params: Vec<'a, TsFnParam<'a>>, + + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: Box<'a, TsTypeAnn<'a>>, +} + +#[ast_node("TsConstructorType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsConstructorType<'a> { + pub span: Span, + pub params: Vec<'a, TsFnParam<'a>>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: Box<'a, TsTypeAnn<'a>>, + pub is_abstract: bool, +} + +#[ast_node("TsTypeReference")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeRef<'a> { + pub span: Span, + pub type_name: TsEntityName<'a>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, +} + +#[ast_node("TsTypePredicate")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypePredicate<'a> { + pub span: Span, + pub asserts: bool, + pub param_name: TsThisTypeOrIdent<'a>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: Option>>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[allow(variant_size_differences)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsThisTypeOrIdent<'a> { + // #[tag("TsThisType")] + TsThisType(Box<'a, TsThisType>), + + // #[tag("Identifier")] + Ident(Box<'a, Ident>), +} + +/// `typeof` operator +#[ast_node("TsTypeQuery")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeQuery<'a> { + pub span: Span, + pub expr_name: TsTypeQueryExpr<'a>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsTypeQueryExpr<'a> { + // #[tag("TsQualifiedName")] + // #[tag("Identifier")] + TsEntityName(Box<'a, TsEntityName<'a>>), + // #[tag("TsImportType")] + Import(Box<'a, TsImportType<'a>>), +} + +#[ast_node("TsImportType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsImportType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "argument"))] + pub arg: Str, + pub qualifier: Option>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeArguments"))] + pub type_args: Option>>, +} + +#[ast_node("TsTypeLiteral")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeLit<'a> { + pub span: Span, + pub members: Vec<'a, TsTypeElement<'a>>, +} + +#[ast_node("TsArrayType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsArrayType<'a> { + pub span: Span, + pub elem_type: TsType<'a>, +} + +#[ast_node("TsTupleType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTupleType<'a> { + pub span: Span, + pub elem_types: Vec<'a, TsTupleElement<'a>>, +} + +#[ast_node("TsTupleElement")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTupleElement<'a> { + pub span: Span, + /// `Ident` or `RestPat { arg: Ident }` + pub label: Option>, + pub ty: TsType<'a>, +} + +#[ast_node("TsOptionalType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsOptionalType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsRestType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsRestType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsUnionOrIntersectionType<'a> { + // #[tag("TsUnionType")] + TsUnionType(Box<'a, TsUnionType<'a>>), + + // #[tag("TsIntersectionType")] + TsIntersectionType(Box<'a, TsIntersectionType<'a>>), +} + +#[ast_node("TsUnionType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsUnionType<'a> { + pub span: Span, + pub types: Vec<'a, TsType<'a>>, +} + +#[ast_node("TsIntersectionType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsIntersectionType<'a> { + pub span: Span, + pub types: Vec<'a, TsType<'a>>, +} + +#[ast_node("TsConditionalType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsConditionalType<'a> { + pub span: Span, + pub check_type: TsType<'a>, + pub extends_type: TsType<'a>, + pub true_type: TsType<'a>, + pub false_type: TsType<'a>, +} + +#[ast_node("TsInferType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsInferType<'a> { + pub span: Span, + pub type_param: TsTypeParam<'a>, +} + +#[ast_node("TsParenthesizedType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsParenthesizedType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsTypeOperator")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeOperator<'a> { + pub span: Span, + pub op: TsTypeOperatorOp, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[derive(StringEnum, Clone, CloneIn, Copy, PartialEq, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +pub enum TsTypeOperatorOp { + /// `keyof` + KeyOf, + /// `unique` + Unique, + /// `readonly` + ReadOnly, +} + +#[ast_node("TsIndexedAccessType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsIndexedAccessType<'a> { + pub span: Span, + pub readonly: bool, + #[cfg_attr(feature = "serde-impl", serde(rename = "objectType"))] + pub obj_type: TsType<'a>, + pub index_type: TsType<'a>, +} + +#[derive(Debug, Clone, CloneIn, Copy, PartialEq, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +pub enum TruePlusMinus { + True, + Plus, + Minus, +} + +#[cfg(feature = "serde-impl")] +impl Serialize for TruePlusMinus { + fn serialize(&self, serializer: S) -> Result + where + S: ::serde::Serializer, + { + match *self { + TruePlusMinus::True => serializer.serialize_bool(true), + TruePlusMinus::Plus => serializer.serialize_str("+"), + TruePlusMinus::Minus => serializer.serialize_str("-"), + } + } +} + +// #[cfg(feature = "serde-impl")] +// impl<'de> Deserialize<'de> for TruePlusMinus { +// fn deserialize(deserializer: D) -> Result +// where +// D: Deserializer<'de>, +// { +// struct TruePlusMinusVisitor; + +// impl Visitor<'_> for TruePlusMinusVisitor { +// type Value = TruePlusMinus; + +// fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> +// fmt::Result { formatter.write_str("one of '+', '-', true") +// } + +// fn visit_str(self, value: &str) -> Result +// where +// E: de::Error, +// { +// match value { +// "+" => Ok(TruePlusMinus::Plus), +// "-" => Ok(TruePlusMinus::Minus), +// "true" => Ok(TruePlusMinus::True), +// _ => Err(de::Error::invalid_value(Unexpected::Str(value), +// &self)), } +// } + +// fn visit_bool(self, value: bool) -> Result +// where +// E: de::Error, +// { +// if value { +// Ok(TruePlusMinus::True) +// } else { +// Err(de::Error::invalid_value(Unexpected::Bool(value), +// &self)) } +// } +// } + +// deserializer.deserialize_any(TruePlusMinusVisitor) +// } +// } + +#[ast_node("TsMappedType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsMappedType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub readonly: Option, + pub type_param: TsTypeParam<'a>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "nameType"))] + pub name_type: Option>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub optional: Option, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] + pub type_ann: Option>, +} + +#[ast_node("TsLiteralType")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsLitType<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "literal"))] + pub lit: TsLit<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsLit<'a> { + // #[tag("NumericLiteral")] + Number(Box<'a, Number>), + + // #[tag("StringLiteral")] + Str(Box<'a, Str>), + + // #[tag("BooleanLiteral")] + Bool(Box<'a, Bool>), + + // #[tag("BigIntLiteral")] + BigInt(Box<'a, BigInt<'a>>), + + // #[tag("TemplateLiteral")] + Tpl(Box<'a, TsTplLitType<'a>>), +} + +#[ast_node("TemplateLiteral")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTplLitType<'a> { + pub span: Span, + + pub types: Vec<'a, TsType<'a>>, + + pub quasis: Vec<'a, TplElement>, +} + +// // ================ +// // TypeScript declarations +// // ================ + +#[ast_node("TsInterfaceDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsInterfaceDecl<'a> { + pub span: Span, + pub id: Ident, + pub declare: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, + pub extends: Vec<'a, TsExprWithTypeArgs<'a>>, + pub body: TsInterfaceBody<'a>, +} + +#[ast_node("TsInterfaceBody")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsInterfaceBody<'a> { + pub span: Span, + pub body: Vec<'a, TsTypeElement<'a>>, +} + +#[ast_node("TsExpressionWithTypeArguments")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsExprWithTypeArgs<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, + #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeArguments"))] + pub type_args: Option>>, +} + +#[ast_node("TsTypeAliasDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeAliasDecl<'a> { + pub span: Span, + pub declare: bool, + pub id: Ident, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub type_params: Option>>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsEnumDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsEnumDecl<'a> { + pub span: Span, + pub declare: bool, + pub is_const: bool, + pub id: Ident, + pub members: Vec<'a, TsEnumMember<'a>>, +} + +#[ast_node("TsEnumMember")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsEnumMember<'a> { + pub span: Span, + pub id: TsEnumMemberId<'a>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub init: Option>, +} + +/// +/// - Invalid: [Ident] with empty symbol. +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsEnumMemberId<'a> { + // #[tag("Identifier")] + Ident(Box<'a, Ident>), + + // #[tag("StringLiteral")] + Str(Box<'a, Str>), +} + +// impl AsRef for TsEnumMemberId { +// fn as_ref(&self) -> &Atom { +// match &self { +// TsEnumMemberId::Str(Str { value: ref sym, .. }) +// | TsEnumMemberId::Ident(Ident { ref sym, .. }) => sym, +// } +// } +// } + +#[ast_node("TsModuleDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsModuleDecl<'a> { + pub span: Span, + pub declare: bool, + /// In TypeScript, this is only available through`node.flags`. + pub global: bool, + pub id: TsModuleName<'a>, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub body: Option>, +} + +/// `namespace A.B { }` is a namespace named `A` with another TsNamespaceDecl as +/// its body. +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsNamespaceBody<'a> { + // #[tag("TsModuleBlock")] + TsModuleBlock(Box<'a, TsModuleBlock<'a>>), + + // #[tag("TsNamespaceDeclaration")] + TsNamespaceDecl(Box<'a, TsNamespaceDecl<'a>>), +} + +#[ast_node("TsModuleBlock")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsModuleBlock<'a> { + pub span: Span, + pub body: Vec<'a, ModuleItem<'a>>, +} + +#[ast_node("TsNamespaceDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsNamespaceDecl<'a> { + pub span: Span, + pub declare: bool, + /// In TypeScript, this is only available through`node.flags`. + pub global: bool, + pub id: Ident, + pub body: Box<'a, TsNamespaceBody<'a>>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsModuleName<'a> { + // #[tag("Identifier")] + Ident(Box<'a, Ident>), + + // #[tag("StringLiteral")] + Str(Box<'a, Str>), +} + +#[ast_node("TsImportEqualsDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsImportEqualsDecl<'a> { + pub span: Span, + pub is_export: bool, + pub is_type_only: bool, + pub id: Ident, + pub module_ref: TsModuleRef<'a>, +} + +#[ast_node] +#[derive(Eq, Hash, Is, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub enum TsModuleRef<'a> { + // #[tag("TsQualifiedName")] + // #[tag("Identifier")] + TsEntityName(Box<'a, TsEntityName<'a>>), + + // #[tag("TsExternalModuleReference")] + TsExternalModuleRef(Box<'a, TsExternalModuleRef>), +} + +#[ast_node("TsExternalModuleReference")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsExternalModuleRef { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Str, +} + +/// TypeScript's own parser uses ExportAssignment for both `export default` and +/// `export =`. But for @babel/parser, `export default` is an ExportDefaultDecl, +/// so a TsExportAssignment is always `export =`. +#[ast_node("TsExportAssignment")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsExportAssignment<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node("TsNamespaceExportDeclaration")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsNamespaceExportDecl { + pub span: Span, + pub id: Ident, +} + +// // ================ +// // TypeScript exprs +// // ================ + +#[ast_node("TsAsExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsAsExpr<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsTypeAssertion")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsTypeAssertion<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[ast_node("TsNonNullExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsNonNullExpr<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node("TsSatisfiesExpression")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsSatisfiesExpr<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeAnnotation"))] + pub type_ann: TsType<'a>, +} + +#[derive(Debug, Clone, CloneIn, Copy, PartialEq, Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(feature = "rkyv-impl"), + derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) +)] +#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))] +#[cfg_attr(feature = "rkyv-impl", repr(u32))] +#[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] +pub enum Accessibility { + #[cfg_attr(feature = "serde-impl", serde(rename = "public"))] + Public, + #[cfg_attr(feature = "serde-impl", serde(rename = "protected"))] + Protected, + #[cfg_attr(feature = "serde-impl", serde(rename = "private"))] + Private, +} + +#[ast_node("TsConstAssertion")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsConstAssertion<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, +} + +#[ast_node("TsInstantiation")] +#[derive(Eq, Hash, EqIgnoreSpan)] +#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] +pub struct TsInstantiation<'a> { + pub span: Span, + #[cfg_attr(feature = "serde-impl", serde(rename = "expression"))] + pub expr: Expr<'a>, + #[cfg_attr(feature = "serde-impl", serde(rename = "typeArguments"))] + pub type_args: Box<'a, TsTypeParamInstantiation<'a>>, +} diff --git a/crates/swc_ecma_ast/src/lib.rs b/crates/swc_ecma_ast/src/lib.rs index d6aa2501b73f..c53f61e0ef62 100644 --- a/crates/swc_ecma_ast/src/lib.rs +++ b/crates/swc_ecma_ast/src/lib.rs @@ -73,6 +73,7 @@ pub use self::{ #[macro_use] mod macros; +pub mod arena; mod class; mod decl; mod expr; diff --git a/crates/swc_ecma_ast/src/operators.rs b/crates/swc_ecma_ast/src/operators.rs index 16623ea00cae..8ce5080dec7b 100644 --- a/crates/swc_ecma_ast/src/operators.rs +++ b/crates/swc_ecma_ast/src/operators.rs @@ -1,7 +1,9 @@ use string_enum::StringEnum; -use swc_common::EqIgnoreSpan; +use swc_common::{arena::CloneIn, EqIgnoreSpan}; -#[derive(StringEnum, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default)] +#[derive( + StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default, +)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr( any(feature = "rkyv-impl"), @@ -113,7 +115,9 @@ impl BinaryOp { } } -#[derive(StringEnum, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default)] +#[derive( + StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default, +)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr( any(feature = "rkyv-impl"), @@ -189,7 +193,9 @@ impl AssignOp { } } -#[derive(StringEnum, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default)] +#[derive( + StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default, +)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr( any(feature = "rkyv-impl"), @@ -205,7 +211,9 @@ pub enum UpdateOp { MinusMinus, } -#[derive(StringEnum, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default)] +#[derive( + StringEnum, Clone, CloneIn, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan, Default, +)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr( any(feature = "rkyv-impl"), diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 4e59d2d16f2a..3ee2c99a620c 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -36,6 +36,7 @@ typed-arena = { workspace = true } new_debug_unreachable = { workspace = true } phf = { workspace = true, features = ["macros"] } +swc_allocator = { version = "2.0.0", path = "../swc_allocator" } swc_atoms = { version = "3.0.0", path = "../swc_atoms" } swc_common = { version = "5.0.0", path = "../swc_common" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } @@ -75,3 +76,7 @@ name = "lexer" [[bench]] harness = false name = "parser" + +[[bench]] +harness = false +name = "arena_compare" diff --git a/crates/swc_ecma_parser/benches/arena_compare.rs b/crates/swc_ecma_parser/benches/arena_compare.rs new file mode 100644 index 000000000000..a159f7ebc8cc --- /dev/null +++ b/crates/swc_ecma_parser/benches/arena_compare.rs @@ -0,0 +1,84 @@ +extern crate swc_malloc; + +use criterion::{criterion_group, criterion_main, Criterion}; +use swc_allocator::arena::Allocator; +use swc_common::{FileName, Span, DUMMY_SP}; +use swc_ecma_parser::{StringInput, Syntax, TsSyntax}; + +static SOURCE: &str = include_str!("files/cal.com.tsx"); + +fn bench_cases(b: &mut Criterion) { + let syntax = Syntax::Typescript(TsSyntax { + tsx: true, + ..Default::default() + }); + let _ = ::testing::run_test(false, |cm, _| { + let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into()); + b.bench_function("es/parser/origin", |b| { + b.iter(|| { + let mut parser = + swc_ecma_parser::Parser::new(syntax, StringInput::from(&*fm), None); + parser.parse_module().map_err(|_| ()).unwrap(); + }); + }); + + b.bench_function("es/parser/arena", |b| { + let mut allocator = Allocator::default(); + b.iter(|| { + let mut parser = swc_ecma_parser::arena::Parser::new( + &allocator, + syntax, + StringInput::from(&*fm), + None, + ); + parser.parse_module().map_err(|_| ()).unwrap(); + allocator.reset(); + }); + }); + + b.bench_function("es/visit/origin", |b| { + struct RespanVisitMut; + impl swc_ecma_visit::VisitMut for RespanVisitMut { + fn visit_mut_span(&mut self, span: &mut Span) { + *span = DUMMY_SP; + } + } + + let mut parser = swc_ecma_parser::Parser::new(syntax, StringInput::from(&*fm), None); + let mut module = parser.parse_module().map_err(|_| ()).unwrap(); + + b.iter(|| { + swc_ecma_visit::VisitMutWith::visit_mut_with(&mut module, &mut RespanVisitMut); + }); + }); + + b.bench_function("es/visit/arena", |b| { + struct RespanVisitMut; + impl swc_ecma_visit::arena::VisitMut<'_> for RespanVisitMut { + fn visit_mut_span(&mut self, span: &mut Span) { + *span = DUMMY_SP; + } + } + + let allocator = Allocator::default(); + let mut parser = swc_ecma_parser::arena::Parser::new( + &allocator, + syntax, + StringInput::from(&*fm), + None, + ); + let mut module = parser.parse_module().map_err(|_| ()).unwrap(); + + b.iter(|| { + swc_ecma_visit::arena::VisitMutWith::visit_mut_with( + &mut module, + &mut RespanVisitMut, + ); + }); + }); + Ok(()) + }); +} + +criterion_group!(benches, bench_cases); +criterion_main!(benches); diff --git a/crates/swc_ecma_parser/src/arena/mod.rs b/crates/swc_ecma_parser/src/arena/mod.rs new file mode 100644 index 000000000000..5156321eda97 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/mod.rs @@ -0,0 +1,60 @@ +use swc_allocator::arena::Allocator; +use swc_common::{comments::Comments, input::SourceFileInput, SourceFile}; +use swc_ecma_ast::{arena::*, EsVersion}; + +use crate::{error::Error, lexer::Lexer, PResult, Syntax}; + +pub mod parser; +pub use parser::Parser; + +pub fn with_file_parser<'a, T>( + allocator: &'a Allocator, + fm: &SourceFile, + syntax: Syntax, + target: EsVersion, + comments: Option<&dyn Comments>, + recovered_errors: &mut Vec, + op: impl FnOnce(&mut Parser<'a, Lexer>) -> PResult, +) -> PResult { + let lexer = Lexer::new(syntax, target, SourceFileInput::from(fm), comments); + let mut p = Parser::new_from(allocator, lexer); + let ret = op(&mut p); + + recovered_errors.append(&mut p.take_errors()); + + ret +} + +macro_rules! expose { + ( + $name:ident, + $T:ty, + $($t:tt)* + ) => { + /// Note: This is recommended way to parse a file. + /// + /// This is an alias for [Parser], [Lexer] and [SourceFileInput], but + /// instantiation of generics occur in `swc_ecma_parser` crate. + pub fn $name<'a>( + allocator: &'a Allocator, + fm: &SourceFile, + syntax: Syntax, + target: EsVersion, + comments: Option<&dyn Comments>, + recovered_errors: &mut Vec, + ) -> PResult<$T> { + with_file_parser(allocator, fm, syntax, target, comments, recovered_errors, $($t)*) + } + }; +} + +expose!(parse_file_as_expr, Expr<'a>, |p| { + // This allow to parse `import.meta` + p.input().ctx.can_be_module = true; + p.parse_expr() +}); +expose!(parse_file_as_module, Module<'a>, |p| { p.parse_module() }); +expose!(parse_file_as_script, Script<'a>, |p| { p.parse_script() }); +expose!(parse_file_as_program, Program<'a>, |p| { + p.parse_program() +}); diff --git a/crates/swc_ecma_parser/src/arena/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/arena/parser/class_and_fn.rs new file mode 100644 index 000000000000..9f8585b486c5 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/class_and_fn.rs @@ -0,0 +1,1828 @@ +use swc_allocator::arena::{Allocator, Box, Vec}; +use swc_common::{BytePos, Span, Spanned}; +use swc_ecma_ast::{arena::*, EsVersion}; + +use super::{Parser, State}; +use crate::{error::SyntaxError, lexer::TokenContext, token::Token, Context, PResult, Tokens}; + +/// Parser for function expression and function declaration. +impl<'a, I: Tokens> Parser<'a, I> { + pub(crate) fn parse_async_fn_expr(&mut self) -> PResult> { + let start = cur_pos!(self); + expect!(self, "async"); + self.parse_fn(None, Some(start), Vec::new_in(self.alloc)) + } + + /// Parse function expression + pub(crate) fn parse_fn_expr(&mut self) -> PResult> { + self.parse_fn(None, None, Vec::new_in(self.alloc)) + } + + pub(crate) fn parse_async_fn_decl( + &mut self, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + let start = cur_pos!(self); + expect!(self, "async"); + self.parse_fn(None, Some(start), decorators) + } + + pub(crate) fn parse_fn_decl( + &mut self, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + self.parse_fn(None, None, decorators) + } + + pub(crate) fn parse_default_async_fn( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + let start_of_async = cur_pos!(self); + expect!(self, "async"); + self.parse_fn(Some(start), Some(start_of_async), decorators) + } + + pub(crate) fn parse_default_fn( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + self.parse_fn(Some(start), None, decorators) + } + + pub(crate) fn parse_class_decl( + &mut self, + start: BytePos, + class_start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + is_abstract: bool, + ) -> PResult> { + self.parse_class(start, class_start, decorators, is_abstract) + } + + pub(crate) fn parse_class_expr( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + self.parse_class(start, start, decorators, false) + } + + pub(crate) fn parse_default_class( + &mut self, + start: BytePos, + class_start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + is_abstract: bool, + ) -> PResult> { + self.parse_class(start, class_start, decorators, is_abstract) + } + + /// Not generic + fn parse_class_inner( + &mut self, + _start: BytePos, + class_start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + is_ident_required: bool, + ) -> PResult<(Option, Box<'a, Class<'a>>)> { + self.strict_mode().parse_with(|p| { + expect!(p, "class"); + + let ident = p + .parse_maybe_opt_binding_ident(is_ident_required, true)? + .map(Ident::from); + if p.input.syntax().typescript() { + if let Some(span) = ident.invalid_class_name() { + p.emit_err(span, SyntaxError::TS2414); + } + } + + let type_params = if p.input.syntax().typescript() { + p.try_parse_ts_type_params(true, true)? + } else { + None + }; + + let (mut super_class, mut super_type_params) = if eat!(p, "extends") { + let (super_class, super_type_params) = p.parse_super_class()?; + + if p.syntax().typescript() && eat!(p, ',') { + let exprs = p.parse_ts_heritage_clause()?; + + for e in &exprs { + p.emit_err(e.span(), SyntaxError::TS1174); + } + } + + (Some(super_class), super_type_params) + } else { + (None, None) + }; + + // Handle TS1172 + if eat!(p, "extends") { + p.emit_err(p.input.prev_span(), SyntaxError::TS1172); + + p.parse_super_class()?; + }; + + let implements = if p.input.syntax().typescript() && eat!(p, "implements") { + p.parse_ts_heritage_clause()? + } else { + Vec::new_in(p.alloc) + }; + + { + // Handle TS1175 + if p.input.syntax().typescript() && eat!(p, "implements") { + p.emit_err(p.input.prev_span(), SyntaxError::TS1175); + + p.parse_ts_heritage_clause()?; + } + } + + // Handle TS1173 + if p.input.syntax().typescript() && eat!(p, "extends") { + p.emit_err(p.input.prev_span(), SyntaxError::TS1173); + + let (sc, type_params) = p.parse_super_class()?; + + if super_class.is_none() { + super_class = Some(sc); + if type_params.is_some() { + super_type_params = type_params; + } + } + } + + expect!(p, '{'); + let body = p + .with_ctx(Context { + has_super_class: super_class.is_some(), + ..p.ctx() + }) + .parse_class_body()?; + + if p.input.cur().is_none() { + let eof_text = p.input.dump_cur(); + p.emit_err( + p.input.cur_span(), + SyntaxError::Expected(&Token::RBrace, eof_text), + ); + } else { + expect!(p, '}'); + } + let end = last_pos!(p); + + Ok(( + ident, + p.ast(Class { + span: Span::new(class_start, end), + decorators, + is_abstract: false, + type_params, + super_class, + super_type_params, + body, + implements, + ctxt: Default::default(), + }), + )) + }) + } + + fn parse_class( + &mut self, + start: BytePos, + class_start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + is_abstract: bool, + ) -> PResult + where + T: OutputType<'a>, + { + let (ident, mut class) = self + .with_ctx(Context { + in_class: true, + ..self.ctx() + }) + .parse_class_inner(start, class_start, decorators, T::IS_IDENT_REQUIRED)?; + + if is_abstract { + class.is_abstract = true + } else { + for member in class.body.iter() { + match member { + ClassMember::ClassProp(class_prop) if class_prop.is_abstract => { + self.emit_err(class_prop.span, SyntaxError::TS1244) + } + ClassMember::Method(class_method) if class_method.is_abstract => { + self.emit_err(class_method.span, SyntaxError::TS1244) + } + _ => (), + } + } + } + + match T::finish_class(span!(self, start), ident, class, self.alloc) { + Ok(v) => Ok(v), + Err(kind) => syntax_error!(self, kind), + } + } + + fn parse_super_class( + &mut self, + ) -> PResult<(Expr<'a>, Option>>)> { + let super_class = self.parse_lhs_expr()?; + match super_class { + Expr::TsInstantiation(ts_instantiation) => { + let ts_instantiation = ts_instantiation.into_inner(); + Ok((ts_instantiation.expr, Some(ts_instantiation.type_args))) + } + _ => { + // We still need to parse TS type arguments, + // because in some cases "super class" returned by `parse_lhs_expr` + // may not include `TsExprWithTypeArgs` + // but it's a super class with type params, for example, in JSX. + if self.syntax().typescript() && is!(self, '<') { + Ok((super_class, self.parse_ts_type_args().map(Some)?)) + } else { + Ok((super_class, None)) + } + } + } + } + + pub(crate) fn parse_decorators( + &mut self, + allow_export: bool, + ) -> PResult>> { + if !self.syntax().decorators() { + return Ok(Vec::new_in(self.alloc)); + } + trace_cur!(self, parse_decorators); + + let mut decorators = Vec::new_in(self.alloc); + let start = cur_pos!(self); + + while is!(self, '@') { + decorators.push(self.parse_decorator()?); + } + if decorators.is_empty() { + return Ok(decorators); + } + + if is!(self, "export") { + if !self.ctx().in_class && !self.ctx().in_function && !allow_export { + syntax_error!(self, self.input.cur_span(), SyntaxError::ExportNotAllowed); + } + + if !self.ctx().in_class + && !self.ctx().in_function + && !self.syntax().decorators_before_export() + { + syntax_error!(self, span!(self, start), SyntaxError::DecoratorOnExport); + } + } else if !is!(self, "class") { + // syntax_error!(self, span!(self, start), + // SyntaxError::InvalidLeadingDecorator) + } + + Ok(decorators) + } + + fn parse_decorator(&mut self) -> PResult> { + let start = cur_pos!(self); + trace_cur!(self, parse_decorator); + + assert_and_bump!(self, '@'); + + let expr = if eat!(self, '(') { + let expr = self.parse_expr()?; + expect!(self, ')'); + expr + } else { + let expr = self + .parse_ident(false, false) + .map(|ident| Expr::Ident(self.ast(ident)))?; + + self.parse_subscripts(Callee::Expr(expr), false, true)? + }; + + let expr = self.parse_maybe_decorator_args(expr)?; + + Ok(Decorator { + span: span!(self, start), + expr, + }) + } + + fn parse_maybe_decorator_args(&mut self, expr: Expr<'a>) -> PResult> { + let type_args = if self.input.syntax().typescript() && is!(self, '<') { + Some(self.parse_ts_type_args()?) + } else { + None + }; + + if type_args.is_none() && !is!(self, '(') { + return Ok(expr); + } + + let args = self.parse_args(false)?; + Ok(Expr::Call(self.ast(CallExpr { + span: span!(self, expr.span_lo()), + callee: Callee::Expr(expr), + args, + type_args: None, + ctxt: Default::default(), + }))) + } + + fn parse_class_body(&mut self) -> PResult>> { + let mut elems = Vec::new_in(self.alloc); + let mut has_constructor_with_body = false; + while !eof!(self) && !is!(self, '}') { + if eat_exact!(self, ';') { + let span = self.input.prev_span(); + elems.push(ClassMember::Empty(self.ast(EmptyStmt { + span: Span::new(span.lo, span.hi), + }))); + continue; + } + let mut p = self.with_ctx(Context { + allow_direct_super: true, + ..self.ctx() + }); + let elem = p.parse_class_member()?; + + if !p.ctx().in_declare { + if let ClassMember::Constructor(constructor) = &elem { + if constructor.body.is_some() { + if has_constructor_with_body { + p.emit_err(constructor.span, SyntaxError::DuplicateConstructor); + } + has_constructor_with_body = true; + } + } + } + elems.push(elem); + } + Ok(elems) + } + + pub(crate) fn parse_access_modifier(&mut self) -> PResult> { + Ok(self + .parse_ts_modifier(&["public", "protected", "private", "in", "out"], false)? + .and_then(|s| match s { + "public" => Some(Accessibility::Public), + "protected" => Some(Accessibility::Protected), + "private" => Some(Accessibility::Private), + other => { + self.emit_err(self.input.prev_span(), SyntaxError::TS1274(other.into())); + None + } + })) + } + + fn parse_class_member(&mut self) -> PResult> { + trace_cur!(self, parse_class_member); + + let start = cur_pos!(self); + let decorators = self.parse_decorators(false)?; + let declare = self.syntax().typescript() && eat!(self, "declare"); + let accessibility = if self.input.syntax().typescript() { + self.parse_access_modifier()? + } else { + None + }; + // Allow `private declare`. + let declare = declare || self.syntax().typescript() && eat!(self, "declare"); + + let declare_token = if declare { + // Handle declare(){} + if self.is_class_method() { + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("declare".into(), span!(self, start))), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + return self.make_method( + |p| p.parse_unique_formal_params(), + MakeMethodArgs { + start, + accessibility, + decorators, + is_abstract: false, + is_optional, + is_override: false, + is_async: false, + is_generator: false, + static_token: None, + key, + kind: MethodKind::Method, + }, + ); + } else if self.is_class_property(/* asi */ true) + || (self.syntax().typescript() && is!(self, '?')) + { + // Property named `declare` + + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("declare".into(), span!(self, start))), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + return self.make_property( + start, + decorators, + accessibility, + key, + false, + None, + is_optional, + false, + false, + false, + false, + ); + } else { + Some(span!(self, start)) + } + } else { + None + }; + + let static_token = { + let start = cur_pos!(self); + if eat!(self, "static") { + Some(span!(self, start)) + } else { + None + } + }; + + let accessor_token = if self.syntax().auto_accessors() { + let start = cur_pos!(self); + if eat!(self, "accessor") { + Some(span!(self, start)) + } else { + None + } + } else { + None + }; + + if let Some(accessor_token) = accessor_token { + // Handle accessor(){} + if self.is_class_method() { + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("accessor".into(), accessor_token)), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + return self.make_method( + |p| p.parse_unique_formal_params(), + MakeMethodArgs { + start, + accessibility, + decorators, + is_abstract: false, + is_optional, + is_override: false, + is_async: false, + is_generator: false, + static_token, + key, + kind: MethodKind::Method, + }, + ); + } else if self.is_class_property(/* asi */ true) + || (self.syntax().typescript() && is!(self, '?')) + { + // Property named `accessor` + + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("accessor".into(), accessor_token)), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + let is_static = static_token.is_some(); + return self.make_property( + start, + decorators, + accessibility, + key, + is_static, + None, + is_optional, + false, + declare, + false, + false, + ); + } + } + + if let Some(static_token) = static_token { + // Handle static(){} + if self.is_class_method() { + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("static".into(), static_token)), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + return self.make_method( + |p| p.parse_unique_formal_params(), + MakeMethodArgs { + start, + accessibility, + decorators, + is_abstract: false, + is_optional, + is_override: false, + is_async: false, + is_generator: false, + static_token: None, + key, + kind: MethodKind::Method, + }, + ); + } else if self.is_class_property(/* asi */ false) + || (self.syntax().typescript() && is!(self, '?')) + { + // Property named `static` + + // Avoid to parse + // static + // {} + let is_parsing_static_blocks = is!(self, '{'); + if !is_parsing_static_blocks { + let key = Key::Public(PropName::Ident( + self.ast(IdentName::new("static".into(), static_token)), + )); + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + return self.make_property( + start, + decorators, + accessibility, + key, + false, + accessor_token, + is_optional, + false, + declare, + false, + false, + ); + } + } else { + // TODO: error if static contains escape + } + } + + self.parse_class_member_with_is_static( + start, + declare_token, + accessibility, + static_token, + accessor_token, + decorators, + ) + } + + fn parse_static_block(&mut self, start: BytePos) -> PResult> { + let body = self + .with_ctx(Context { + in_static_block: true, + in_class_field: true, + allow_using_decl: true, + ..self.ctx() + }) + .parse_block(false)?; + + let span = span!(self, start); + Ok(ClassMember::StaticBlock( + self.ast(StaticBlock { span, body }), + )) + } + + fn parse_class_member_with_is_static( + &mut self, + start: BytePos, + declare_token: Option, + accessibility: Option, + static_token: Option, + accessor_token: Option, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + let mut is_static = static_token.is_some(); + + let mut is_abstract = false; + let mut is_override = false; + let mut readonly = None; + let mut modifier_span = None; + let declare = declare_token.is_some(); + while let Some(modifier) = + self.parse_ts_modifier(&["abstract", "readonly", "override", "static"], true)? + { + modifier_span = Some(self.input.prev_span()); + match modifier { + "abstract" => { + if is_abstract { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1030("abstract".into()), + ); + } else if is_override { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1029("abstract".into(), "override".into()), + ); + } + is_abstract = true; + } + "override" => { + if is_override { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1030("override".into()), + ); + } else if readonly.is_some() { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1029("override".into(), "readonly".into()), + ); + } else if declare { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1243("override".into(), "declare".into()), + ); + } else if !self.ctx().has_super_class { + self.emit_err(self.input.prev_span(), SyntaxError::TS4112); + } + is_override = true; + } + "readonly" => { + let readonly_span = self.input.prev_span(); + if readonly.is_some() { + self.emit_err(readonly_span, SyntaxError::TS1030("readonly".into())); + } else { + readonly = Some(readonly_span); + } + } + "static" => { + if is_override { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1029("static".into(), "override".into()), + ); + } + + is_static = true; + } + _ => {} + } + } + + let accessor_token = accessor_token.or_else(|| { + if self.syntax().auto_accessors() && readonly.is_none() { + let start = cur_pos!(self); + if eat!(self, "accessor") { + Some(span!(self, start)) + } else { + None + } + } else { + None + } + }); + + if is_static && is!(self, '{') { + if let Some(span) = declare_token { + self.emit_err(span, SyntaxError::TS1184); + } + if accessibility.is_some() { + self.emit_err(self.input.cur_span(), SyntaxError::TS1184); + } + return self.parse_static_block(start); + } + if is!(self, "static") && peeked_is!(self, '{') { + // For "readonly", "abstract" and "override" + if let Some(span) = modifier_span { + self.emit_err(span, SyntaxError::TS1184); + } + if let Some(span) = static_token { + self.emit_err(span, SyntaxError::TS1184); + } + bump!(self); // consume "static" + return self.parse_static_block(start); + } + + if self.input.syntax().typescript() + && !is_abstract + && !is_override + && accessibility.is_none() + { + let idx = self.try_parse_ts_index_signature(start, readonly.is_some(), is_static)?; + if let Some(idx) = idx { + return Ok(ClassMember::TsIndexSignature(self.ast(idx))); + } + } + + if eat!(self, '*') { + // generator method + let key = self.parse_class_prop_name()?; + if readonly.is_some() { + self.emit_err(span!(self, start), SyntaxError::ReadOnlyMethod); + } + if is_constructor(&key) { + self.emit_err(span!(self, start), SyntaxError::GeneratorConstructor); + } + + return self.make_method( + |p| p.parse_unique_formal_params(), + MakeMethodArgs { + start, + decorators, + is_async: false, + is_generator: true, + accessibility, + is_abstract, + is_override, + is_optional: false, + static_token, + key, + kind: MethodKind::Method, + }, + ); + } + + trace_cur!(self, parse_class_member_with_is_static__normal_class_member); + let key = if readonly.is_some() && is_one_of!(self, '!', ':') { + Key::Public(PropName::Ident( + self.ast(IdentName::new("readonly".into(), readonly.unwrap())), + )) + } else { + self.parse_class_prop_name()? + }; + let is_optional = self.input.syntax().typescript() && eat!(self, '?'); + + if self.is_class_method() { + // handle a(){} / get(){} / set(){} / async(){} + + trace_cur!(self, parse_class_member_with_is_static__normal_class_method); + + if let Some(token) = declare_token { + self.emit_err(token, SyntaxError::TS1031) + } + + if readonly.is_some() { + syntax_error!(self, span!(self, start), SyntaxError::ReadOnlyMethod); + } + let is_constructor = is_constructor(&key); + + if is_constructor { + if self.syntax().typescript() && is_override { + self.emit_err(span!(self, start), SyntaxError::TS1089("override".into())); + } + + if self.syntax().typescript() && is!(self, '<') { + let start = cur_pos!(self); + if peeked_is!(self, '>') { + assert_and_bump!(self, '<'); + let start2 = cur_pos!(self); + assert_and_bump!(self, '>'); + + self.emit_err(span!(self, start), SyntaxError::TS1098); + self.emit_err(span!(self, start2), SyntaxError::TS1092); + } else { + let type_params = self.try_parse_ts_type_params(false, true)?; + + if let Some(type_params) = type_params { + for param in &type_params.params { + self.emit_err(param.span(), SyntaxError::TS1092); + } + } + } + } + + expect!(self, '('); + let params = self.parse_constructor_params()?; + expect!(self, ')'); + + if self.syntax().typescript() && is!(self, ':') { + let start = cur_pos!(self); + let type_ann = self.parse_ts_type_ann(true, start)?; + + self.emit_err(type_ann.type_ann.span(), SyntaxError::TS1093); + } + + let body: Option<_> = + self.parse_fn_body(false, false, false, params.is_simple_parameter_list())?; + + if body.is_none() { + for param in params.iter() { + if param.is_ts_param_prop() { + self.emit_err(param.span(), SyntaxError::TS2369) + } + } + } + + if self.syntax().typescript() && body.is_none() { + // Declare constructors cannot have assignment pattern in parameters + for p in ¶ms { + // TODO: Search deeply for assignment pattern using a Visitor + + let span = match p { + ParamOrTsParamProp::Param(param) => match ¶m.pat { + Pat::Assign(p) => Some(p.span()), + _ => None, + }, + ParamOrTsParamProp::TsParamProp(ts_param_prop) => { + match &ts_param_prop.param { + TsParamPropParam::Assign(assign_pat) => Some(assign_pat.span), + _ => None, + } + } + }; + + if let Some(span) = span { + self.emit_err(span, SyntaxError::TS2371) + } + } + } + + if let Some(static_token) = static_token { + self.emit_err(static_token, SyntaxError::TS1089("static".into())) + } + + if let Some(span) = modifier_span { + if is_abstract { + self.emit_err(span, SyntaxError::TS1242); + } + } + + return Ok(ClassMember::Constructor(self.ast(Constructor { + span: span!(self, start), + accessibility, + key: match key { + Key::Public(key) => key, + _ => unreachable!("is_constructor() returns false for PrivateName"), + }, + is_optional, + params, + body, + ctxt: Default::default(), + }))); + } else { + return self.make_method( + |p| p.parse_formal_params(), + MakeMethodArgs { + start, + is_optional, + accessibility, + decorators, + is_abstract, + is_override, + static_token, + kind: MethodKind::Method, + key, + is_async: false, + is_generator: false, + }, + ); + } + } + + let is_next_line_generator = self.input.had_line_break_before_cur() && is!(self, '*'); + let getter_or_setter_ident = match key { + // `get\n*` is an uninitialized property named 'get' followed by a generator. + Key::Public(PropName::Ident(ref i)) + if (i.sym == "get" || i.sym == "set") + && !self.is_class_property(/* asi */ false) + && !is_next_line_generator => + { + Some(i) + } + _ => None, + }; + + if getter_or_setter_ident.is_none() && self.is_class_property(/* asi */ true) { + return self.make_property( + start, + decorators, + accessibility, + key, + is_static, + accessor_token, + is_optional, + readonly.is_some(), + declare, + is_abstract, + is_override, + ); + } + + if match key { + Key::Public(PropName::Ident(ref i)) => i.sym == "async", + _ => false, + } && !self.input.had_line_break_before_cur() + { + // handle async foo(){} + + if self.parse_ts_modifier(&["override"], false)?.is_some() { + is_override = true; + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1029("override".into(), "async".into()), + ); + } + + let is_generator = eat!(self, '*'); + let key = self.parse_class_prop_name()?; + if is_constructor(&key) { + syntax_error!(self, key.span(), SyntaxError::AsyncConstructor) + } + if readonly.is_some() { + syntax_error!(self, span!(self, start), SyntaxError::ReadOnlyMethod); + } + + // handle async foo(){} + let is_optional = is_optional || self.input.syntax().typescript() && eat!(self, '?'); + return self.make_method( + |p| p.parse_unique_formal_params(), + MakeMethodArgs { + start, + static_token, + key, + is_abstract, + accessibility, + is_optional, + is_override, + decorators, + kind: MethodKind::Method, + is_async: true, + is_generator, + }, + ); + } + + if let Some(i) = getter_or_setter_ident { + let key_span = key.span(); + + // handle get foo(){} / set foo(v){} + let key = self.parse_class_prop_name()?; + + if readonly.is_some() { + self.emit_err(key_span, SyntaxError::GetterSetterCannotBeReadonly); + } + + if is_constructor(&key) { + self.emit_err(key_span, SyntaxError::ConstructorAccessor); + } + + return match &*i.sym { + "get" => self.make_method( + |p| { + let params = p.parse_formal_params()?; + + if params.iter().filter(|p| is_not_this(p)).count() != 0 { + p.emit_err(key_span, SyntaxError::GetterParam); + } + + Ok(params) + }, + MakeMethodArgs { + decorators, + start, + is_abstract, + is_async: false, + is_generator: false, + is_optional, + is_override, + accessibility, + static_token, + key, + kind: MethodKind::Getter, + }, + ), + "set" => self.make_method( + |p| { + let params = p.parse_formal_params()?; + + if params.iter().filter(|p| is_not_this(p)).count() != 1 { + p.emit_err(key_span, SyntaxError::SetterParam); + } + + if !params.is_empty() { + if let Pat::Rest(..) = params[0].pat { + p.emit_err(params[0].pat.span(), SyntaxError::RestPatInSetter); + } + } + + Ok(params) + }, + MakeMethodArgs { + decorators, + start, + is_optional, + is_abstract, + is_override, + is_async: false, + is_generator: false, + accessibility, + static_token, + key, + kind: MethodKind::Setter, + }, + ), + _ => unreachable!(), + }; + } + + unexpected!(self, "* for generator, private key, identifier or async") + } + + fn make_property( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + accessibility: Option, + key: Key<'a>, + is_static: bool, + accessor_token: Option, + is_optional: bool, + readonly: bool, + declare: bool, + is_abstract: bool, + is_override: bool, + ) -> PResult> { + if is_constructor(&key) { + syntax_error!(self, key.span(), SyntaxError::PropertyNamedConstructor); + } + if key.is_private() { + if declare { + self.emit_err( + key.span(), + SyntaxError::PrivateNameModifier("declare".into()), + ) + } + if is_abstract { + self.emit_err( + key.span(), + SyntaxError::PrivateNameModifier("abstract".into()), + ) + } + } + let definite = self.input.syntax().typescript() && !is_optional && eat!(self, '!'); + + let type_ann = self.try_parse_ts_type_ann()?; + + let ctx = Context { + include_in_expr: true, + in_class_field: true, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + let value = if is!(p, '=') { + assert_and_bump!(p, '='); + Some(p.parse_assignment_expr()?) + } else { + None + }; + + if !eat!(p, ';') { + p.emit_err(p.input.cur_span(), SyntaxError::TS1005); + } + + if accessor_token.is_some() { + return Ok(ClassMember::AutoAccessor(p.ast(AutoAccessor { + span: span!(p, start), + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + }))); + } + + Ok(match key { + Key::Private(key) => { + let span = span!(p, start); + if accessibility.is_some() { + p.emit_err(span.with_hi(key.span_hi()), SyntaxError::TS18010); + } + + ClassMember::PrivateProp(p.ast(PrivateProp { + span: span!(p, start), + key, + value, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + type_ann, + definite, + ctxt: Default::default(), + })) + } + Key::Public(key) => { + let span = span!(p, start); + if is_abstract && value.is_some() { + p.emit_err(span, SyntaxError::TS1267) + } + ClassMember::ClassProp(p.ast(ClassProp { + span, + key, + value, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + type_ann, + })) + } + }) + }) + } + + fn is_class_method(&mut self) -> bool { + is!(self, '(') + || (self.input.syntax().typescript() && is!(self, '<')) + || (self.input.syntax().typescript() && is!(self, JSXTagStart)) + } + + fn is_class_property(&mut self, asi: bool) -> bool { + (self.input.syntax().typescript() && is_one_of!(self, '!', ':')) + || is_one_of!(self, '=', '}') + || if asi { + is!(self, ';') + } else { + is_exact!(self, ';') + } + } + + fn parse_fn_inner( + &mut self, + _start_of_output_type: Option, + start_of_async: Option, + decorators: Vec<'a, Decorator<'a>>, + is_fn_expr: bool, + is_ident_required: bool, + ) -> PResult<(Option, Box<'a, Function<'a>>)> { + let start = start_of_async.unwrap_or_else(|| cur_pos!(self)); + assert_and_bump!(self, "function"); + let is_async = start_of_async.is_some(); + + let is_generator = eat!(self, '*'); + + let ident = if is_fn_expr { + // + self.with_ctx(Context { + in_async: is_async, + in_generator: is_generator, + allow_direct_super: false, + in_class_field: false, + ..self.ctx() + }) + .parse_maybe_opt_binding_ident(is_ident_required, false)? + } else { + // function declaration does not change context for `BindingIdentifier`. + self.with_ctx(Context { + allow_direct_super: false, + in_class_field: false, + ..self.ctx() + }) + .parse_maybe_opt_binding_ident(is_ident_required, false)? + } + .map(Ident::from); + + self.with_ctx(Context { + allow_direct_super: false, + in_class_field: false, + will_expect_colon_for_cond: false, + ..self.ctx() + }) + .parse_with(|p| { + let f = p.parse_fn_args_body( + decorators, + start, + |p| p.parse_formal_params(), + is_async, + is_generator, + )?; + + if is_fn_expr && f.body.is_none() { + unexpected!(p, "{"); + } + + Ok((ident, f)) + }) + } + + fn parse_fn( + &mut self, + start_of_output_type: Option, + start_of_async: Option, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult + where + T: OutputType<'a>, + { + let start = start_of_async.unwrap_or_else(|| cur_pos!(self)); + let (ident, f) = self.parse_fn_inner( + start_of_output_type, + start_of_async, + decorators, + T::is_fn_expr(), + T::IS_IDENT_REQUIRED, + )?; + + match T::finish_fn( + span!(self, start_of_output_type.unwrap_or(start)), + ident, + f, + self.alloc, + ) { + Ok(v) => Ok(v), + Err(kind) => syntax_error!(self, kind), + } + } + + /// If `required` is `true`, this never returns `None`. + fn parse_maybe_opt_binding_ident( + &mut self, + required: bool, + disallow_let: bool, + ) -> PResult> { + if required { + self.parse_binding_ident(disallow_let) + .map(|v| v.id) + .map(Some) + } else { + self.parse_opt_binding_ident(disallow_let) + .map(|v| v.map(|v| v.id)) + } + } + + /// `parse_args` closure should not eat '(' or ')'. + pub(crate) fn parse_fn_args_body( + &mut self, + decorators: Vec<'a, Decorator<'a>>, + start: BytePos, + parse_args: F, + is_async: bool, + is_generator: bool, + ) -> PResult>> + where + F: FnOnce(&mut Self) -> PResult>>, + { + trace_cur!(self, parse_fn_args_body); + // let prev_in_generator = self.ctx().in_generator; + let ctx = Context { + in_async: is_async, + in_generator: is_generator, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_with(|p| { + let type_params = if p.syntax().typescript() { + p.in_type().parse_with(|p| { + trace_cur!(p, parse_fn_args_body__type_params); + + Ok(if is!(p, '<') { + Some(p.parse_ts_type_params(false, true)?) + } else if is!(p, JSXTagStart) { + debug_assert_eq!( + p.input.token_context().current(), + Some(TokenContext::JSXOpeningTag) + ); + p.input.token_context_mut().pop(); + debug_assert_eq!( + p.input.token_context().current(), + Some(TokenContext::JSXExpr) + ); + p.input.token_context_mut().pop(); + + Some(p.parse_ts_type_params(false, true)?) + } else { + None + }) + })? + } else { + None + }; + + expect!(p, '('); + + let arg_ctx = Context { + in_parameters: true, + in_function: false, + in_async: is_async, + in_generator: is_generator, + ..p.ctx() + }; + let params = p.with_ctx(arg_ctx).parse_with(|p| parse_args(p))?; + + expect!(p, ')'); + + // typescript extension + let return_type = if p.syntax().typescript() && is!(p, ':') { + p.parse_ts_type_or_type_predicate_ann(&tok!(':')) + .map(Some)? + } else { + None + }; + + let body: Option<_> = p.parse_fn_body( + is_async, + is_generator, + false, + params.is_simple_parameter_list(), + )?; + + if p.syntax().typescript() && body.is_none() { + // Declare functions cannot have assignment pattern in parameters + for param in ¶ms { + // TODO: Search deeply for assignment pattern using a Visitor + + let span = match ¶m.pat { + Pat::Assign(ref p) => Some(p.span()), + _ => None, + }; + + if let Some(span) = span { + p.emit_err(span, SyntaxError::TS2371) + } + } + } + + Ok(p.ast(Function { + span: span!(p, start), + decorators, + type_params, + params, + body, + is_async, + is_generator, + return_type, + ctxt: Default::default(), + })) + }) + } + + fn parse_class_prop_name(&mut self) -> PResult> { + if is!(self, '#') { + let name = self.parse_private_name()?; + if name.name == "constructor" { + self.emit_err(name.span, SyntaxError::PrivateConstructor); + } + Ok(Key::Private(name)) + } else { + self.parse_prop_name().map(Key::Public) + } + } + + pub(crate) fn parse_fn_body( + &mut self, + is_async: bool, + is_generator: bool, + is_arrow_function: bool, + is_simple_parameter_list: bool, + ) -> PResult + where + Self: FnBodyParser, + { + if self.ctx().in_declare && self.syntax().typescript() && is!(self, '{') { + // self.emit_err( + // self.ctx().span_of_fn_name.expect("we are not in function"), + // SyntaxError::TS1183, + // ); + self.emit_err(self.input.cur_span(), SyntaxError::TS1183); + } + + let ctx = Context { + in_async: is_async, + in_generator: is_generator, + inside_non_arrow_function_scope: if is_arrow_function { + self.ctx().inside_non_arrow_function_scope + } else { + true + }, + in_function: true, + in_static_block: false, + is_break_allowed: false, + is_continue_allowed: false, + ..self.ctx() + }; + let state = State { + labels: std::vec::Vec::new(), + ..Default::default() + }; + self.with_ctx(ctx) + .with_state(state) + .parse_fn_body_inner(is_simple_parameter_list) + } +} + +impl<'a, I: Tokens> Parser<'a, I> { + fn make_method( + &mut self, + parse_args: F, + MakeMethodArgs { + start, + accessibility, + is_abstract, + static_token, + decorators, + is_optional, + is_override, + key, + kind, + is_async, + is_generator, + }: MakeMethodArgs<'a>, + ) -> PResult> + where + F: FnOnce(&mut Self) -> PResult>>, + { + trace_cur!(self, make_method); + + let is_static = static_token.is_some(); + let function = self + .with_ctx(Context { + allow_direct_super: true, + in_class_field: false, + ..self.ctx() + }) + .parse_with(|p| { + p.parse_fn_args_body(decorators, start, parse_args, is_async, is_generator) + })?; + + match kind { + MethodKind::Getter | MethodKind::Setter + if self.input.syntax().typescript() && self.input.target() == EsVersion::Es3 => + { + self.emit_err(key.span(), SyntaxError::TS1056); + } + _ => {} + } + + match key { + Key::Private(key) => { + let span = span!(self, start); + if accessibility.is_some() { + self.emit_err(span.with_hi(key.span_hi()), SyntaxError::TS18010); + } + + Ok(ClassMember::PrivateMethod(self.ast(PrivateMethod { + span, + + accessibility, + is_abstract, + is_optional, + is_override, + + is_static, + key, + function, + kind, + }))) + } + Key::Public(key) => { + let span = span!(self, start); + if is_abstract && function.body.is_some() { + self.emit_err(span, SyntaxError::TS1245) + } + Ok(ClassMember::Method(self.ast(ClassMethod { + span, + + accessibility, + is_abstract, + is_optional, + is_override, + + is_static, + key, + function, + kind, + }))) + } + } + } +} + +trait IsInvalidClassName { + fn invalid_class_name(&self) -> Option; +} + +impl IsInvalidClassName for Ident { + fn invalid_class_name(&self) -> Option { + match &*self.sym { + "string" | "null" | "number" | "object" | "any" | "unknown" | "boolean" | "bigint" + | "symbol" | "void" | "never" | "intrinsic" => Some(self.span), + _ => None, + } + } +} +impl IsInvalidClassName for Option { + fn invalid_class_name(&self) -> Option { + if let Some(i) = self.as_ref() { + return i.invalid_class_name(); + } + + None + } +} + +trait OutputType<'a>: Sized { + const IS_IDENT_REQUIRED: bool; + + /// From babel.. + /// + /// When parsing function expression, the binding identifier is parsed + /// according to the rules inside the function. + /// e.g. (function* yield() {}) is invalid because "yield" is disallowed in + /// generators. + /// This isn't the case with function declarations: function* yield() {} is + /// valid because yield is parsed as if it was outside the generator. + /// Therefore, this.state.inGenerator is set before or after parsing the + /// function id according to the "isStatement" parameter. + fn is_fn_expr() -> bool { + false + } + + fn finish_fn( + span: Span, + ident: Option, + f: Box<'a, Function<'a>>, + alloc: &'a Allocator, + ) -> Result; + + fn finish_class( + span: Span, + ident: Option, + class: Box<'a, Class<'a>>, + alloc: &'a Allocator, + ) -> Result; +} + +impl<'a> OutputType<'a> for Expr<'a> { + const IS_IDENT_REQUIRED: bool = false; + + fn is_fn_expr() -> bool { + true + } + + fn finish_fn( + _span: Span, + ident: Option, + function: Box<'a, Function<'a>>, + alloc: &'a Allocator, + ) -> Result { + Ok(Expr::Fn(Box::new_in(FnExpr { ident, function }, alloc))) + } + + fn finish_class( + _span: Span, + ident: Option, + class: Box<'a, Class<'a>>, + alloc: &'a Allocator, + ) -> Result { + Ok(Expr::Class(Box::new_in(ClassExpr { ident, class }, alloc))) + } +} + +impl<'a> OutputType<'a> for ExportDefaultDecl<'a> { + const IS_IDENT_REQUIRED: bool = false; + + fn finish_fn( + span: Span, + ident: Option, + function: Box<'a, Function<'a>>, + alloc: &'a Allocator, + ) -> Result { + Ok(ExportDefaultDecl { + span, + decl: DefaultDecl::Fn(Box::new_in(FnExpr { ident, function }, alloc)), + }) + } + + fn finish_class( + span: Span, + ident: Option, + class: Box<'a, Class<'a>>, + alloc: &'a Allocator, + ) -> Result { + Ok(ExportDefaultDecl { + span, + decl: DefaultDecl::Class(Box::new_in(ClassExpr { ident, class }, alloc)), + }) + } +} + +impl<'a> OutputType<'a> for Decl<'a> { + const IS_IDENT_REQUIRED: bool = true; + + fn finish_fn( + _span: Span, + ident: Option, + function: Box<'a, Function<'a>>, + alloc: &'a Allocator, + ) -> Result { + let ident = ident.ok_or(SyntaxError::ExpectedIdent)?; + + Ok(Decl::Fn(Box::new_in( + FnDecl { + declare: false, + ident, + function, + }, + alloc, + ))) + } + + fn finish_class( + _: Span, + ident: Option, + class: Box<'a, Class<'a>>, + alloc: &'a Allocator, + ) -> Result { + let ident = ident.ok_or(SyntaxError::ExpectedIdent)?; + + Ok(Decl::Class(Box::new_in( + ClassDecl { + declare: false, + ident, + class, + }, + alloc, + ))) + } +} + +pub(crate) trait FnBodyParser { + fn parse_fn_body_inner(&mut self, is_simple_parameter_list: bool) -> PResult; +} +fn has_use_strict(block: &BlockStmt) -> Option { + block + .stmts + .iter() + .take_while(|s| s.can_precede_directive()) + .find_map(|s| { + if s.is_use_strict() { + Some(s.span()) + } else { + None + } + }) +} +impl<'a, I: Tokens> FnBodyParser> for Parser<'a, I> { + fn parse_fn_body_inner( + &mut self, + is_simple_parameter_list: bool, + ) -> PResult> { + if is!(self, '{') { + self.parse_block(false).map(|block_stmt| { + if !is_simple_parameter_list { + if let Some(span) = has_use_strict(&block_stmt) { + self.emit_err(span, SyntaxError::IllegalLanguageModeDirective); + } + } + BlockStmtOrExpr::BlockStmt(self.ast(block_stmt)) + }) + } else { + self.parse_assignment_expr().map(BlockStmtOrExpr::Expr) + } + } +} + +impl<'a, I: Tokens> FnBodyParser>> for Parser<'a, I> { + fn parse_fn_body_inner( + &mut self, + is_simple_parameter_list: bool, + ) -> PResult>> { + // allow omitting body and allow placing `{` on next line + if self.input.syntax().typescript() && !is!(self, '{') && eat!(self, ';') { + return Ok(None); + } + let block = self.include_in_expr(true).parse_block(true); + block.map(|block_stmt| { + if !is_simple_parameter_list { + if let Some(span) = has_use_strict(&block_stmt) { + self.emit_err(span, SyntaxError::IllegalLanguageModeDirective); + } + } + Some(block_stmt) + }) + } +} + +pub(crate) trait IsSimpleParameterList { + fn is_simple_parameter_list(&self) -> bool; +} +impl<'a> IsSimpleParameterList for Vec<'a, Param<'a>> { + fn is_simple_parameter_list(&self) -> bool { + self.iter().all(|param| matches!(param.pat, Pat::Ident(_))) + } +} +impl<'a> IsSimpleParameterList for Vec<'a, Pat<'a>> { + fn is_simple_parameter_list(&self) -> bool { + self.iter().all(|pat| matches!(pat, Pat::Ident(_))) + } +} +impl<'a> IsSimpleParameterList for Vec<'a, ParamOrTsParamProp<'a>> { + fn is_simple_parameter_list(&self) -> bool { + self.iter().all(|param| { + param.is_ts_param_prop() || param.as_param().is_some_and(|param| param.pat.is_ident()) + }) + } +} + +fn is_constructor(key: &Key) -> bool { + key.as_public().is_some_and(|key| match key { + PropName::Ident(ident_name) => ident_name.sym == "constructor", + PropName::Str(s) => s.value == "constructor", + _ => false, + }) +} + +pub(crate) fn is_not_this(p: &Param) -> bool { + !p.pat.as_ident().is_some_and(|ident| ident.id.sym == "this") +} + +struct MakeMethodArgs<'a> { + start: BytePos, + accessibility: Option, + is_abstract: bool, + static_token: Option, + decorators: Vec<'a, Decorator<'a>>, + is_optional: bool, + is_override: bool, + key: Key<'a>, + kind: MethodKind, + is_async: bool, + is_generator: bool, +} + +#[cfg(test)] +#[allow(unused)] +mod tests { + + use swc_common::{SyntaxContext, DUMMY_SP as span}; + use swc_ecma_visit::assert_eq_ignore_span_arena; + + use super::*; + use crate::{arena::parser::test_parser, Syntax}; + + fn lhs<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_lhs_expr()) + } + + fn expr<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_expr()) + } + + #[test] + fn class_expr() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "(class extends a {})"), + Expr::Paren(Box::new_in( + ParenExpr { + span, + expr: Expr::Class(Box::new_in( + ClassExpr { + ident: None, + class: Box::new_in( + Class { + decorators: Vec::new_in(&alloc), + span, + body: Vec::new_in(&alloc), + super_class: Some(expr(&alloc, "a")), + implements: Vec::new_in(&alloc), + is_abstract: false, + ctxt: SyntaxContext::empty(), + super_type_params: None, + type_params: None + }, + &alloc + ), + }, + &alloc + )), + }, + &alloc + )) + ); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/expr.rs b/crates/swc_ecma_parser/src/arena/parser/expr.rs new file mode 100644 index 000000000000..98e707773cd7 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/expr.rs @@ -0,0 +1,2199 @@ +use either::Either; +use swc_allocator::arena::{Box, CloneIn, Vec}; +use swc_common::{ + arena::{ast_node, Take}, + collections::AHashMap, + BytePos, Span, Spanned, SyntaxContext, +}; +use swc_ecma_ast::arena::*; + +use super::Parser; +use crate::{ + arena::parser::{class_and_fn::IsSimpleParameterList, pat::PatType, util::ExprExt}, + error::{Error, SyntaxError}, + lexer::TokenContext, + token::{Token, Word}, + Context, PResult, Tokens, +}; + +mod ops; +#[cfg(test)] +mod tests; +mod verifier; + +impl<'a, I: Tokens> Parser<'a, I> { + pub fn parse_expr(&mut self) -> PResult> { + trace_cur!(self, parse_expr); + + let _tracing = debug_tracing!(self, "parse_expr"); + + let expr = self.parse_assignment_expr()?; + let start = expr.span_lo(); + + if is!(self, ',') { + let mut exprs = Vec::new_in(self.alloc); + exprs.push(expr); + while eat!(self, ',') { + exprs.push(self.parse_assignment_expr()?); + } + + return Ok(Expr::Seq(self.ast(SeqExpr { + span: span!(self, start), + exprs, + }))); + } + + Ok(expr) + } + + ///`parseMaybeAssign` (overridden) + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_assignment_expr(&mut self) -> PResult> { + trace_cur!(self, parse_assignment_expr); + + if self.input.syntax().typescript() && self.input.syntax().jsx() { + // Note: When the JSX plugin is on, type assertions (` x`) aren't valid + // syntax. + + if is!(self, JSXTagStart) { + let cur_context = self.input.token_context().current(); + debug_assert_eq!(cur_context, Some(TokenContext::JSXOpeningTag)); + // Only time j_oTag is pushed is right after j_expr. + debug_assert_eq!( + self.input.token_context().0[self.input.token_context().len() - 2], + TokenContext::JSXExpr + ); + + let res = self.try_parse_ts(|p| p.parse_assignment_expr_base().map(Some)); + if let Some(res) = res { + return Ok(res); + } else { + debug_assert_eq!( + self.input.token_context().current(), + Some(TokenContext::JSXOpeningTag) + ); + self.input.token_context_mut().pop(); + debug_assert_eq!( + self.input.token_context().current(), + Some(TokenContext::JSXExpr) + ); + self.input.token_context_mut().pop(); + } + } + } + + self.parse_assignment_expr_base() + } + + /// Parse an assignment expression. This includes applications of + /// operators like `+=`. + /// + /// `parseMaybeAssign` + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_assignment_expr_base(&mut self) -> PResult> { + trace_cur!(self, parse_assignment_expr_base); + let start = self.input.cur_span(); + + if self.input.syntax().typescript() + && (is_one_of!(self, '<', JSXTagStart)) + && (peeked_is!(self, IdentName) || peeked_is!(self, JSXName)) + { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + let res = self.with_ctx(ctx).try_parse_ts(|p| { + if is!(p, JSXTagStart) { + if let Some(TokenContext::JSXOpeningTag) = p.input.token_context().current() { + p.input.token_context_mut().pop(); + + debug_assert_eq!( + p.input.token_context().current(), + Some(TokenContext::JSXExpr) + ); + p.input.token_context_mut().pop(); + } + } + + let type_parameters = p.parse_ts_type_params(false, true)?; + let mut arrow = p.parse_assignment_expr_base()?; + match &mut arrow { + Expr::Arrow(arrow) => { + arrow.span = Span::new(type_parameters.span.lo, arrow.span.hi); + arrow.type_params = Some(type_parameters); + } + _ => unexpected!(p, "("), + } + Ok(Some(arrow)) + }); + if let Some(res) = res { + if self.input.syntax().disallow_ambiguous_jsx_like() { + self.emit_err(start, SyntaxError::ReservedArrowTypeParam); + } + return Ok(res); + } + } + + if self.ctx().in_generator && is!(self, "yield") { + return self.parse_yield_expr(); + } + + self.state.potential_arrow_start = match *cur!(self, true) { + Word(Word::Ident(..)) | tok!('(') | tok!("yield") => Some(cur_pos!(self)), + _ => None, + }; + + let start = cur_pos!(self); + + // Try to parse conditional expression. + let cond = self.parse_cond_expr()?; + + return_if_arrow!(self, cond); + + match cond { + // if cond is conditional expression but not left-hand-side expression, + // just return it. + Expr::Cond(..) | Expr::Bin(..) | Expr::Unary(..) | Expr::Update(..) => return Ok(cond), + _ => {} + } + + self.finish_assignment_expr(start, cond) + } + + fn finish_assignment_expr(&mut self, start: BytePos, cond: Expr<'a>) -> PResult> { + trace_cur!(self, finish_assignment_expr); + + match self.input.cur() { + Some(&Token::AssignOp(op)) => { + let left = if op == AssignOp::Assign { + match AssignTarget::try_from_pat( + self.reparse_expr_as_pat(PatType::AssignPat, cond)?, + self.alloc, + ) { + Ok(pat) => pat, + Err(expr) => { + syntax_error!(self, expr.span(), SyntaxError::InvalidAssignTarget) + } + } + } else { + // It is an early Reference Error if IsValidSimpleAssignmentTarget of + // LeftHandSideExpression is false. + if !cond.is_valid_simple_assignment_target(self.ctx().strict) { + if self.input.syntax().typescript() { + self.emit_err(cond.span(), SyntaxError::TS2406); + } else { + self.emit_err(cond.span(), SyntaxError::NotSimpleAssign) + } + } + if self.input.syntax().typescript() + && cond + .as_ident() + .map(|i| i.is_reserved_in_strict_bind()) + .unwrap_or(false) + { + self.emit_strict_mode_err(cond.span(), SyntaxError::TS1100); + } + + // TODO + match AssignTarget::try_from_expr(cond, self.alloc) { + Ok(v) => v, + Err(v) => { + syntax_error!(self, v.span(), SyntaxError::InvalidAssignTarget); + } + } + }; + + bump!(self); + let right = self.parse_assignment_expr()?; + Ok(Expr::Assign(self.ast(AssignExpr { + span: span!(self, start), + op, + // TODO: + left, + right, + }))) + } + _ => Ok(cond), + } + } + + /// Spec: 'ConditionalExpression' + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_cond_expr(&mut self) -> PResult> { + trace_cur!(self, parse_cond_expr); + + let start = cur_pos!(self); + + let test = self.parse_bin_expr()?; + return_if_arrow!(self, test); + + if eat!(self, '?') { + let ctx = Context { + in_cond_expr: true, + will_expect_colon_for_cond: true, + include_in_expr: true, + ..self.ctx() + }; + let cons = self.with_ctx(ctx).parse_assignment_expr()?; + expect!(self, ':'); + let ctx = Context { + in_cond_expr: true, + will_expect_colon_for_cond: false, + ..self.ctx() + }; + let alt = self.with_ctx(ctx).parse_assignment_expr()?; + let span = Span::new(start, alt.span_hi()); + Ok(Expr::Cond(self.ast(CondExpr { + span, + test, + cons, + alt, + }))) + } else { + Ok(test) + } + } + + /// Parse a primary expression or arrow function + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_primary_expr(&mut self) -> PResult> { + trace_cur!(self, parse_primary_expr); + + let _ = self.input.cur(); + let start = cur_pos!(self); + + let can_be_arrow = self + .state + .potential_arrow_start + .map(|s| s == start) + .unwrap_or(false); + + if let Some(tok) = self.input.cur() { + match tok { + tok!("this") => { + self.input.bump(); + return Ok(Expr::This(self.ast(ThisExpr { + span: span!(self, start), + }))); + } + + tok!("async") => { + if peeked_is!(self, "function") + && !self.input.has_linebreak_between_cur_and_peeked() + { + // handle `async function` expression + return self.parse_async_fn_expr(); + } + + if can_be_arrow && self.input.syntax().typescript() && peeked_is!(self, '<') { + // try parsing `async() => {}` + if let Some(res) = self.try_parse_ts(|p| { + let start = cur_pos!(p); + assert_and_bump!(p, "async"); + p.try_parse_ts_generic_async_arrow_fn(start) + }) { + return Ok(Expr::Arrow(self.ast(res))); + } + } + + if can_be_arrow + && peeked_is!(self, '(') + && !self.input.has_linebreak_between_cur_and_peeked() + { + expect!(self, "async"); + let async_span = self.input.prev_span(); + return self.parse_paren_expr_or_arrow_fn(can_be_arrow, Some(async_span)); + } + } + + tok!('[') => { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + return self.with_ctx(ctx).parse_array_lit(); + } + + tok!('{') => { + return self.parse_object_expr(); + } + + // Handle FunctionExpression and GeneratorExpression + tok!("function") => { + return self.parse_fn_expr(); + } + + // Literals + tok!("null") + | tok!("true") + | tok!("false") + | Token::Num { .. } + | Token::BigInt { .. } + | Token::Str { .. } => { + let lit = self.parse_lit()?; + return Ok(Expr::Lit(self.ast(lit))); + } + + // Regexp + tok!('/') | tok!("/=") => { + bump!(self); + + self.input.set_next_regexp(Some(start)); + + if let Some(Token::Regex(..)) = self.input.cur() { + self.input.set_next_regexp(None); + + match bump!(self) { + Token::Regex(exp, flags) => { + let span = span!(self, start); + + let mut flags_count = flags.chars().fold( + AHashMap::::default(), + |mut map, flag| { + let key = match flag { + // https://tc39.es/ecma262/#sec-isvalidregularexpressionliteral + 'd' | 'g' | 'i' | 'm' | 's' | 'u' | 'v' | 'y' => flag, + _ => '\u{0000}', // special marker for unknown flags + }; + map.entry(key).and_modify(|count| *count += 1).or_insert(1); + map + }, + ); + + if flags_count.remove(&'\u{0000}').is_some() { + self.emit_err(span, SyntaxError::UnknownRegExpFlags); + } + + if let Some((flag, _)) = + flags_count.iter().find(|(_, count)| **count > 1) + { + self.emit_err(span, SyntaxError::DuplicatedRegExpFlags(*flag)); + } + + return Ok(Expr::Lit(self.ast(Lit::Regex(self.ast(Regex { + span, + exp, + flags, + }))))); + } + _ => unreachable!(), + } + } + } + + tok!('`') => { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + // parse template literal + let tpl = self.with_ctx(ctx).parse_tpl(false)?; + return Ok(Expr::Tpl(self.ast(tpl))); + } + + tok!('(') => { + return self.parse_paren_expr_or_arrow_fn(can_be_arrow, None); + } + + _ => {} + } + } + + let decorators = self.parse_decorators(false)?; + + if is!(self, "class") { + return self.parse_class_expr(start, decorators); + } + + if is!(self, "let") + || (self.input.syntax().typescript() && is_one_of!(self, IdentRef, "await")) + || is!(self, IdentRef) + { + let ctx = self.ctx(); + let id = self.parse_ident(!ctx.in_generator, !ctx.in_async)?; + if id.is_reserved_in_strict_mode(self.ctx().module && !self.ctx().in_declare) { + self.emit_strict_mode_err( + self.input.prev_span(), + SyntaxError::InvalidIdentInStrict(id.sym.clone()), + ); + } + + if can_be_arrow + && id.sym == "async" + && !self.input.had_line_break_before_cur() + && is!(self, BindingIdent) + { + // see https://github.com/tc39/ecma262/issues/2034 + // ```js + // for(async of + // for(async of x); + // for(async of =>{};;); + // ``` + if ctx.expr_ctx.for_loop_init && is!(self, "of") && !peeked_is!(self, "=>") { + // ```spec https://tc39.es/ecma262/#prod-ForInOfStatement + // for ( [lookahead ∉ { let, async of }] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] + // [+Await] for await ( [lookahead ≠ let] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] + // ``` + + if !ctx.expr_ctx.for_await_loop_init { + self.emit_err(self.input.prev_span(), SyntaxError::TS1106); + } + + return Ok(Expr::Ident(self.ast(id))); + } + + let ident = self.parse_binding_ident(false)?; + if self.input.syntax().typescript() && ident.sym == "as" && !is!(self, "=>") { + // async as type + let type_ann = self.in_type().parse_with(|p| p.parse_ts_type())?; + return Ok(Expr::TsAs(self.ast(TsAsExpr { + span: span!(self, start), + expr: Expr::Ident(self.ast(id)), + type_ann, + }))); + } + + // async a => body + let arg = Pat::Ident(self.ast(ident)); + let mut params = Vec::new_in(self.alloc); + params.push(arg); + expect!(self, "=>"); + let body = + self.parse_fn_body(true, false, true, params.is_simple_parameter_list())?; + + return Ok(Expr::Arrow(self.ast(ArrowExpr { + span: span!(self, start), + body, + params, + is_async: true, + is_generator: false, + type_params: None, + return_type: None, + ctxt: Default::default(), + }))); + } else if can_be_arrow && !self.input.had_line_break_before_cur() && eat!(self, "=>") { + if self.ctx().strict && id.is_reserved_in_strict_bind() { + self.emit_strict_mode_err(id.span, SyntaxError::EvalAndArgumentsInStrict) + } + let mut params = Vec::new_in(self.alloc); + params.push(Pat::Ident(self.ast(id.into()))); + let body = + self.parse_fn_body(false, false, true, params.is_simple_parameter_list())?; + + return Ok(Expr::Arrow(self.ast(ArrowExpr { + span: span!(self, start), + body, + params, + is_async: false, + is_generator: false, + type_params: None, + return_type: None, + ctxt: Default::default(), + }))); + } else { + return Ok(Expr::Ident(self.ast(id))); + } + } + + if eat!(self, '#') { + let id = self.parse_ident_name()?; + return Ok(Expr::PrivateName(self.ast(PrivateName { + span: span!(self, start), + name: id.sym, + }))); + } + + syntax_error!(self, self.input.cur_span(), SyntaxError::TS1109) + } + + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_array_lit(&mut self) -> PResult> { + trace_cur!(self, parse_array_lit); + + let start = cur_pos!(self); + + assert_and_bump!(self, '['); + let mut elems = Vec::new_in(self.alloc); + + while !eof!(self) && !is!(self, ']') { + if is!(self, ',') { + expect!(self, ','); + elems.push(None); + continue; + } + elems.push( + self.include_in_expr(true) + .parse_expr_or_spread() + .map(Some)?, + ); + if !is!(self, ']') { + expect!(self, ','); + if is!(self, ']') { + self.state + .trailing_commas + .insert(start, self.input.prev_span()); + } + } + } + + expect!(self, ']'); + + let span = span!(self, start); + Ok(Expr::Array(self.ast(ArrayLit { span, elems }))) + } + + #[allow(dead_code)] + fn parse_member_expr(&mut self) -> PResult> { + self.parse_member_expr_or_new_expr(false) + } + + /// `is_new_expr`: true iff we are parsing production 'NewExpression'. + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_member_expr_or_new_expr(&mut self, is_new_expr: bool) -> PResult> { + let ctx = Context { + should_not_lex_lt_or_gt_as_type: true, + ..self.ctx() + }; + self.with_ctx(ctx) + .parse_member_expr_or_new_expr_inner(is_new_expr) + } + + fn parse_member_expr_or_new_expr_inner(&mut self, is_new_expr: bool) -> PResult> { + trace_cur!(self, parse_member_expr_or_new_expr); + + let start = cur_pos!(self); + if eat!(self, "new") { + if eat!(self, '.') { + if eat!(self, "target") { + let span = span!(self, start); + let expr = Expr::MetaProp(self.ast(MetaPropExpr { + span, + kind: MetaPropKind::NewTarget, + })); + + let ctx = self.ctx(); + if (!ctx.inside_non_arrow_function_scope) && !ctx.in_parameters && !ctx.in_class + { + self.emit_err(span, SyntaxError::InvalidNewTarget); + } + + return self.parse_subscripts(Callee::Expr(expr), true, false); + } + + unexpected!(self, "target") + } + + // 'NewExpression' allows new call without paren. + let callee = self.parse_member_expr_or_new_expr(is_new_expr)?; + return_if_arrow!(self, callee); + + if is_new_expr { + match &callee { + Expr::OptChain(opt_chain) if opt_chain.optional => { + syntax_error!( + self, + opt_chain.span, + SyntaxError::OptChainCannotFollowConstructorCall + ) + } + Expr::Member(member_expr) => { + if let Expr::OptChain(opt_chain) = &member_expr.obj { + if opt_chain.optional { + syntax_error!( + self, + opt_chain.span, + SyntaxError::OptChainCannotFollowConstructorCall + ) + } + } + } + _ => {} + } + } + + let type_args = if self.input.syntax().typescript() && is!(self, '<') { + self.try_parse_ts(|p| { + let ctx = Context { + should_not_lex_lt_or_gt_as_type: false, + ..p.ctx() + }; + + let args = p.with_ctx(ctx).parse_ts_type_args()?; + if !is!(p, '(') { + // This will fail + expect!(p, '('); + } + Ok(Some(args)) + }) + } else { + None + }; + + if !is_new_expr || is!(self, '(') { + // Parsed with 'MemberExpression' production. + let args = self.parse_args(false).map(Some)?; + + let new_expr = Callee::Expr(Expr::New(self.ast(NewExpr { + span: span!(self, start), + callee, + args, + type_args, + ctxt: SyntaxContext::default(), + }))); + + // We should parse subscripts for MemberExpression. + // Because it's left recursive. + return self.parse_subscripts(new_expr, true, false); + } + + // Parsed with 'NewExpression' production. + + return Ok(Expr::New(self.ast(NewExpr { + span: span!(self, start), + callee, + args: None, + type_args, + ctxt: SyntaxContext::default(), + }))); + } + + if eat!(self, "super") { + let base = Callee::Super(self.ast(Super { + span: span!(self, start), + })); + return self.parse_subscripts(base, true, false); + } + if eat!(self, "import") { + return self.parse_dynamic_import_or_import_meta(start, true); + } + let obj = self.parse_primary_expr()?; + return_if_arrow!(self, obj); + + let type_args = if self.syntax().typescript() && is!(self, '<') { + self.try_parse_ts_type_args() + } else { + None + }; + let obj = if let Some(type_args) = type_args { + trace_cur!(self, parse_member_expr_or_new_expr__with_type_args); + Expr::TsInstantiation(self.ast(TsInstantiation { + expr: obj, + type_args, + span: span!(self, start), + })) + } else { + obj + }; + + self.parse_subscripts(Callee::Expr(obj), true, false) + } + + /// Parse `NewExpression`. + /// This includes `MemberExpression`. + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_new_expr(&mut self) -> PResult> { + trace_cur!(self, parse_new_expr); + + self.parse_member_expr_or_new_expr(true) + } + + /// Parse `Arguments[Yield, Await]` + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_args( + &mut self, + is_dynamic_import: bool, + ) -> PResult>> { + trace_cur!(self, parse_args); + + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_with(|p| { + let start = cur_pos!(p); + expect!(p, '('); + + let mut first = true; + let mut expr_or_spreads = Vec::with_capacity_in(2, p.alloc); + + while !eof!(p) && !is!(p, ')') { + if first { + first = false; + } else { + expect!(p, ','); + // Handle trailing comma. + if is!(p, ')') { + if is_dynamic_import && !p.input.syntax().import_attributes() { + syntax_error!( + p, + span!(p, start), + SyntaxError::TrailingCommaInsideImport + ) + } + + break; + } + } + + expr_or_spreads.push(p.include_in_expr(true).parse_expr_or_spread()?); + } + + expect!(p, ')'); + Ok(expr_or_spreads) + }) + } + + /// AssignmentExpression[+In, ?Yield, ?Await] + /// ...AssignmentExpression[+In, ?Yield, ?Await] + pub(crate) fn parse_expr_or_spread(&mut self) -> PResult> { + trace_cur!(self, parse_expr_or_spread); + + let start = cur_pos!(self); + + if eat!(self, "...") { + let spread_span = span!(self, start); + let spread = Some(spread_span); + self.include_in_expr(true) + .parse_assignment_expr() + .map_err(|err| { + Error::new( + err.span(), + SyntaxError::WithLabel { + inner: std::boxed::Box::new(err), + span: spread_span, + note: "An expression should follow '...'", + }, + ) + }) + .map(|expr| ExprOrSpread { spread, expr }) + } else { + self.parse_assignment_expr() + .map(|expr| ExprOrSpread { spread: None, expr }) + } + } + + /// Parse paren expression or arrow function expression. + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_paren_expr_or_arrow_fn( + &mut self, + can_be_arrow: bool, + async_span: Option, + ) -> PResult> { + trace_cur!(self, parse_paren_expr_or_arrow_fn); + + let expr_start = async_span.map(|x| x.lo()).unwrap_or_else(|| cur_pos!(self)); + + // At this point, we can't know if it's parenthesized + // expression or head of arrow function. + // But as all patterns of javascript is subset of + // expressions, we can parse both as expression. + + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + let (paren_items, trailing_comma) = self + .with_ctx(ctx) + .include_in_expr(true) + .parse_args_or_pats()?; + + let has_pattern = paren_items + .iter() + .any(|item| matches!(item, AssignTargetOrSpread::Pat(..))); + + let will_expect_colon_for_cond = self.ctx().will_expect_colon_for_cond; + // This is slow path. We handle arrow in conditional expression. + if self.syntax().typescript() && self.ctx().in_cond_expr && is!(self, ':') { + // TODO: Remove clone + let items_ref = &paren_items; + if let Some(expr) = self.try_parse_ts(|p| { + let return_type = p.parse_ts_type_or_type_predicate_ann(&tok!(':'))?; + + expect!(p, "=>"); + + let params: Vec = Vec::from_iter_in( + p.parse_paren_items_as_params(items_ref.clone_in(p.alloc), trailing_comma)?, + p.alloc, + ); + + let body: BlockStmtOrExpr = p.parse_fn_body( + async_span.is_some(), + false, + true, + params.is_simple_parameter_list(), + )?; + + if will_expect_colon_for_cond && !is!(p, ':') { + trace_cur!(p, parse_arrow_in_cond__fail); + unexpected!(p, "fail") + } + + Ok(Some(Expr::Arrow(p.ast(ArrowExpr { + span: span!(p, expr_start), + is_async: async_span.is_some(), + is_generator: false, + params, + body, + return_type: Some(return_type), + type_params: None, + ctxt: Default::default(), + })))) + }) { + return Ok(expr); + } + } + + let return_type = if !self.ctx().will_expect_colon_for_cond + && self.input.syntax().typescript() + && is!(self, ':') + { + self.try_parse_ts(|p| { + let return_type = p.parse_ts_type_or_type_predicate_ann(&tok!(':'))?; + + if !is!(p, "=>") { + unexpected!(p, "fail") + } + + Ok(Some(return_type)) + }) + } else { + None + }; + + // we parse arrow function at here, to handle it efficiently. + if has_pattern || return_type.is_some() || is!(self, "=>") { + if self.input.had_line_break_before_cur() { + syntax_error!( + self, + span!(self, expr_start), + SyntaxError::LineBreakBeforeArrow + ); + } + + if !can_be_arrow { + syntax_error!(self, span!(self, expr_start), SyntaxError::ArrowNotAllowed); + } + expect!(self, "=>"); + + let params: Vec = Vec::from_iter_in( + self.parse_paren_items_as_params(paren_items, trailing_comma)?, + self.alloc, + ); + + let body: BlockStmtOrExpr = self.parse_fn_body( + async_span.is_some(), + false, + true, + params.is_simple_parameter_list(), + )?; + let arrow_expr = ArrowExpr { + span: span!(self, expr_start), + is_async: async_span.is_some(), + is_generator: false, + params, + body, + return_type, + type_params: None, + ctxt: Default::default(), + }; + if let BlockStmtOrExpr::BlockStmt(..) = &arrow_expr.body { + if let Some(&Token::BinOp(..)) = self.input.cur() { + // ) is required + self.emit_err(self.input.cur_span(), SyntaxError::TS1005); + let errorred_expr = + self.parse_bin_op_recursively(Expr::Arrow(self.ast(arrow_expr)), 0)?; + + if !is!(self, ';') { + // ; is required + self.emit_err(self.input.cur_span(), SyntaxError::TS1005); + } + + return Ok(errorred_expr); + } + } + return Ok(Expr::Arrow(self.ast(arrow_expr))); + } else { + // If there's no arrow function, we have to check there's no + // AssignProp in lhs to check against assignment in object literals + // like (a, {b = 1}); + for expr_or_spread in paren_items.iter() { + if let AssignTargetOrSpread::ExprOrSpread(e) = expr_or_spread { + if let Expr::Object(o) = &e.expr { + for p in o.props.iter() { + if let PropOrSpread::Prop(prop) = p { + if let Prop::Assign(..) = **prop { + self.emit_err(prop.span(), SyntaxError::AssignProperty); + } + } + } + } + } + } + } + + let mut expr_or_spreads = Vec::new_in(self.alloc); + for item in paren_items { + expr_or_spreads.push(match item { + AssignTargetOrSpread::ExprOrSpread(e) => Ok(e.into_inner()), + _ => syntax_error!(self, item.span(), SyntaxError::InvalidExpr), + }?) + } + if let Some(async_span) = async_span { + // It's a call expression + return Ok(Expr::Call(self.ast(CallExpr { + span: span!(self, async_span.lo()), + callee: Callee::Expr(Expr::Ident( + self.ast(Ident::new_no_ctxt("async".into(), async_span)), + )), + args: expr_or_spreads, + ctxt: Default::default(), + type_args: None, + }))); + } + + // It was not head of arrow function. + + if expr_or_spreads.is_empty() { + syntax_error!( + self, + Span::new(expr_start, last_pos!(self),), + SyntaxError::EmptyParenExpr + ); + } + + // TODO: Verify that invalid expression like {a = 1} does not exists. + + // ParenthesizedExpression cannot contain spread. + if expr_or_spreads.len() == 1 { + let expr_or_spread = expr_or_spreads.into_iter().next().unwrap(); + if expr_or_spread.spread.is_some() { + syntax_error!( + self, + expr_or_spread.expr.span(), + SyntaxError::SpreadInParenExpr + ) + } + Ok(Expr::Paren(self.ast(ParenExpr { + span: span!(self, expr_start), + expr: expr_or_spread.expr, + }))) + } else { + debug_assert!(expr_or_spreads.len() >= 2); + + let mut exprs = Vec::with_capacity_in(expr_or_spreads.len(), self.alloc); + for expr in expr_or_spreads { + if expr.spread.is_some() { + syntax_error!(self, expr.expr.span(), SyntaxError::SpreadInParenExpr); + } else { + exprs.push(expr.expr) + } + } + debug_assert!(exprs.len() >= 2); + + // span of sequence expression should not include '(', ')' + let seq_expr = Expr::Seq(self.ast(SeqExpr { + span: Span::new( + exprs.first().unwrap().span_lo(), + exprs.last().unwrap().span_hi(), + ), + exprs, + })); + Ok(Expr::Paren(self.ast(ParenExpr { + span: span!(self, expr_start), + expr: seq_expr, + }))) + } + } + + fn parse_tpl_elements( + &mut self, + is_tagged_tpl: bool, + ) -> PResult<(Vec<'a, Expr<'a>>, Vec<'a, TplElement>)> { + trace_cur!(self, parse_tpl_elements); + + let mut exprs = Vec::new_in(self.alloc); + + let cur_elem = self.parse_tpl_element(is_tagged_tpl)?; + let mut is_tail = cur_elem.tail; + let mut quasis = Vec::new_in(self.alloc); + quasis.push(cur_elem); + + while !is_tail { + expect!(self, "${"); + exprs.push(self.include_in_expr(true).parse_expr()?); + expect!(self, '}'); + let elem = self.parse_tpl_element(is_tagged_tpl)?; + is_tail = elem.tail; + quasis.push(elem); + } + + Ok((exprs, quasis)) + } + + fn parse_tagged_tpl( + &mut self, + tag: Expr<'a>, + type_params: Option>>, + ) -> PResult> { + let tagged_tpl_start = tag.span_lo(); + trace_cur!(self, parse_tagged_tpl); + + let tpl = self.parse_tpl(true)?; + let tpl = self.ast(tpl); + + let span = span!(self, tagged_tpl_start); + + if tag.is_opt_chain() { + self.emit_err(span, SyntaxError::TaggedTplInOptChain); + } + + Ok(TaggedTpl { + span, + tag, + type_params, + tpl, + ctxt: SyntaxContext::default(), + }) + } + + pub(crate) fn parse_tpl(&mut self, is_tagged_tpl: bool) -> PResult> { + trace_cur!(self, parse_tpl); + let start = cur_pos!(self); + + assert_and_bump!(self, '`'); + + let (exprs, quasis) = self.parse_tpl_elements(is_tagged_tpl)?; + + expect!(self, '`'); + + let span = span!(self, start); + Ok(Tpl { + span, + exprs, + quasis, + }) + } + + pub(crate) fn parse_tpl_element(&mut self, is_tagged_tpl: bool) -> PResult { + let start = cur_pos!(self); + + let (raw, cooked) = match *cur!(self, true) { + Token::Template { .. } => match bump!(self) { + Token::Template { raw, cooked, .. } => match cooked { + Ok(cooked) => (raw, Some(cooked)), + Err(err) => { + if is_tagged_tpl { + (raw, None) + } else { + return Err(err); + } + } + }, + _ => unreachable!(), + }, + _ => unexpected!(self, "template token"), + }; + + let tail = is!(self, '`'); + + Ok(TplElement { + span: span!(self, start), + raw, + tail, + + cooked, + }) + } + + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_subscripts( + &mut self, + mut obj: Callee<'a>, + no_call: bool, + no_computed_member: bool, + ) -> PResult> { + let start = obj.span().lo; + loop { + obj = match self.parse_subscript(start, obj, no_call, no_computed_member)? { + (expr, false) => return Ok(expr), + (expr, true) => Callee::Expr(expr), + } + } + } + + /// returned bool is true if this method should be called again. + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + fn parse_subscript( + &mut self, + start: BytePos, + mut obj: Callee<'a>, + no_call: bool, + no_computed_member: bool, + ) -> PResult<(Expr<'a>, bool)> { + trace_cur!(self, parse_subscript); + let _ = cur!(self, false); + + if self.input.syntax().typescript() { + if !self.input.had_line_break_before_cur() && is!(self, '!') { + self.input.set_expr_allowed(false); + assert_and_bump!(self, '!'); + + let expr = match obj { + Callee::Super(..) => { + syntax_error!( + self, + self.input.cur_span(), + SyntaxError::TsNonNullAssertionNotAllowed("super".into()) + ) + } + Callee::Import(..) => { + syntax_error!( + self, + self.input.cur_span(), + SyntaxError::TsNonNullAssertionNotAllowed("import".into()) + ) + } + Callee::Expr(expr) => expr, + }; + return Ok(( + Expr::TsNonNull(self.ast(TsNonNullExpr { + span: span!(self, start), + expr, + })), + true, + )); + } + + if matches!(obj, Callee::Expr(..)) && is!(self, '<') { + let is_dynamic_import = obj.is_import(); + + let mut obj_opt = Some(obj); + // tsTryParseAndCatch is expensive, so avoid if not necessary. + // There are number of things we are going to "maybe" parse, like type arguments + // on tagged template expressions. If any of them fail, walk it back and + // continue. + + let mut_obj_opt = &mut obj_opt; + + let ctx: Context = Context { + should_not_lex_lt_or_gt_as_type: true, + ..self.ctx() + }; + let result = self.with_ctx(ctx).try_parse_ts(|p| { + if !no_call + && p.at_possible_async(match &mut_obj_opt { + Some(Callee::Expr(ref expr)) => expr, + _ => unreachable!(), + })? + { + // Almost certainly this is a generic async function `async () => ... + // But it might be a call with a type argument `async();` + let async_arrow_fn = p.try_parse_ts_generic_async_arrow_fn(start)?; + if let Some(async_arrow_fn) = async_arrow_fn { + return Ok(Some((Expr::Arrow(p.ast(async_arrow_fn)), true))); + } + } + + let type_args = p.parse_ts_type_args()?; + + if !no_call && is!(p, '(') { + // possibleAsync always false here, because we would have handled it + // above. (won't be any undefined arguments) + let args = p.parse_args(is_dynamic_import)?; + + let obj = mut_obj_opt.take().unwrap(); + + if let Callee::Expr(Expr::OptChain(_)) = &obj { + return Ok(Some(( + Expr::OptChain(p.ast(OptChainExpr { + span: span!(p, start), + base: OptChainBase::Call(p.ast(OptCall { + span: span!(p, start), + callee: obj.expect_expr(), + type_args: Some(type_args), + args, + ctxt: Default::default(), + })), + optional: false, + })), + true, + ))); + } + + Ok(Some(( + Expr::Call(p.ast(CallExpr { + span: span!(p, start), + callee: obj, + type_args: Some(type_args), + args, + ctxt: Default::default(), + })), + true, + ))) + } else if is!(p, '`') { + p.parse_tagged_tpl( + match mut_obj_opt { + Some(Callee::Expr(obj)) => obj.take(p.alloc), + _ => unreachable!(), + }, + Some(type_args), + ) + .map(|expr| (Expr::TaggedTpl(p.ast(expr)), true)) + .map(Some) + } else if is_one_of!(p, '=', "as", "satisfies") { + Ok(Some(( + Expr::TsInstantiation(p.ast(TsInstantiation { + span: span!(p, start), + expr: match mut_obj_opt { + Some(Callee::Expr(obj)) => obj.take(p.alloc), + _ => unreachable!(), + }, + type_args, + })), + false, + ))) + } else if no_call { + unexpected!(p, "`") + } else { + unexpected!(p, "( or `") + } + }); + if let Some(result) = result { + return Ok(result); + } + + obj = obj_opt.unwrap(); + } + } + + let type_args = if self.syntax().typescript() && is!(self, '<') { + self.try_parse_ts_type_args() + } else { + None + }; + + if obj.is_import() && !is_one_of!(self, '.', '(') { + unexpected!(self, "`.` or `(`") + } + + let question_dot_token = if is!(self, '?') && peeked_is!(self, '.') { + let start = cur_pos!(self); + eat!(self, '?'); + Some(span!(self, start)) + } else { + None + }; + + // $obj[name()] + if !no_computed_member + && ((question_dot_token.is_some() + && is!(self, '.') + && peeked_is!(self, '[') + && eat!(self, '.') + && eat!(self, '[')) + || eat!(self, '[')) + { + let bracket_lo = self.input.prev_span().lo; + let prop = self.include_in_expr(true).parse_expr()?; + expect!(self, ']'); + let span = Span::new(obj.span_lo(), self.input.last_pos()); + debug_assert_eq!(obj.span_lo(), span.lo()); + let prop = ComputedPropName { + span: Span::new(bracket_lo, self.input.last_pos()), + expr: prop, + }; + + let type_args = if self.syntax().typescript() && is!(self, '<') { + self.try_parse_ts_type_args() + } else { + None + }; + + return Ok(( + (match obj { + Callee::Import(..) => unreachable!(), + Callee::Super(obj) => { + if !self.ctx().allow_direct_super + && !self.input.syntax().allow_super_outside_method() + { + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuper); + } else if question_dot_token.is_some() { + if no_call { + syntax_error!( + self, + self.input.cur_span(), + SyntaxError::InvalidSuperCall + ); + } + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuper); + } else { + Expr::SuperProp(self.ast(SuperPropExpr { + span, + obj: obj.into_inner(), + prop: SuperProp::Computed(self.ast(prop)), + })) + } + } + Callee::Expr(obj) => { + let is_opt_chain = unwrap_ts_non_null(&obj).is_opt_chain(); + let expr = MemberExpr { + span, + obj, + prop: MemberProp::Computed(self.ast(prop)), + }; + let expr = if is_opt_chain || question_dot_token.is_some() { + Expr::OptChain(self.ast(OptChainExpr { + span, + optional: question_dot_token.is_some(), + base: OptChainBase::Member(self.ast(expr)), + })) + } else { + Expr::Member(self.ast(expr)) + }; + + if let Some(type_args) = type_args { + Expr::TsInstantiation(self.ast(TsInstantiation { + expr, + type_args, + span: span!(self, start), + })) + } else { + expr + } + } + }), + true, + )); + } + + if (question_dot_token.is_some() + && is!(self, '.') + && (peeked_is!(self, '(') || (self.syntax().typescript() && peeked_is!(self, '<'))) + && eat!(self, '.')) + || (!no_call && (is!(self, '('))) + { + let type_args = if self.syntax().typescript() && is!(self, '<') { + self.parse_ts_type_args().map(Some)? + } else { + None + }; + let args = self.parse_args(obj.is_import())?; + let span = span!(self, start); + return if question_dot_token.is_some() + || match &obj { + Callee::Expr(obj) => unwrap_ts_non_null(obj).is_opt_chain(), + _ => false, + } { + match obj { + Callee::Super(_) | Callee::Import(_) => { + syntax_error!(self, self.input.cur_span(), SyntaxError::SuperCallOptional) + } + Callee::Expr(callee) => Ok(( + Expr::OptChain(self.ast(OptChainExpr { + span, + optional: question_dot_token.is_some(), + base: OptChainBase::Call(self.ast(OptCall { + span: span!(self, start), + callee, + args, + type_args, + ctxt: Default::default(), + })), + })), + true, + )), + } + } else { + Ok(( + Expr::Call(self.ast(CallExpr { + span: span!(self, start), + callee: obj, + args, + type_args: None, + ctxt: Default::default(), + })), + true, + )) + }; + } + + // member expression + // $obj.name + if eat!(self, '.') { + let prop = self.parse_maybe_private_name().map(|e| match e { + Either::Left(p) => MemberProp::PrivateName(p), + Either::Right(i) => MemberProp::Ident(self.ast(i)), + })?; + let span = span!(self, obj.span_lo()); + debug_assert_eq!(obj.span_lo(), span.lo()); + debug_assert_eq!(prop.span_hi(), span.hi()); + + let type_args = if self.syntax().typescript() && is!(self, '<') { + self.try_parse_ts_type_args() + } else { + None + }; + + return Ok(( + (match obj { + callee @ Callee::Import(_) => match prop { + MemberProp::Ident(ident) => { + if !self.ctx().can_be_module { + let span = span!(self, start); + self.emit_err(span, SyntaxError::ImportMetaInScript); + } + match ident.sym.as_str() { + "meta" => Expr::MetaProp(self.ast(MetaPropExpr { + span, + kind: MetaPropKind::ImportMeta, + })), + _ => { + let args = self.parse_args(true)?; + Expr::Call(self.ast(CallExpr { + span, + callee, + args, + type_args: None, + ctxt: Default::default(), + })) + } + } + } + _ => { + unexpected!(self, "meta"); + } + }, + Callee::Super(obj) => { + if !self.ctx().allow_direct_super + && !self.input.syntax().allow_super_outside_method() + { + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuper); + } else if question_dot_token.is_some() { + if no_call { + syntax_error!( + self, + self.input.cur_span(), + SyntaxError::InvalidSuperCall + ); + } + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuper); + } else { + match prop { + MemberProp::Ident(ident) => { + Expr::SuperProp(self.ast(SuperPropExpr { + span, + obj: obj.into_inner(), + prop: SuperProp::Ident(ident), + })) + } + MemberProp::PrivateName(..) => syntax_error!( + self, + self.input.cur_span(), + SyntaxError::InvalidSuperCall + ), + MemberProp::Computed(..) => unreachable!(), + } + } + } + Callee::Expr(obj) => { + let expr = MemberExpr { span, obj, prop }; + let expr = if unwrap_ts_non_null(&expr.obj).is_opt_chain() + || question_dot_token.is_some() + { + Expr::OptChain(self.ast(OptChainExpr { + span: span!(self, start), + optional: question_dot_token.is_some(), + base: OptChainBase::Member(self.ast(expr)), + })) + } else { + Expr::Member(self.ast(expr)) + }; + if let Some(type_args) = type_args { + Expr::TsInstantiation(self.ast(TsInstantiation { + expr, + type_args, + span: span!(self, start), + })) + } else { + expr + } + } + }), + true, + )); + } + + match obj { + Callee::Expr(expr) => { + let expr = if let Some(type_args) = type_args { + Expr::TsInstantiation(self.ast(TsInstantiation { + expr, + type_args, + span: span!(self, start), + })) + } else { + expr + }; + + // MemberExpression[?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged] + if is!(self, '`') { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + let tpl = self.with_ctx(ctx).parse_tagged_tpl(expr, None)?; + return Ok((Expr::TaggedTpl(self.ast(tpl)), true)); + } + + Ok((expr, false)) + } + Callee::Super(..) => { + if no_call { + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuperCall); + } + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidSuper); + } + Callee::Import(..) => { + syntax_error!(self, self.input.cur_span(), SyntaxError::InvalidImport); + } + } + } + + /// Parse call, dot, and `[]`-subscript expressions. + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_lhs_expr(&mut self) -> PResult> { + trace_cur!(self, parse_lhs_expr); + + let start = cur_pos!(self); + + // parse jsx + if self.input.syntax().jsx() { + match *cur!(self, true) { + Token::JSXText { .. } => { + return self + .parse_jsx_text() + .map(|jsx_text| Expr::Lit(self.ast(Lit::JSXText(self.ast(jsx_text))))) + } + Token::JSXTagStart => { + return self.parse_jsx_element().map(|e| match e { + Either::Left(l) => Expr::JSXFragment(self.ast(l)), + Either::Right(r) => Expr::JSXElement(self.ast(r)), + }); + } + _ => {} + } + + if is!(self, '<') && !peeked_is!(self, '!') { + // In case we encounter an lt token here it will always be the start of + // jsx as the lt sign is not allowed in places that expect an expression + + // FIXME: + // self.finishToken(tt.jsxTagStart); + + return self.parse_jsx_element().map(|e| match e { + Either::Left(l) => Expr::JSXFragment(self.ast(l)), + Either::Right(r) => Expr::JSXElement(self.ast(r)), + }); + } + } + + // `super()` can't be handled from parse_new_expr() + if eat!(self, "super") { + let obj = Callee::Super(self.ast(Super { + span: span!(self, start), + })); + return self.parse_subscripts(obj, false, false); + } + if eat!(self, "import") { + return self.parse_dynamic_import_or_import_meta(start, false); + } + + let callee = self.parse_new_expr()?; + return_if_arrow!(self, callee); + + let type_args = if self.input.syntax().typescript() && is_one_of!(self, '<', "<<") { + self.try_parse_ts(|p| { + let type_args = p.parse_ts_type_args()?; + if is!(p, '(') { + Ok(Some(type_args)) + } else { + Ok(None) + } + }) + } else { + None + }; + + match callee { + Expr::New(mut new_expr) if new_expr.args.is_none() => { + // If this is parsed using 'NewExpression' rule, just return it. + // Because it's not left-recursive. + if type_args.is_some() { + // This fails with `expected (` + expect!(self, '('); + } + debug_assert_ne!( + cur!(self, false).ok(), + Some(&tok!('(')), + "parse_new_expr() should eat paren if it exists" + ); + new_expr.type_args = type_args; + return Ok(Expr::New(new_expr)); + } + _ => {} + } + // 'CallExpr' rule contains 'MemberExpr (...)', + // and 'MemberExpr' rule contains 'new MemberExpr (...)' + + if is!(self, '(') { + // This is parsed using production MemberExpression, + // which is left-recursive. + let (callee, is_import) = match callee { + _ if callee.is_ident_ref_to("import") => ( + Callee::Import(self.ast(Import { + span: callee.span(), + phase: Default::default(), + })), + true, + ), + _ => (Callee::Expr(callee), false), + }; + let args = self.parse_args(is_import)?; + + let call_expr = match callee { + Callee::Expr(e) if unwrap_ts_non_null(&e).is_opt_chain() => { + Expr::OptChain(self.ast(OptChainExpr { + span: span!(self, start), + base: OptChainBase::Call(self.ast(OptCall { + span: span!(self, start), + callee: e, + args, + type_args, + ctxt: SyntaxContext::default(), + })), + optional: false, + })) + } + _ => Expr::Call(self.ast(CallExpr { + span: span!(self, start), + callee, + args, + type_args, + ctxt: Default::default(), + })), + }; + + return self.parse_subscripts(Callee::Expr(call_expr), false, false); + } + if type_args.is_some() { + // This fails + expect!(self, '('); + } + + // This is parsed using production 'NewExpression', which contains + // 'MemberExpression' + Ok(callee) + } + + pub(crate) fn parse_for_head_prefix(&mut self) -> PResult> { + self.parse_expr() + } + + // Returns (args_or_pats, trailing_comma) + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_args_or_pats( + &mut self, + ) -> PResult<(Vec<'a, AssignTargetOrSpread<'a>>, Option)> { + self.with_ctx(Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }) + .parse_args_or_pats_inner() + } + + fn parse_args_or_pats_inner( + &mut self, + ) -> PResult<(Vec<'a, AssignTargetOrSpread<'a>>, Option)> { + trace_cur!(self, parse_args_or_pats); + + expect!(self, '('); + + let mut items = Vec::new_in(self.alloc); + let mut trailing_comma = None; + + // TODO(kdy1): optimize (once we parsed a pattern, we can parse everything else + // as a pattern instead of reparsing) + while !eof!(self) && !is!(self, ')') { + // https://github.com/swc-project/swc/issues/410 + let is_async = is!(self, "async") + && matches!( + peek!(self), + Some(tok!('(') | tok!("function") | Token::Word(..)) + ); + + let start = cur_pos!(self); + self.state.potential_arrow_start = Some(start); + let modifier_start = start; + + let has_modifier = self.eat_any_ts_modifier()?; + let pat_start = cur_pos!(self); + + let mut arg = { + if self.input.syntax().typescript() + && (is!(self, IdentRef) || (is!(self, "...") && peeked_is!(self, IdentRef))) + { + let spread = if eat!(self, "...") { + Some(self.input.prev_span()) + } else { + None + }; + + // At here, we use parse_bin_expr() instead of parse_assignment_expr() + // because `x?: number` should not be parsed as a conditional expression + let expr = if spread.is_some() { + self.include_in_expr(true).parse_bin_expr()? + } else { + let mut expr = self.parse_bin_expr()?; + + if let Ok(&Token::AssignOp(..)) = cur!(self, false) { + expr = self.finish_assignment_expr(start, expr)? + } + + expr + }; + + ExprOrSpread { spread, expr } + } else { + self.include_in_expr(true).parse_expr_or_spread()? + } + }; + + let optional = if self.input.syntax().typescript() { + if is!(self, '?') { + if peeked_is!(self, ',') + || peeked_is!(self, ':') + || peeked_is!(self, ')') + || peeked_is!(self, '=') + { + assert_and_bump!(self, '?'); + let _ = cur!(self, false); + if arg.spread.is_some() { + self.emit_err(self.input.prev_span(), SyntaxError::TS1047); + } + match arg.expr { + Expr::Ident(..) => {} + _ => { + syntax_error!( + self, + arg.span(), + SyntaxError::TsBindingPatCannotBeOptional + ) + } + } + true + } else if matches!(arg, ExprOrSpread { spread: None, .. }) { + expect!(self, '?'); + let test = arg.expr; + let ctx = Context { + in_cond_expr: true, + will_expect_colon_for_cond: true, + include_in_expr: true, + ..self.ctx() + }; + let cons = self.with_ctx(ctx).parse_assignment_expr()?; + expect!(self, ':'); + let ctx = Context { + in_cond_expr: true, + will_expect_colon_for_cond: false, + ..self.ctx() + }; + let alt = self.with_ctx(ctx).parse_assignment_expr()?; + + arg = ExprOrSpread { + spread: None, + expr: Expr::Cond(self.ast(CondExpr { + span: Span::new(start, alt.span_hi()), + + test, + cons, + alt, + })), + }; + + false + } else { + false + } + } else { + false + } + } else { + false + }; + + if optional || (self.input.syntax().typescript() && is!(self, ':')) { + // TODO: `async(...args?: any[]) : any => {}` + // + // if self.input.syntax().typescript() && optional && arg.spread.is_some() { + // self.emit_err(self.input.prev_span(), SyntaxError::TS1047) + // } + + let mut pat = self.reparse_expr_as_pat(PatType::BindingPat, arg.expr)?; + if optional { + match pat { + Pat::Ident(ref mut i) => i.optional = true, + _ => unreachable!(), + } + } + if let Some(span) = arg.spread { + pat = Pat::Rest(self.ast(RestPat { + span: span!(self, pat_start), + dot3_token: span, + arg: pat, + type_ann: None, + })); + } + match &mut pat { + Pat::Ident(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Array(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Object(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Rest(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Expr(expr) => unreachable!("invalid pattern: Expr({:?})", expr), + Pat::Assign(..) | Pat::Invalid(..) => { + // We don't have to panic here. + // See: https://github.com/swc-project/swc/issues/1170 + // + // Also, as an exact error is added to the errors while + // creating `Invalid`, we don't have to emit a new + // error. + } + } + + if eat!(self, '=') { + let right = self.parse_assignment_expr()?; + pat = Pat::Assign(self.ast(AssignPat { + span: span!(self, pat_start), + left: pat, + right, + })); + } + + if has_modifier { + self.emit_err(span!(self, modifier_start), SyntaxError::TS2369); + } + + items.push(AssignTargetOrSpread::Pat(pat)) + } else { + if has_modifier { + self.emit_err(span!(self, modifier_start), SyntaxError::TS2369); + } + + items.push(AssignTargetOrSpread::ExprOrSpread(self.ast(arg))); + } + + // https://github.com/swc-project/swc/issues/433 + if eat!(self, "=>") && { + debug_assert_eq!(items.len(), 1); + match &items[0] { + AssignTargetOrSpread::ExprOrSpread(expr_or_spread) => { + expr_or_spread.expr.is_ident() + } + AssignTargetOrSpread::Pat(Pat::Expr(expr)) => expr.is_ident(), + AssignTargetOrSpread::Pat(Pat::Ident(..)) => true, + _ => false, + } + } { + let params: Vec = Vec::from_iter_in( + self.parse_paren_items_as_params(items.clone_in(self.alloc), None)? + .into_iter(), + self.alloc, + ); + + let body: BlockStmtOrExpr = + self.parse_fn_body(false, false, true, params.is_simple_parameter_list())?; + let span = span!(self, start); + + items.push(AssignTargetOrSpread::ExprOrSpread(self.ast(ExprOrSpread { + expr: Expr::Arrow(self.ast(ArrowExpr { + span, + body, + is_async, + is_generator: false, + params, + type_params: None, + return_type: None, + ctxt: Default::default(), + })), + spread: None, + }))); + } + + if !is!(self, ')') { + expect!(self, ','); + if is!(self, ')') { + trailing_comma = Some(self.input.prev_span()); + } + } + } + + expect!(self, ')'); + Ok((items, trailing_comma)) + } +} + +#[ast_node] +pub(crate) enum AssignTargetOrSpread<'a> { + // #[tag("ExprOrSpread")] + ExprOrSpread(Box<'a, ExprOrSpread<'a>>), + // #[tag("*")] + Pat(Pat<'a>), +} + +/// simple leaf methods. +impl<'a, I: Tokens> Parser<'a, I> { + fn parse_yield_expr(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "yield"); + debug_assert!(self.ctx().in_generator); + + // Spec says + // YieldExpression cannot be used within the FormalParameters of a generator + // function because any expressions that are part of FormalParameters are + // evaluated before the resulting generator object is in a resumable state. + if self.ctx().in_parameters && !self.ctx().in_function { + syntax_error!(self, self.input.prev_span(), SyntaxError::YieldParamInGen) + } + + if is!(self, ';') + || (!is!(self, '*') + && !is!(self, '/') + && !is!(self, "/=") + && !cur!(self, false) + .map(|t| t.kind().starts_expr()) + .unwrap_or(true)) + { + Ok(Expr::Yield(self.ast(YieldExpr { + span: span!(self, start), + arg: None, + delegate: false, + }))) + } else { + let has_star = eat!(self, '*'); + let err_span = span!(self, start); + + let arg = self.parse_assignment_expr().map_err(|err| { + Error::new( + err.span(), + SyntaxError::WithLabel { + inner: std::boxed::Box::new(err), + span: err_span, + note: "Tried to parse an argument of yield", + }, + ) + })?; + + Ok(Expr::Yield(self.ast(YieldExpr { + span: span!(self, start), + arg: Some(arg), + delegate: has_star, + }))) + } + } + + fn at_possible_async(&mut self, expr: &Expr<'a>) -> PResult { + // TODO(kdy1): !this.state.containsEsc && + + Ok(self.state.potential_arrow_start == Some(expr.span_lo()) + && expr.is_ident_ref_to("async")) + } + + /// 12.2.5 Array Initializer + pub(crate) fn parse_lit(&mut self) -> PResult> { + let start = cur_pos!(self); + + let v = match cur!(self, true) { + Word(Word::Null) => { + bump!(self); + let span = span!(self, start); + Lit::Null(self.ast(Null { span })) + } + Word(Word::True) | Word(Word::False) => { + let value = is!(self, "true"); + bump!(self); + let span = span!(self, start); + + Lit::Bool(self.ast(Bool { span, value })) + } + Token::Str { .. } => match bump!(self) { + Token::Str { value, raw } => Lit::Str(self.ast(Str { + span: span!(self, start), + value, + raw: Some(raw), + })), + _ => unreachable!(), + }, + Token::Num { .. } => match bump!(self) { + Token::Num { value, raw } => Lit::Num(self.ast(Number { + span: span!(self, start), + value, + raw: Some(raw), + })), + _ => unreachable!(), + }, + Token::BigInt { .. } => match bump!(self) { + Token::BigInt { value, raw } => Lit::BigInt(self.ast(BigInt { + span: span!(self, start), + value: self.ast(*value), + raw: Some(raw), + })), + _ => unreachable!(), + }, + token => unreachable!("parse_lit should not be called for {:?}", token), + }; + Ok(v) + } + + pub(crate) fn parse_dynamic_import_or_import_meta( + &mut self, + start: BytePos, + no_call: bool, + ) -> PResult> { + if eat!(self, '.') { + self.state.found_module_item = true; + + let ident = self.parse_ident_name()?; + + match &*ident.sym { + "meta" => { + let span = span!(self, start); + if !self.ctx().can_be_module { + self.emit_err(span, SyntaxError::ImportMetaInScript); + } + let expr = MetaPropExpr { + span, + kind: MetaPropKind::ImportMeta, + }; + self.parse_subscripts( + Callee::Expr(Expr::MetaProp(self.ast(expr))), + no_call, + false, + ) + } + "source" => self.parse_dynamic_import_call(start, no_call, ImportPhase::Source), + // TODO: The proposal doesn't mention import.defer yet because it was + // pending on a decision for import.source. Wait to enable it until it's + // included in the proposal. + _ => unexpected!(self, "meta"), + } + } else { + self.parse_dynamic_import_call(start, no_call, ImportPhase::Evaluation) + } + } + + fn parse_dynamic_import_call( + &mut self, + start: BytePos, + no_call: bool, + phase: ImportPhase, + ) -> PResult> { + let import = Callee::Import(self.ast(Import { + span: span!(self, start), + phase, + })); + + self.parse_subscripts(import, no_call, false) + } + + pub(crate) fn check_assign_target(&mut self, expr: &Expr<'a>, deny_call: bool) { + if !expr.is_valid_simple_assignment_target(self.ctx().strict) { + self.emit_err(expr.span(), SyntaxError::TS2406); + } + + // We follow behavior of tsc + if self.input.syntax().typescript() && self.syntax().early_errors() { + let is_eval_or_arguments = match expr { + Expr::Ident(i) => i.is_reserved_in_strict_bind(), + _ => false, + }; + + if is_eval_or_arguments { + self.emit_strict_mode_err(expr.span(), SyntaxError::TS1100); + } + + fn should_deny(e: &Expr, deny_call: bool) -> bool { + match e { + Expr::Lit(..) => false, + Expr::Call(..) => deny_call, + Expr::Bin(..) => false, + Expr::Paren(ref p) => should_deny(&p.expr, deny_call), + + _ => true, + } + } + + // It is an early Reference Error if LeftHandSideExpression is neither + // an ObjectLiteral nor an ArrayLiteral and + // IsValidSimpleAssignmentTarget of LeftHandSideExpression is false. + if !is_eval_or_arguments + && !expr.is_valid_simple_assignment_target(self.ctx().strict) + && should_deny(expr, deny_call) + { + self.emit_err(expr.span(), SyntaxError::TS2406); + } + } + } + + fn is_start_of_left_hand_side_expr(&mut self) -> PResult { + Ok(is_one_of!( + self, "this", "super", "null", "true", "false", Num, BigInt, Str, '`', '(', '[', '{', + "function", "class", "new", Regex, IdentRef + ) || (is!(self, "import") + && (peeked_is!(self, '(') || peeked_is!(self, '<') || peeked_is!(self, '.')))) + } + + pub(crate) fn is_start_of_expr(&mut self) -> PResult { + Ok(self.is_start_of_left_hand_side_expr()? + || is_one_of!( + self, '+', '-', '~', '!', "delete", "typeof", "void", "++", "--", '<', "await", + "yield" + ) + || (is!(self, '#') && peeked_is!(self, IdentName))) + } +} + +fn unwrap_ts_non_null<'e, 'a>(mut expr: &'e Expr<'a>) -> &'e Expr<'a> { + while let Expr::TsNonNull(ts_non_null) = expr { + expr = &ts_non_null.expr; + } + + expr +} diff --git a/crates/swc_ecma_parser/src/arena/parser/expr/ops.rs b/crates/swc_ecma_parser/src/arena/parser/expr/ops.rs new file mode 100644 index 000000000000..d908cbd6b24a --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/expr/ops.rs @@ -0,0 +1,447 @@ +//! Parser for unary operations and binary operations. +use swc_common::{BytePos, Span, Spanned}; +use swc_ecma_ast::{arena::*, op}; +use tracing::trace; + +use super::Parser; +use crate::{error::SyntaxError, token::Token, PResult, Tokens}; + +impl<'a, I: Tokens> Parser<'a, I> { + /// Name from spec: 'LogicalORExpression' + pub(crate) fn parse_bin_expr(&mut self) -> PResult> { + trace_cur!(self, parse_bin_expr); + + let ctx = self.ctx(); + + let left = match self.parse_unary_expr() { + Ok(v) => v, + Err(err) => { + trace_cur!(self, parse_bin_expr__recovery_unary_err); + + match cur!(self, true) { + &tok!("in") if ctx.include_in_expr => { + self.emit_err(self.input.cur_span(), SyntaxError::TS1109); + + Expr::Invalid(self.ast(Invalid { span: err.span() })) + } + &tok!("instanceof") | &Token::BinOp(..) => { + self.emit_err(self.input.cur_span(), SyntaxError::TS1109); + + Expr::Invalid(self.ast(Invalid { span: err.span() })) + } + _ => return Err(err), + } + } + }; + + return_if_arrow!(self, left); + self.parse_bin_op_recursively(left, 0) + } + + /// Parse binary operators with the operator precedence parsing + /// algorithm. `left` is the left-hand side of the operator. + /// `minPrec` provides context that allows the function to stop and + /// defer further parser to one of its callers when it encounters an + /// operator that has a lower precedence than the set it is parsing. + /// + /// `parseExprOp` + pub(crate) fn parse_bin_op_recursively( + &mut self, + mut left: Expr<'a>, + mut min_prec: u8, + ) -> PResult> { + loop { + let (next_left, next_prec) = self.parse_bin_op_recursively_inner(left, min_prec)?; + + match &next_left { + Expr::Bin(bin_expr) if bin_expr.op == op!("&&") || bin_expr.op == op!("||") => { + if bin_expr + .left + .as_bin() + .map_or(false, |bin| bin.op == op!("??")) + { + self.emit_err(bin_expr.span(), SyntaxError::NullishCoalescingWithLogicalOp); + } + } + _ => {} + } + + min_prec = match next_prec { + Some(v) => v, + None => return Ok(next_left), + }; + + left = next_left; + } + } + + /// Returns `(left, Some(next_prec))` or `(expr, None)`. + fn parse_bin_op_recursively_inner( + &mut self, + left: Expr<'a>, + min_prec: u8, + ) -> PResult<(Expr<'a>, Option)> { + const PREC_OF_IN: u8 = 7; + + if self.input.syntax().typescript() + && PREC_OF_IN > min_prec + && !self.input.had_line_break_before_cur() + && is!(self, "as") + { + let start = left.span_lo(); + let expr = left; + let node = if peeked_is!(self, "const") { + bump!(self); // as + let _ = cur!(self, false); + bump!(self); // const + Expr::TsConstAssertion(self.ast(TsConstAssertion { + span: span!(self, start), + expr, + })) + } else { + let type_ann = self.next_then_parse_ts_type()?; + Expr::TsAs(self.ast(TsAsExpr { + span: span!(self, start), + expr, + type_ann, + })) + }; + + return self.parse_bin_op_recursively_inner(node, min_prec); + } + if self.input.syntax().typescript() + && !self.input.had_line_break_before_cur() + && is!(self, "satisfies") + { + let start = left.span_lo(); + let expr = left; + let node = { + let type_ann = self.next_then_parse_ts_type()?; + Expr::TsSatisfies(self.ast(TsSatisfiesExpr { + span: span!(self, start), + expr, + type_ann, + })) + }; + + return self.parse_bin_op_recursively_inner(node, min_prec); + } + + let ctx = self.ctx(); + // Return left on eof + let word = match cur!(self, false) { + Ok(cur) => cur, + Err(..) => return Ok((left, None)), + }; + let op = match *word { + tok!("in") if ctx.include_in_expr => op!("in"), + tok!("instanceof") => op!("instanceof"), + Token::BinOp(op) => op.into(), + _ => { + return Ok((left, None)); + } + }; + + if op.precedence() <= min_prec { + if cfg!(feature = "debug") { + trace!( + "returning {:?} without parsing {:?} because min_prec={}, prec={}", + left, + op, + min_prec, + op.precedence() + ); + } + + return Ok((left, None)); + } + bump!(self); + if cfg!(feature = "debug") { + trace!( + "parsing binary op {:?} min_prec={}, prec={}", + op, + min_prec, + op.precedence() + ); + } + match left { + // This is invalid syntax. + Expr::Unary { .. } | Expr::Await(..) if op == op!("**") => { + // Correct implementation would be returning Ok(left) and + // returning "unexpected token '**'" on next. + // But it's not useful error message. + + syntax_error!( + self, + SyntaxError::UnaryInExp { + // FIXME: Use display + left: format!("{:?}", left), + left_span: left.span(), + } + ) + } + _ => {} + } + + let right = { + let left_of_right = self.parse_unary_expr()?; + self.parse_bin_op_recursively( + left_of_right, + if op == op!("**") { + // exponential operator is right associative + op.precedence() - 1 + } else { + op.precedence() + }, + )? + }; + /* this check is for all ?? operators + * a ?? b && c for this example + * b && c => This is considered as a logical expression in the ast tree + * a => Identifier + * so for ?? operator we need to check in this case the right expression to + * have parenthesis second case a && b ?? c + * here a && b => This is considered as a logical expression in the ast tree + * c => identifier + * so now here for ?? operator we need to check the left expression to have + * parenthesis if the parenthesis is missing we raise an error and + * throw it + */ + if op == op!("??") { + match &left { + Expr::Bin(bin_expr) if bin_expr.op == op!("&&") || bin_expr.op == op!("||") => { + self.emit_err(bin_expr.span, SyntaxError::NullishCoalescingWithLogicalOp); + } + _ => {} + } + + match &right { + Expr::Bin(bin_expr) if bin_expr.op == op!("&&") || bin_expr.op == op!("||") => { + self.emit_err(bin_expr.span, SyntaxError::NullishCoalescingWithLogicalOp); + } + _ => {} + } + } + + let node = Expr::Bin(self.ast(BinExpr { + span: Span::new(left.span_lo(), right.span_hi()), + op, + left, + right, + })); + + Ok((node, Some(min_prec))) + } + + /// Parse unary expression and update expression. + /// + /// spec: 'UnaryExpression' + pub(crate) fn parse_unary_expr(&mut self) -> PResult> { + trace_cur!(self, parse_unary_expr); + let start = cur_pos!(self); + + if !self.input.syntax().jsx() && self.input.syntax().typescript() && eat!(self, '<') { + if eat!(self, "const") { + expect!(self, '>'); + let expr = self.parse_unary_expr()?; + return Ok(Expr::TsConstAssertion(self.ast(TsConstAssertion { + span: span!(self, start), + expr, + }))); + } + + return self + .parse_ts_type_assertion(start) + .map(|expr| self.ast(expr)) + .map(Expr::from); + } + + // Parse update expression + if is!(self, "++") || is!(self, "--") { + let op = if bump!(self) == tok!("++") { + op!("++") + } else { + op!("--") + }; + + let arg = self.parse_unary_expr()?; + let span = Span::new(start, arg.span_hi()); + self.check_assign_target(&arg, false); + + return Ok(Expr::Update(self.ast(UpdateExpr { + span, + prefix: true, + op, + arg, + }))); + } + + // Parse unary expression + if is_one_of!(self, "delete", "void", "typeof", '+', '-', '~', '!') { + let op = match bump!(self) { + tok!("delete") => op!("delete"), + tok!("void") => op!("void"), + tok!("typeof") => op!("typeof"), + tok!('+') => op!(unary, "+"), + tok!('-') => op!(unary, "-"), + tok!('~') => op!("~"), + tok!('!') => op!("!"), + _ => unreachable!(), + }; + let arg_start = cur_pos!(self) - BytePos(1); + let arg = match self.parse_unary_expr() { + Ok(expr) => expr, + Err(err) => { + self.emit_error(err); + Expr::Invalid(self.ast(Invalid { + span: Span::new(arg_start, arg_start), + })) + } + }; + + if op == op!("delete") { + if let Expr::Ident(ref i) = arg { + self.emit_strict_mode_err(i.span, SyntaxError::TS1102) + } + } + + if self.input.syntax().typescript() && op == op!("delete") { + match arg.unwrap_parens() { + Expr::Member(..) => {} + Expr::OptChain(opt_chain_expr) if opt_chain_expr.base.is_member() => {} + expr => { + self.emit_err(expr.span(), SyntaxError::TS2703); + } + } + } + + return Ok(Expr::Unary(self.ast(UnaryExpr { + span: Span::new(start, arg.span_hi()), + op, + arg, + }))); + } + + if is!(self, "await") { + return self.parse_await_expr(None); + } + + // UpdateExpression + let expr = self.parse_lhs_expr()?; + return_if_arrow!(self, expr); + + // Line terminator isn't allowed here. + if self.input.had_line_break_before_cur() { + return Ok(expr); + } + + if is_one_of!(self, "++", "--") { + self.check_assign_target(&expr, false); + + let op = if bump!(self) == tok!("++") { + op!("++") + } else { + op!("--") + }; + + return Ok(Expr::Update(self.ast(UpdateExpr { + span: span!(self, expr.span_lo()), + prefix: false, + op, + arg: expr, + }))); + } + Ok(expr) + } + + pub(crate) fn parse_await_expr( + &mut self, + start_of_await_token: Option, + ) -> PResult> { + let start = start_of_await_token.unwrap_or_else(|| cur_pos!(self)); + + if start_of_await_token.is_none() { + assert_and_bump!(self, "await"); + } + + if is!(self, '*') { + syntax_error!(self, SyntaxError::AwaitStar); + } + + let ctx = self.ctx(); + + let span = span!(self, start); + + if is_one_of!(self, ')', ']', ';', ',') && !ctx.in_async { + if ctx.module { + self.emit_err(span, SyntaxError::InvalidIdentInAsync); + } + + return Ok(Expr::Ident( + self.ast(Ident::new_no_ctxt("await".into(), span)), + )); + } + + if ctx.in_function && !ctx.in_async { + self.emit_err(self.input.cur_span(), SyntaxError::AwaitInFunction); + } + + if ctx.in_parameters && !ctx.in_function { + self.emit_err(span, SyntaxError::AwaitParamInAsync); + } + + let arg = self.parse_unary_expr()?; + Ok(Expr::Await(self.ast(AwaitExpr { + span: span!(self, start), + arg, + }))) + } +} + +#[cfg(test)] +mod tests { + use swc_allocator::arena::{Allocator, Box}; + use swc_common::DUMMY_SP as span; + use swc_ecma_ast::{arena::*, op}; + use swc_ecma_visit::assert_eq_ignore_span_arena; + + use crate::{arena::parser::test_parser, Syntax}; + + fn bin<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_bin_expr()) + } + + #[test] + fn simple() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + bin(&alloc, "5 + 4 * 7"), + Expr::Bin(Box::new_in( + BinExpr { + span, + op: op!(bin, "+"), + left: bin(&alloc, "5"), + right: bin(&alloc, "4 * 7"), + }, + &alloc + )) + ); + } + + #[test] + fn same_prec() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + bin(&alloc, "5 + 4 + 7"), + Expr::Bin(Box::new_in( + BinExpr { + span, + op: op!(bin, "+"), + left: bin(&alloc, "5 + 4"), + right: bin(&alloc, "7"), + }, + &alloc + )) + ); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/expr/tests.rs b/crates/swc_ecma_parser/src/arena/parser/expr/tests.rs new file mode 100644 index 000000000000..8da56ded1e80 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/expr/tests.rs @@ -0,0 +1,786 @@ +use std::hint::black_box; + +use swc_allocator::{ + arena::{Allocator, Box, Vec}, + vec, +}; +use swc_common::{FileName, SourceMap, SyntaxContext, DUMMY_SP as span}; +use swc_ecma_ast::{arena::*, op}; +use swc_ecma_visit::assert_eq_ignore_span_arena; + +use crate::{ + arena::{ + parse_file_as_expr, + parser::{bench_parser, test_parser, Bencher}, + }, + EsSyntax, Syntax, +}; + +fn syntax() -> Syntax { + Syntax::Es(EsSyntax { + allow_super_outside_method: true, + ..Default::default() + }) +} + +fn lhs<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, syntax(), |p| p.parse_lhs_expr()) +} + +fn new_expr<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, syntax(), |p| p.parse_new_expr()) +} + +fn member_expr<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, syntax(), |p| p.parse_member_expr()) +} + +fn expr<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, syntax(), |p| { + p.parse_stmt(true).map(|stmt| match stmt { + Stmt::Expr(expr) => expr.into_inner().expr, + _ => unreachable!(), + }) + }) +} +fn regex_expr(alloc: &Allocator) -> Expr<'_> { + Expr::Assign(Box::new_in( + AssignExpr { + span, + left: AssignTarget::Simple(SimpleAssignTarget::Ident(Box::new_in( + Ident::new_no_ctxt("re".into(), span).into(), + alloc, + ))), + op: AssignOp::Assign, + right: Expr::Lit(Box::new_in( + Lit::Regex(Box::new_in( + Regex { + span, + exp: "w+".into(), + flags: "".into(), + }, + alloc, + )), + alloc, + )), + }, + alloc, + )) +} +#[test] +fn regex_single_line_comment() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr( + &alloc, + r#"re = // ... + /w+/"# + ), + regex_expr(&alloc) + ) +} + +#[test] +fn regex_multi_line_comment() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!(expr(&alloc, r#"re = /* ... *//w+/"#), regex_expr(&alloc)) +} +#[test] +fn regex_multi_line_comment_with_lines() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr( + &alloc, + r#"re = + /* + ... + */ + /w+/"# + ), + regex_expr(&alloc) + ) +} + +#[test] +fn arrow_assign() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "a = b => false"), + Expr::Assign(Box::new_in( + AssignExpr { + span, + left: AssignTarget::Simple(SimpleAssignTarget::Ident(Box::new_in( + Ident::new_no_ctxt("a".into(), span).into(), + &alloc + ))), + op: op!("="), + right: expr(&alloc, "b => false"), + }, + &alloc + )) + ); +} + +#[test] +fn async_call() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "async()"), + Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Expr(expr(&alloc, "async")), + args: Vec::new_in(&alloc), + ctxt: SyntaxContext::default(), + type_args: None + }, + &alloc + )) + ); +} + +#[test] +fn async_arrow() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "async () => foo"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + is_async: true, + is_generator: false, + params: Vec::new_in(&alloc), + body: BlockStmtOrExpr::Expr(expr(&alloc, "foo")), + ctxt: SyntaxContext::default(), + return_type: None, + type_params: None, + }, + &alloc + )) + ); +} + +#[test] +fn object_rest_pat() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "({ ...a34 }) => {}"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + is_async: false, + is_generator: false, + params: vec![in &alloc; Pat::Object(Box::new_in( + ObjectPat { + span, + optional: false, + props: vec![in &alloc; ObjectPatProp::Rest(Box::new_in( + RestPat { + span, + dot3_token: span, + arg: Pat::Ident(Box::new_in(Ident::new_no_ctxt("a34".into(), span).into(), &alloc)), + type_ann: None, + } + , &alloc))], + type_ann: None + } + , &alloc))], + body: BlockStmtOrExpr::BlockStmt(Box::new_in( + BlockStmt { + span, + ctxt: SyntaxContext::default(), + stmts: Vec::new_in(&alloc) + }, + &alloc + )), + ctxt: SyntaxContext::default(), + return_type: None, + type_params: None + }, + &alloc + )) + ); +} + +#[test] +fn object_spread() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "foo = {a, ...bar, b}"), + Expr::Assign(Box::new_in( + AssignExpr { + span, + left: AssignTarget::Simple(SimpleAssignTarget::Ident(Box::new_in( + Ident::new_no_ctxt("foo".into(), span).into(), + &alloc + ))), + op: op!("="), + right: Expr::Object(Box::new_in( + ObjectLit { + span, + props: vec![in &alloc; + PropOrSpread::Prop(Box::new_in(Prop::Shorthand(Box::new_in(Ident::new_no_ctxt("a".into(), span), &alloc)), &alloc)), + PropOrSpread::Spread(Box::new_in( + SpreadElement { + dot3_token: span, + expr: Expr::Ident(Box::new_in(Ident::new_no_ctxt("bar".into(), span), &alloc)), + } + , &alloc)), + PropOrSpread::Prop(Box::new_in(Prop::Shorthand(Box::new_in(Ident::new_no_ctxt("b".into(), span),&alloc)), &alloc)), + ] + }, + &alloc + )) + }, + &alloc + )) + ); +} + +#[test] +fn new_expr_should_not_eat_too_much() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + new_expr(&alloc, "new Date().toString()"), + Expr::Member(Box::new_in( + MemberExpr { + span, + obj: member_expr(&alloc, "new Date()"), + prop: MemberProp::Ident(Box::new_in( + IdentName::new("toString".into(), span), + &alloc + )), + }, + &alloc + )) + ); +} +#[test] +fn lhs_expr_as_new_expr_prod() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + lhs(&alloc, "new Date.toString()"), + Expr::New(Box::new_in( + NewExpr { + span, + callee: lhs(&alloc, "Date.toString"), + args: Some(Vec::new_in(&alloc)), + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ); +} + +#[test] +fn lhs_expr_as_call() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + lhs(&alloc, "new Date.toString()()"), + Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Expr(lhs(&alloc, "new Date.toString()")), + args: Vec::new_in(&alloc), + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ) +} + +#[test] +fn arrow_fn_no_args() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "() => 1"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + is_async: false, + is_generator: false, + params: Vec::new_in(&alloc), + body: BlockStmtOrExpr::Expr(expr(&alloc, "1")), + ctxt: SyntaxContext::default(), + return_type: None, + type_params: None, + }, + &alloc + )) + ); +} +#[test] +fn arrow_fn() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "(a) => 1"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + is_async: false, + is_generator: false, + params: vec![in &alloc; Pat::Ident(Box::new_in(Ident::new_no_ctxt("a".into(), span).into(), &alloc))], + body: BlockStmtOrExpr::Expr(expr(&alloc, "1")), + ctxt: SyntaxContext::default(), + return_type: None, + type_params: None + }, + &alloc + )) + ); +} +#[test] +fn arrow_fn_rest() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "(...a) => 1"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + is_async: false, + is_generator: false, + params: vec![in &alloc; Pat::Rest(Box::new_in( + RestPat { + span, + dot3_token: span, + arg: Pat::Ident(Box::new_in(Ident::new_no_ctxt("a".into(), span).into(), &alloc)), + type_ann: None + } + , &alloc))], + body: BlockStmtOrExpr::Expr(expr(&alloc, "1")), + ctxt: SyntaxContext::default(), + return_type: None, + type_params: None, + }, + &alloc + )) + ); +} +#[test] +fn arrow_fn_no_paren() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "a => 1"), + Expr::Arrow(Box::new_in( + ArrowExpr { + span, + params: vec![in &alloc; Pat::Ident(Box::new_in(Ident::new_no_ctxt("a".into(), span).into(), &alloc))], + body: BlockStmtOrExpr::Expr(expr(&alloc, "1")), + ctxt: SyntaxContext::default(), + is_async: false, + is_generator: false, + return_type: None, + type_params: None + }, + &alloc + )) + ); +} + +#[test] +fn new_no_paren() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "new a"), + Expr::New(Box::new_in( + NewExpr { + span, + callee: expr(&alloc, "a"), + args: None, + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ); +} + +#[test] +fn new_new_no_paren() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "new new a"), + Expr::New(Box::new_in( + NewExpr { + span, + callee: expr(&alloc, "new a"), + args: None, + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ); +} + +#[test] +fn array_lit() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "[a,,,,, ...d,, e]"), + Expr::Array(Box::new_in( + ArrayLit { + span, + elems: vec![in &alloc; + Some(ExprOrSpread { + spread: None, + expr: Expr::Ident(Box::new_in(Ident::new_no_ctxt("a".into(), span), &alloc)), + }), + None, + None, + None, + None, + Some(ExprOrSpread { + spread: Some(span), + expr: Expr::Ident(Box::new_in(Ident::new_no_ctxt("d".into(), span), &alloc)), + }), + None, + Some(ExprOrSpread { + spread: None, + expr: Expr::Ident(Box::new_in(Ident::new_no_ctxt("e".into(), span), &alloc)), + }), + ] + }, + &alloc + )) + ); +} + +#[test] +fn max_integer() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "1.7976931348623157e+308"), + Expr::Lit(Box::new_in( + Lit::Num(Box::new_in( + Number { + span, + value: 1.797_693_134_862_315_7e308, + raw: Some("1.7976931348623157e+308".into()), + }, + &alloc + )), + &alloc + )) + ) +} + +#[test] +fn iife() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "(function(){})()"), + Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Expr(expr(&alloc, "(function(){})")), + args: Vec::new_in(&alloc), + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ) +} + +#[test] +fn issue_319_1() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "obj(({ async f() { await g(); } }));"), + Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Expr(expr(&alloc, "obj")), + args: vec![in &alloc; ExprOrSpread { + spread: None, + expr: expr(&alloc, "({ async f() { await g(); } })"), + }], + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ); +} + +#[test] +fn issue_328() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser( + &alloc, + "import('test')", + Syntax::Es(Default::default()), + |p| { p.parse_stmt(true) } + ), + Stmt::Expr(Box::new_in( + ExprStmt { + span, + expr: Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Import(Box::new_in( + Import { + span, + phase: Default::default() + }, + &alloc + )), + args: vec![in &alloc; ExprOrSpread { + spread: None, + expr: Expr::Lit(Box::new_in( + Lit::Str(Box::new_in( + Str { + span, + value: "test".into(), + raw: Some("'test'".into()), + } + , &alloc)), + &alloc) + ), + }], + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + }, + &alloc + )) + ); +} + +#[test] +fn issue_337() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "const foo = 'bar' in bas ? 'beep' : 'boop';", + Default::default(), + |p| p.parse_module(), + ); +} + +#[test] +fn issue_350() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr( + &alloc, + r#""ok\ +ok\ +hehe.";"#, + ), + Expr::Lit(Box::new_in( + Lit::Str(Box::new_in( + Str { + span, + value: "okokhehe.".into(), + raw: Some("\"ok\\\nok\\\nhehe.\"".into()), + }, + &alloc + )), + &alloc + )) + ); +} + +#[test] +fn issue_380() { + let alloc = Allocator::default(); + expr( + &alloc, + " import('../foo/bar') + .then(bar => { + // bar should be {default: DEFAULT_EXPORTED_THING_IN_BAR} or at least what it is supposed \ + to be + }) +}", + ); +} + +#[test] +fn issue_675() { + let alloc = Allocator::default(); + expr( + &alloc, + "fn = function () { Object.setPrototypeOf(this, new.target.prototype); }", + ); +} + +#[test] +fn super_expr() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "super.foo();"), + Expr::Call(Box::new_in( + CallExpr { + span, + callee: Callee::Expr(Expr::SuperProp(Box::new_in( + SuperPropExpr { + span, + obj: Super { span }, + prop: SuperProp::Ident(Box::new_in( + IdentName { + span, + sym: "foo".into(), + }, + &alloc + )) + }, + &alloc + ))), + args: Vec::new_in(&alloc), + ctxt: SyntaxContext::default(), + type_args: None, + }, + &alloc + )) + ); +} + +#[test] +fn super_expr_computed() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + expr(&alloc, "super[a] ??= 123;"), + Expr::Assign(Box::new_in( + AssignExpr { + span, + op: AssignOp::NullishAssign, + left: AssignTarget::Simple(SimpleAssignTarget::SuperProp(Box::new_in( + SuperPropExpr { + span, + obj: Super { span }, + prop: SuperProp::Computed(Box::new_in( + ComputedPropName { + span, + expr: Expr::Ident(Box::new_in( + Ident { + span, + sym: "a".into(), + ctxt: SyntaxContext::default(), + optional: false, + }, + &alloc + )), + }, + &alloc + )) + }, + &alloc + ))), + right: Expr::Lit(Box::new_in( + Lit::Num(Box::new_in( + Number { + span, + value: 123f64, + raw: Some("123".into()), + }, + &alloc + )), + &alloc + )) + }, + &alloc + )) + ); +} + +#[test] +fn issue_3672_1() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "report({ + fix: fixable ? null : (): RuleFix => {}, +});", + Syntax::Typescript(Default::default()), + |p| p.parse_module(), + ); +} + +#[test] +fn issue_3672_2() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "f(a ? (): void => { } : (): void => { })", + Syntax::Typescript(Default::default()), + |p| p.parse_module(), + ); +} + +#[test] +fn issue_5947() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "[a as number, b as number, c as string] = [1, 2, '3']", + Syntax::Typescript(Default::default()), + |p| p.parse_module(), + ); +} + +#[test] +fn issue_6781() { + let alloc = Allocator::default(); + let cm = SourceMap::default(); + let fm = cm.new_source_file(FileName::Anon.into(), "import.meta.env".to_string()); + let mut errors = std::vec::Vec::new(); + let expr = parse_file_as_expr( + &alloc, + &fm, + Default::default(), + Default::default(), + None, + &mut errors, + ); + assert!(expr.is_ok()); + assert!(errors.is_empty()); +} + +#[bench] +fn bench_new_expr_ts(b: &mut Bencher) { + bench_parser( + b, + "new Foo()", + Syntax::Typescript(Default::default()), + |p| { + black_box(p.parse_expr()?); + Ok(()) + }, + ); +} + +#[bench] +fn bench_new_expr_es(b: &mut Bencher) { + bench_parser(b, "new Foo()", Syntax::Es(Default::default()), |p| { + black_box(p.parse_expr()?); + Ok(()) + }); +} + +#[bench] +fn bench_member_expr_ts(b: &mut Bencher) { + bench_parser( + b, + "a.b.c.d.e.f", + Syntax::Typescript(Default::default()), + |p| { + black_box(p.parse_expr()?); + Ok(()) + }, + ); +} + +#[bench] +fn bench_member_expr_es(b: &mut Bencher) { + bench_parser(b, "a.b.c.d.e.f", Syntax::Es(Default::default()), |p| { + black_box(p.parse_expr()?); + Ok(()) + }); +} diff --git a/crates/swc_ecma_parser/src/arena/parser/expr/verifier.rs b/crates/swc_ecma_parser/src/arena/parser/expr/verifier.rs new file mode 100644 index 000000000000..f8e039500c62 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/expr/verifier.rs @@ -0,0 +1,47 @@ +use swc_ecma_ast::arena::Expr; +#[cfg(feature = "verify")] +use swc_ecma_visit::{noop_visit_type, Visit, VisitWith}; + +use super::Parser; +use crate::{PResult, Tokens}; + +impl<'a, I: Tokens> Parser<'a, I> { + #[cfg(feature = "verify")] + pub(in crate::parser) fn verify_expr(&mut self, expr: Box) -> PResult> { + let mut v = Verifier { errors: Vec::new() }; + + v.visit_expr(&expr); + + for (span, error) in v.errors { + self.emit_err(span, error); + } + + Ok(expr) + } + + #[cfg(not(feature = "verify"))] + pub(crate) fn verify_expr(&mut self, expr: Expr<'a>) -> PResult> { + Ok(expr) + } +} + +#[cfg(feature = "verify")] +pub(crate) struct Verifier { + pub errors: Vec<(Span, SyntaxError)>, +} + +#[cfg(feature = "verify")] +impl Visit for Verifier { + noop_visit_type!(); + + fn visit_assign_prop(&mut self, p: &AssignProp) { + self.errors.push((p.span(), SyntaxError::AssignProperty)); + } + + fn visit_expr(&mut self, e: &Expr) { + match *e { + Expr::Fn(..) | Expr::Arrow(..) => {} + _ => e.visit_children_with(self), + } + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/ident.rs b/crates/swc_ecma_parser/src/arena/parser/ident.rs new file mode 100644 index 000000000000..46f1f4b972a4 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/ident.rs @@ -0,0 +1,188 @@ +//! 12.1 Identifiers +use either::Either; +use swc_atoms::atom; +use swc_common::BytePos; +use swc_ecma_ast::arena::*; + +use super::Parser; +use crate::{ + error::SyntaxError, + token::{IdentLike, Keyword, Token, Word}, + PResult, Tokens, +}; + +impl<'a, I: Tokens> Parser<'a, I> { + pub(crate) fn parse_maybe_private_name(&mut self) -> PResult> { + let is_private = is!(self, '#'); + + if is_private { + self.parse_private_name().map(Either::Left) + } else { + self.parse_ident_name().map(Either::Right) + } + } + + pub(crate) fn parse_private_name(&mut self) -> PResult { + let start = cur_pos!(self); + assert_and_bump!(self, '#'); + + let hash_end = self.input.prev_span().hi; + if self.input.cur_pos() - hash_end != BytePos(0) { + syntax_error!( + self, + span!(self, start), + SyntaxError::SpaceBetweenHashAndIdent + ); + } + + let id = self.parse_ident_name()?; + Ok(PrivateName { + span: span!(self, start), + name: id.sym, + }) + } + + /// IdentifierReference + pub(crate) fn parse_ident_ref(&mut self) -> PResult { + let ctx = self.ctx(); + + self.parse_ident(!ctx.in_generator, !ctx.in_async) + } + + /// LabelIdentifier + pub(crate) fn parse_label_ident(&mut self) -> PResult { + let ctx = self.ctx(); + + self.parse_ident(!ctx.in_generator, !ctx.in_async) + } + + /// Use this when spec says "IdentifierName". + /// This allows idents like `catch`. + pub(crate) fn parse_ident_name(&mut self) -> PResult { + let in_type = self.ctx().in_type; + + let start = cur_pos!(self); + + let w = match cur!(self, true) { + Word(..) => match bump!(self) { + Word(w) => w.into(), + _ => unreachable!(), + }, + + Token::JSXName { .. } if in_type => match bump!(self) { + Token::JSXName { name } => name, + _ => unreachable!(), + }, + + _ => syntax_error!(self, SyntaxError::ExpectedIdent), + }; + + Ok(IdentName::new(w, span!(self, start))) + } + + // https://tc39.es/ecma262/#prod-ModuleExportName + pub(crate) fn parse_module_export_name(&mut self) -> PResult> { + let module_export_name = match cur!(self, false) { + Ok(&Token::Str { .. }) => match self.parse_lit()? { + Lit::Str(str_lit) => ModuleExportName::Str(str_lit), + _ => unreachable!(), + }, + Ok(&Word(..)) => { + let ident = self.parse_ident_name()?.into(); + ModuleExportName::Ident(self.ast(ident)) + } + _ => { + unexpected!(self, "identifier or string"); + } + }; + Ok(module_export_name) + } + + /// Identifier + /// + /// In strict mode, "yield" is SyntaxError if matched. + pub(crate) fn parse_ident(&mut self, incl_yield: bool, incl_await: bool) -> PResult { + trace_cur!(self, parse_ident); + + let start = cur_pos!(self); + + let word = self.parse_with(|p| { + let w = match cur!(p, true) { + &Word(..) => match bump!(p) { + Word(w) => w, + _ => unreachable!(), + }, + _ => syntax_error!(p, SyntaxError::ExpectedIdent), + }; + + // Spec: + // It is a Syntax Error if this phrase is contained in strict mode code and the + // StringValue of IdentifierName is: "implements", "interface", "let", + // "package", "private", "protected", "public", "static", or "yield". + match w { + Word::Ident(ref name @ ident_like!("enum")) => { + p.emit_err( + p.input.prev_span(), + SyntaxError::InvalidIdentInStrict(name.clone().into()), + ); + } + Word::Keyword(name @ Keyword::Yield) | Word::Keyword(name @ Keyword::Let) => { + p.emit_strict_mode_err( + p.input.prev_span(), + SyntaxError::InvalidIdentInStrict(name.into_js_word()), + ); + } + + Word::Ident( + ref name @ ident_like!("static") + | ref name @ ident_like!("implements") + | ref name @ ident_like!("interface") + | ref name @ ident_like!("package") + | ref name @ ident_like!("private") + | ref name @ ident_like!("protected") + | ref name @ ident_like!("public"), + ) => { + p.emit_strict_mode_err( + p.input.prev_span(), + SyntaxError::InvalidIdentInStrict(name.clone().into()), + ); + } + _ => {} + } + + // Spec: + // It is a Syntax Error if StringValue of IdentifierName is the same String + // value as the StringValue of any ReservedWord except for yield or await. + match w { + Word::Keyword(Keyword::Await) if p.ctx().in_declare => Ok(atom!("await")), + + Word::Keyword(Keyword::Await) if p.ctx().in_static_block => { + syntax_error!(p, p.input.prev_span(), SyntaxError::ExpectedIdent) + } + + // It is a Syntax Error if the goal symbol of the syntactic grammar is Module + // and the StringValue of IdentifierName is "await". + Word::Keyword(Keyword::Await) if p.ctx().module | p.ctx().in_async => { + syntax_error!(p, p.input.prev_span(), SyntaxError::InvalidIdentInAsync) + } + Word::Keyword(Keyword::This) if p.input.syntax().typescript() => Ok(atom!("this")), + Word::Keyword(Keyword::Let) => Ok(atom!("let")), + Word::Ident(ident) => { + if matches!(&ident, IdentLike::Other(arguments) if &**arguments == "arguments") + && p.ctx().in_class_field + { + p.emit_err(p.input.prev_span(), SyntaxError::ArgumentsInClassField) + } + Ok(ident.into()) + } + Word::Keyword(Keyword::Yield) if incl_yield => Ok(atom!("yield")), + Word::Keyword(Keyword::Await) if incl_await => Ok(atom!("await")), + Word::Keyword(..) | Word::Null | Word::True | Word::False => { + syntax_error!(p, p.input.prev_span(), SyntaxError::ExpectedIdent) + } + } + })?; + + Ok(Ident::new_no_ctxt(word, span!(self, start))) + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/input.rs b/crates/swc_ecma_parser/src/arena/parser/input.rs new file mode 100644 index 000000000000..ef6196e292c0 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/input.rs @@ -0,0 +1,299 @@ +use debug_unreachable::debug_unreachable; +use swc_common::{BytePos, Span}; + +use super::Parser; +use crate::{ + lexer::{self}, + token::*, + Context, EsVersion, Syntax, Tokens, +}; + +/// This struct is responsible for managing current token and peeked token. +#[derive(Clone)] +pub(crate) struct Buffer { + iter: I, + /// Span of the previous token. + prev_span: Span, + cur: Option, + /// Peeked token + next: Option, +} + +impl Parser<'_, I> { + pub fn input(&mut self) -> &mut I { + &mut self.input.iter + } + + pub(crate) fn input_ref(&self) -> &I { + &self.input.iter + } +} + +impl Buffer { + pub fn new(lexer: I) -> Self { + let start_pos = lexer.start_pos(); + Buffer { + iter: lexer, + cur: None, + prev_span: Span::new(start_pos, start_pos), + next: None, + } + } + + pub fn store(&mut self, token: Token) { + debug_assert!(self.next.is_none()); + debug_assert!(self.cur.is_none()); + let span = self.prev_span; + + self.cur = Some(TokenAndSpan { + span, + token, + had_line_break: false, + }); + } + + #[allow(dead_code)] + pub fn cur_debug(&self) -> Option<&Token> { + self.cur.as_ref().map(|it| &it.token) + } + + #[cold] + #[inline(never)] + pub fn dump_cur(&mut self) -> String { + match self.cur() { + Some(v) => format!("{:?}", v), + None => "".to_string(), + } + } + + /// Returns current token. + pub fn bump(&mut self) -> Token { + let prev = match self.cur.take() { + Some(t) => t, + None => unsafe { + debug_unreachable!( + "Current token is `None`. Parser should not call bump() without knowing \ + current token" + ) + }, + }; + self.prev_span = prev.span; + + prev.token + } + + pub fn knows_cur(&self) -> bool { + self.cur.is_some() + } + + pub fn peek(&mut self) -> Option<&Token> { + debug_assert!( + self.cur.is_some(), + "parser should not call peek() without knowing current token" + ); + + if self.next.is_none() { + self.next = self.iter.next(); + } + + self.next.as_ref().map(|ts| &ts.token) + } + + /// Returns true on eof. + pub fn had_line_break_before_cur(&mut self) -> bool { + self.cur(); + + self.cur + .as_ref() + .map(|it| it.had_line_break) + .unwrap_or_else(|| true) + } + + /// This returns true on eof. + pub fn has_linebreak_between_cur_and_peeked(&mut self) -> bool { + let _ = self.peek(); + self.next + .as_ref() + .map(|item| item.had_line_break) + .unwrap_or({ + // return true on eof. + true + }) + } + + /// Get current token. Returns `None` only on eof. + #[inline] + pub fn cur(&mut self) -> Option<&Token> { + if self.cur.is_none() { + // If we have peeked a token, take it instead of calling lexer.next() + self.cur = self.next.take().or_else(|| self.iter.next()); + } + + match &self.cur { + Some(v) => Some(&v.token), + None => None, + } + } + + #[inline] + pub fn cut_lshift(&mut self) { + debug_assert!( + self.is(&tok!("<<")), + "parser should only call cut_lshift when encountering LShift token" + ); + self.cur = Some(TokenAndSpan { + token: tok!('<'), + span: self.cur_span().with_lo(self.cur_span().lo + BytePos(1)), + had_line_break: false, + }); + } + + pub fn merge_lt_gt(&mut self) { + debug_assert!( + self.is(&tok!('<')) || self.is(&tok!('>')), + "parser should only call merge_lt_gt when encountering '<' or '>' token" + ); + + let span = self.cur_span(); + + if self.peek().is_none() { + return; + } + + let next = self.next.as_ref().unwrap(); + + if span.hi != next.span.lo { + return; + } + + let cur = self.cur.take().unwrap(); + let next = self.next.take().unwrap(); + + let token = match (&cur.token, &next.token) { + (tok!('>'), tok!('>')) => tok!(">>"), + (tok!('>'), tok!('=')) => tok!(">="), + (tok!('>'), tok!(">>")) => tok!(">>>"), + (tok!('>'), tok!(">=")) => tok!(">>="), + (tok!('>'), tok!(">>=")) => tok!(">>>="), + (tok!('<'), tok!('<')) => tok!("<<"), + (tok!('<'), tok!('=')) => tok!("<="), + (tok!('<'), tok!("<=")) => tok!("<<="), + + _ => { + self.cur = Some(cur); + self.next = Some(next); + return; + } + }; + let span = span.with_hi(next.span.hi); + + self.cur = Some(TokenAndSpan { + token, + span, + had_line_break: cur.had_line_break, + }); + } + + #[inline] + pub fn is(&mut self, expected: &Token) -> bool { + match self.cur() { + Some(t) => *expected == *t, + _ => false, + } + } + + #[inline] + pub fn eat(&mut self, expected: &Token) -> bool { + let v = self.is(expected); + if v { + self.bump(); + } + v + } + + /// Returns start of current token. + #[inline] + pub fn cur_pos(&mut self) -> BytePos { + let _ = self.cur(); + self.cur + .as_ref() + .map(|item| item.span.lo) + .unwrap_or_else(|| { + // eof + self.last_pos() + }) + } + + #[inline] + pub fn cur_span(&self) -> Span { + let data = self + .cur + .as_ref() + .map(|item| item.span) + .unwrap_or(self.prev_span); + + Span::new(data.lo, data.hi) + } + + /// Returns last byte position of previous token. + #[inline] + pub fn last_pos(&self) -> BytePos { + self.prev_span.hi + } + + /// Returns span of the previous token. + #[inline] + pub fn prev_span(&self) -> Span { + self.prev_span + } + + #[inline] + pub(crate) fn get_ctx(&self) -> Context { + self.iter.ctx() + } + + #[inline] + pub(crate) fn set_ctx(&mut self, ctx: Context) { + self.iter.set_ctx(ctx); + } + + #[inline] + pub fn syntax(&self) -> Syntax { + self.iter.syntax() + } + + #[inline] + pub fn target(&self) -> EsVersion { + self.iter.target() + } + + #[inline] + pub(crate) fn set_expr_allowed(&mut self, allow: bool) { + self.iter.set_expr_allowed(allow) + } + + #[inline] + pub fn set_next_regexp(&mut self, start: Option) { + self.iter.set_next_regexp(start); + } + + #[inline] + pub(crate) fn token_context(&self) -> &lexer::TokenContexts { + self.iter.token_context() + } + + #[inline] + pub(crate) fn token_context_mut(&mut self) -> &mut lexer::TokenContexts { + self.iter.token_context_mut() + } + + #[inline] + pub(crate) fn set_token_context(&mut self, c: lexer::TokenContexts) { + self.iter.set_token_context(c) + } + + #[inline] + pub(crate) fn end_pos(&self) -> BytePos { + self.iter.end_pos() + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/jsx.rs b/crates/swc_ecma_parser/src/arena/parser/jsx.rs new file mode 100644 index 000000000000..ca6a6f62c93f --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/jsx.rs @@ -0,0 +1,478 @@ +use either::Either; +use swc_allocator::arena::Vec; +use swc_atoms::JsWord; +use swc_common::{BytePos, Span, Spanned}; +use swc_ecma_ast::arena::*; + +use super::{PResult, Parser, Token, Tokens}; +use crate::{error::SyntaxError, Context}; + +#[cfg(test)] +mod tests; + +impl<'a, I: Tokens> Parser<'a, I> { + /// Parse next token as JSX identifier + pub(crate) fn parse_jsx_ident(&mut self) -> PResult { + debug_assert!(self.input.syntax().jsx()); + trace_cur!(self, parse_jsx_ident); + + let ctx = self.ctx(); + match *cur!(self, true) { + Token::JSXName { .. } => match bump!(self) { + Token::JSXName { name } => { + let span = self.input.prev_span(); + Ok(Ident::new_no_ctxt(name, span)) + } + _ => unreachable!(), + }, + _ if ctx.in_forced_jsx_context => self.parse_ident_ref(), + _ => unexpected!(self, "jsx identifier"), + } + } + + /// Parse namespaced identifier. + pub(crate) fn parse_jsx_namespaced_name(&mut self) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + trace_cur!(self, parse_jsx_namespaced_name); + let start = cur_pos!(self); + + let ns = self.parse_jsx_ident()?.into(); + if !eat!(self, ':') { + return Ok(JSXAttrName::Ident(self.ast(ns))); + } + + let name = self.parse_jsx_ident().map(IdentName::from)?; + Ok(JSXAttrName::JSXNamespacedName(self.ast( + JSXNamespacedName { + span: Span::new(start, name.span.hi), + ns, + name, + }, + ))) + } + + /// Parses element name in any form - namespaced, member or single + /// identifier. + pub(crate) fn parse_jsx_element_name(&mut self) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + trace_cur!(self, parse_jsx_element_name); + let start = cur_pos!(self); + + let mut node = match self.parse_jsx_namespaced_name()? { + JSXAttrName::Ident(i) => JSXElementName::Ident(self.ast(i.into_inner().into())), + JSXAttrName::JSXNamespacedName(i) => JSXElementName::JSXNamespacedName(i), + }; + while eat!(self, '.') { + let prop = self.parse_jsx_ident().map(IdentName::from)?; + let new_node = JSXElementName::JSXMemberExpr(self.ast(JSXMemberExpr { + span: span!(self, start), + obj: match node { + JSXElementName::Ident(i) => JSXObject::Ident(i), + JSXElementName::JSXMemberExpr(i) => JSXObject::JSXMemberExpr(i), + _ => unimplemented!("JSXNamespacedName -> JSXObject"), + }, + prop, + })); + node = new_node; + } + Ok(node) + } + + /// Parses any type of JSX attribute value. + /// + /// TODO(kdy1): Change return type to JSXAttrValue + pub(crate) fn parse_jsx_attr_value(&mut self) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + trace_cur!(self, parse_jsx_attr_value); + + let start = cur_pos!(self); + + match *cur!(self, true) { + tok!('{') => { + let node = self.parse_jsx_expr_container(start)?; + + match node.expr { + JSXExpr::JSXEmptyExpr(..) => { + syntax_error!(self, span!(self, start), SyntaxError::EmptyJSXAttr) + } + JSXExpr::Expr(..) => Ok(JSXAttrValue::JSXExprContainer(self.ast(node))), + } + } + Token::Str { .. } => { + let lit = self.parse_lit()?; + Ok(JSXAttrValue::Lit(self.ast(lit))) + } + Token::JSXTagStart => { + let expr = self.parse_jsx_element()?; + match expr { + Either::Left(n) => Ok(JSXAttrValue::JSXFragment(self.ast(n))), + Either::Right(n) => Ok(JSXAttrValue::JSXElement(self.ast(n))), + } + } + + _ => { + let span = self.input.cur_span(); + syntax_error!(self, span, SyntaxError::InvalidJSXValue) + } + } + } + + /// JSXEmptyExpression is unique type since it doesn't actually parse + /// anything, and so it should start at the end of last read token (left + /// brace) and finish at the beginning of the next one (right brace). + pub(crate) fn parse_jsx_empty_expr(&mut self) -> PResult { + debug_assert!(self.input.syntax().jsx()); + let start = cur_pos!(self); + + Ok(JSXEmptyExpr { + span: Span::new(start, start), + }) + } + + /// Parse JSX spread child + pub(crate) fn parse_jsx_spread_child(&mut self) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + let start = cur_pos!(self); + expect!(self, '{'); + expect!(self, "..."); + let expr = self.parse_expr()?; + expect!(self, '}'); + + Ok(JSXSpreadChild { + span: span!(self, start), + expr, + }) + } + + /// Parses JSX expression enclosed into curly brackets. + pub(crate) fn parse_jsx_expr_container(&mut self, _: BytePos) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + + let start = cur_pos!(self); + bump!(self); + let expr = if is!(self, '}') { + self.parse_jsx_empty_expr() + .map(|expr| self.ast(expr)) + .map(JSXExpr::JSXEmptyExpr)? + } else { + if is!(self, "...") { + bump!(self); + } + self.parse_expr().map(JSXExpr::Expr)? + }; + expect!(self, '}'); + Ok(JSXExprContainer { + span: span!(self, start), + expr, + }) + } + + /// Parses following JSX attribute name-value pair. + pub(crate) fn parse_jsx_attr(&mut self) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + let start = cur_pos!(self); + + let _tracing = debug_tracing!(self, "parse_jsx_attr"); + + if eat!(self, '{') { + let dot3_start = cur_pos!(self); + expect!(self, "..."); + let dot3_token = span!(self, dot3_start); + let expr = self.parse_assignment_expr()?; + expect!(self, '}'); + return Ok(JSXAttrOrSpread::SpreadElement( + self.ast(SpreadElement { dot3_token, expr }), + )); + } + + let name = self.parse_jsx_namespaced_name()?; + let value = if eat!(self, '=') { + let ctx = Context { + in_cond_expr: false, + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_jsx_attr_value().map(Some)? + } else { + None + }; + + Ok(JSXAttrOrSpread::JSXAttr(self.ast(JSXAttr { + span: span!(self, start), + name, + value, + }))) + } + + /// Parses JSX opening tag starting after "<". + pub(crate) fn parse_jsx_opening_element_at( + &mut self, + start: BytePos, + ) -> PResult>> { + debug_assert!(self.input.syntax().jsx()); + + if eat!(self, JSXTagEnd) { + return Ok(Either::Left(JSXOpeningFragment { + span: span!(self, start), + })); + } + + let ctx = Context { + should_not_lex_lt_or_gt_as_type: false, + ..self.ctx() + }; + let name = self.with_ctx(ctx).parse_jsx_element_name()?; + self.parse_jsx_opening_element_after_name(start, name) + .map(Either::Right) + } + + /// `jsxParseOpeningElementAfterName` + pub(crate) fn parse_jsx_opening_element_after_name( + &mut self, + start: BytePos, + name: JSXElementName<'a>, + ) -> PResult> { + debug_assert!(self.input.syntax().jsx()); + + let type_args = if self.input.syntax().typescript() && is!(self, '<') { + self.try_parse_ts(|p| p.parse_ts_type_args().map(Some)) + } else { + None + }; + + let mut attrs = Vec::new_in(self.alloc); + while cur!(self, false).is_ok() { + trace_cur!(self, parse_jsx_opening__attrs_loop); + + if is!(self, '/') || is!(self, JSXTagEnd) { + break; + } + + let attr = self.parse_jsx_attr()?; + attrs.push(attr); + } + let self_closing = eat!(self, '/'); + if !eat!(self, JSXTagEnd) & !(self.ctx().in_forced_jsx_context && eat!(self, '>')) { + unexpected!(self, "> (jsx closing tag)"); + } + Ok(JSXOpeningElement { + span: span!(self, start), + name, + attrs, + self_closing, + type_args, + }) + } + + /// Parses JSX closing tag starting after " PResult>> { + debug_assert!(self.input.syntax().jsx()); + + if eat!(self, JSXTagEnd) { + return Ok(Either::Left(JSXClosingFragment { + span: span!(self, start), + })); + } + + let name = self.parse_jsx_element_name()?; + expect!(self, JSXTagEnd); + Ok(Either::Right(JSXClosingElement { + span: span!(self, start), + name, + })) + } + + /// Parses entire JSX element, including it"s opening tag + /// (starting after "<"), attributes, contents and closing tag. + /// + /// babel: `jsxParseElementAt` + pub(crate) fn parse_jsx_element_at( + &mut self, + start_pos: BytePos, + ) -> PResult, JSXElement<'a>>> { + debug_assert!(self.input.syntax().jsx()); + + let _ = cur!(self, true); + let start = cur_pos!(self); + let forced_jsx_context = match bump!(self) { + tok!('<') => true, + Token::JSXTagStart => false, + _ => unreachable!(), + }; + + let ctx = Context { + in_forced_jsx_context: forced_jsx_context, + should_not_lex_lt_or_gt_as_type: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + let _tracing = debug_tracing!(p, "parse_jsx_element"); + + let opening_element = p.parse_jsx_opening_element_at(start_pos)?; + + trace_cur!(p, parse_jsx_element__after_opening_element); + + let mut children = Vec::new_in(p.alloc); + let mut closing_element = None; + + let self_closing = match opening_element { + Either::Right(ref el) => el.self_closing, + _ => false, + }; + + if !self_closing { + 'contents: loop { + match *cur!(p, true) { + Token::JSXTagStart => { + let start = cur_pos!(p); + + if peeked_is!(p, '/') { + bump!(p); // JSXTagStart + let _ = cur!(p, true); + assert_and_bump!(p, '/'); + + closing_element = + p.parse_jsx_closing_element_at(start).map(Some)?; + break 'contents; + } + + children.push(p.parse_jsx_element_at(start).map(|e| match e { + Either::Left(e) => JSXElementChild::from(p.ast(e)), + Either::Right(e) => JSXElementChild::from(p.ast(e)), + })?); + } + Token::JSXText { .. } => children.push( + p.parse_jsx_text() + .map(|jsx| p.ast(jsx)) + .map(JSXElementChild::from)?, + ), + tok!('{') => { + let start = cur_pos!(p); + if peeked_is!(p, "...") { + children.push( + p.parse_jsx_spread_child() + .map(|jsx| p.ast(jsx)) + .map(JSXElementChild::from)?, + ); + } else { + children.push( + p.parse_jsx_expr_container(start) + .map(|jsx| p.ast(jsx)) + .map(JSXElementChild::from)?, + ); + } + } + _ => unexpected!(p, "< (jsx tag start), jsx text or {"), + } + } + } + let span = span!(p, start); + + Ok(match (opening_element, closing_element) { + (Either::Left(..), Some(Either::Right(closing))) => { + syntax_error!(p, closing.span(), SyntaxError::JSXExpectedClosingTagForLtGt); + } + (Either::Right(opening), Some(Either::Left(closing))) => { + syntax_error!( + p, + closing.span(), + SyntaxError::JSXExpectedClosingTag { + tag: get_qualified_jsx_name(&opening.name) + } + ); + } + (Either::Left(opening), Some(Either::Left(closing))) => Either::Left(JSXFragment { + span, + opening, + children, + closing, + }), + (Either::Right(opening), None) => Either::Right(JSXElement { + span, + opening, + children, + closing: None, + }), + (Either::Right(opening), Some(Either::Right(closing))) => { + if get_qualified_jsx_name(&closing.name) + != get_qualified_jsx_name(&opening.name) + { + syntax_error!( + p, + closing.span(), + SyntaxError::JSXExpectedClosingTag { + tag: get_qualified_jsx_name(&opening.name) + } + ); + } + Either::Right(JSXElement { + span, + opening, + children, + closing: Some(closing), + }) + } + _ => unreachable!(), + }) + }) + } + + /// Parses entire JSX element from current position. + /// + /// babel: `jsxParseElement` + pub(crate) fn parse_jsx_element(&mut self) -> PResult, JSXElement<'a>>> { + trace_cur!(self, parse_jsx_element); + + debug_assert!(self.input.syntax().jsx()); + debug_assert!({ matches!(*cur!(self, true), Token::JSXTagStart | tok!('<')) }); + + let start_pos = cur_pos!(self); + + let ctx = Context { + in_cond_expr: false, + will_expect_colon_for_cond: false, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_jsx_element_at(start_pos) + } + + pub(crate) fn parse_jsx_text(&mut self) -> PResult { + debug_assert!(self.input.syntax().jsx()); + debug_assert!(matches!(cur!(self, false), Ok(&Token::JSXText { .. }))); + let token = bump!(self); + let span = self.input.prev_span(); + match token { + Token::JSXText { raw, value } => Ok(JSXText { span, value, raw }), + _ => unreachable!(), + } + } +} + +fn get_qualified_jsx_name(name: &JSXElementName) -> JsWord { + fn get_qualified_obj_name(obj: &JSXObject) -> JsWord { + match *obj { + JSXObject::Ident(ref i) => i.sym.clone(), + JSXObject::JSXMemberExpr(ref member) => format!( + "{}.{}", + get_qualified_obj_name(&member.obj), + member.prop.sym + ) + .into(), + } + } + match name { + JSXElementName::Ident(i) => i.sym.clone(), + JSXElementName::JSXNamespacedName(nn) => format!("{}:{}", nn.ns.sym, nn.name.sym).into(), + JSXElementName::JSXMemberExpr(member) => format!( + "{}.{}", + get_qualified_obj_name(&member.obj), + member.prop.sym + ) + .into(), + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/jsx/tests.rs b/crates/swc_ecma_parser/src/arena/parser/jsx/tests.rs new file mode 100644 index 000000000000..b69c6966644f --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/jsx/tests.rs @@ -0,0 +1,164 @@ +use swc_allocator::{ + arena::{Allocator, Box, Vec}, + vec, +}; +use swc_common::DUMMY_SP as span; +use swc_ecma_ast::arena::*; +use swc_ecma_visit::assert_eq_ignore_span_arena; + +use crate::arena::parser::test_parser; + +fn jsx<'a>(alloc: &'a Allocator, src: &'static str) -> Expr<'a> { + test_parser( + alloc, + src, + crate::Syntax::Es(crate::EsSyntax { + jsx: true, + ..Default::default() + }), + |p| p.parse_expr(), + ) +} + +#[test] +fn self_closing_01() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + jsx(&alloc, ""), + Expr::JSXElement(Box::new_in( + JSXElement { + span, + opening: JSXOpeningElement { + span, + name: JSXElementName::Ident(Box::new_in( + Ident::new_no_ctxt("a".into(), span), + &alloc + )), + self_closing: true, + attrs: Vec::new_in(&alloc), + type_args: None, + }, + children: Vec::new_in(&alloc), + closing: None, + }, + &alloc + )) + ); +} + +#[test] +fn normal_01() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + jsx(&alloc, "foo"), + Expr::JSXElement(Box::new_in( + JSXElement { + span, + opening: JSXOpeningElement { + span, + name: JSXElementName::Ident(Box::new_in( + Ident::new_no_ctxt("a".into(), span), + &alloc + )), + self_closing: false, + attrs: Vec::new_in(&alloc), + type_args: None, + }, + children: vec![in &alloc; JSXElementChild::JSXText(Box::new_in(JSXText { + span, + raw: "foo".into(), + value: "foo".into(), + }, &alloc))], + closing: Some(JSXClosingElement { + span, + name: JSXElementName::Ident(Box::new_in( + Ident::new_no_ctxt("a".into(), span), + &alloc + )), + }) + }, + &alloc + )) + ); +} + +#[test] +fn escape_in_attr() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + jsx(&alloc, r#"

;"#), + Expr::JSXElement(Box::new_in( + JSXElement { + span, + opening: JSXOpeningElement { + span, + attrs: vec![in &alloc; JSXAttrOrSpread::JSXAttr(Box::new_in( + JSXAttr { + span, + name: JSXAttrName::Ident(Box::new_in(IdentName::new("id".into(), span), &alloc)), + value: Some(JSXAttrValue::Lit(Box::new_in(Lit::Str(Box::new_in( +Str { + span, + value: "w < w".into(), + raw: Some("\"w < w\"".into()), + } + , &alloc)), &alloc))), + } + , &alloc))], + name: JSXElementName::Ident(Box::new_in( + Ident::new_no_ctxt("div".into(), span), + &alloc + )), + self_closing: true, + type_args: None, + }, + children: Vec::new_in(&alloc), + closing: None + }, + &alloc + )) + ); +} + +#[test] +fn issue_584() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + jsx(&alloc, r#";"#), + Expr::JSXElement(Box::new_in( + JSXElement { + span, + opening: JSXOpeningElement { + span, + name: JSXElementName::Ident(Box::new_in( + Ident::new_no_ctxt("test".into(), span), + &alloc + )), + attrs: vec![in &alloc; JSXAttrOrSpread::JSXAttr(Box::new_in( + JSXAttr { + span, + name: JSXAttrName::Ident(Box::new_in(IdentName::new("other".into(), span), &alloc)), + value: Some(JSXAttrValue::JSXExprContainer(Box::new_in( +JSXExprContainer { + span, + expr: JSXExpr::Expr(Expr::Lit(Box::new_in(Lit::Num(Box::new_in( + Number { + span, + value: 4.0, + raw: Some("4".into()) + } + , &alloc)), &alloc))) + } + , &alloc))), + } + , &alloc))], + self_closing: true, + type_args: None, + }, + children: Vec::new_in(&alloc), + closing: None + }, + &alloc + )) + ); +} diff --git a/crates/swc_ecma_parser/src/arena/parser/macros.rs b/crates/swc_ecma_parser/src/arena/parser/macros.rs new file mode 100644 index 000000000000..4e383db77374 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/macros.rs @@ -0,0 +1,406 @@ +macro_rules! unexpected { + ($p:expr, $expected:literal) => {{ + let got = $p.input.dump_cur(); + syntax_error!( + $p, + $p.input.cur_span(), + SyntaxError::Unexpected { + got, + expected: $expected + } + ) + }}; +} + +/// This handles automatic semicolon insertion. +/// +/// Returns bool. +macro_rules! is { + ($p:expr, BindingIdent) => {{ + let ctx = $p.ctx(); + match $p.input.cur() { + Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w), + _ => false, + } + }}; + + ($p:expr, IdentRef) => {{ + let ctx = $p.ctx(); + match $p.input.cur() { + Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w), + _ => false, + } + }}; + + ($p:expr,IdentName) => {{ + match $p.input.cur() { + Some(&crate::token::Word(..)) => true, + _ => false, + } + }}; + + ($p:expr,Str) => {{ + match $p.input.cur() { + Some(&Token::Str { .. }) => true, + _ => false, + } + }}; + + ($p:expr,Num) => {{ + match $p.input.cur() { + Some(&Token::Num { .. }) => true, + _ => false, + } + }}; + + ($p:expr,Regex) => {{ + match $p.input.cur() { + Some(&Token::Regex { .. }) => true, + _ => false, + } + }}; + + ($p:expr,BigInt) => {{ + match $p.input.cur() { + Some(&Token::BigInt { .. }) => true, + _ => false, + } + }}; + + ($p:expr,';') => {{ + match $p.input.cur() { + Some(&Token::Semi) | None | Some(&tok!('}')) => true, + _ => $p.input.had_line_break_before_cur(), + } + }}; + + ($p:expr, $t:tt) => { + is_exact!($p, $t) + }; +} + +#[allow(unused)] +macro_rules! peeked_is { + ($p:expr, BindingIdent) => {{ + let ctx = $p.ctx(); + match peek!($p) { + Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w), + _ => false, + } + }}; + + ($p:expr, IdentRef) => {{ + let ctx = $p.ctx(); + match peek!($p) { + Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w), + _ => false, + } + }}; + + ($p:expr,IdentName) => {{ + match peek!($p) { + Some(&crate::token::Word(..)) => true, + _ => false, + } + }}; + + ($p:expr, JSXName) => {{ + match peek!($p) { + Some(&Token::JSXName { .. }) => true, + _ => false, + } + }}; + + ($p:expr, ';') => {{ + compile_error!("peeked_is!(self, ';') is invalid"); + }}; + + ($p:expr, $t:tt) => { + match peek!($p) { + Some(&token_including_semi!($t)) => true, + _ => false, + } + }; +} + +/// Returns true on eof. +macro_rules! eof { + ($p:expr) => { + cur!($p, false).is_err() + }; +} + +macro_rules! is_one_of { + ($p:expr, $($t:tt),+) => {{ + false + $( + || is!($p, $t) + )* + }}; +} + +// This will panic if current != token +macro_rules! assert_and_bump { + ($p:expr, $t:tt) => {{ + const TOKEN: &Token = &tok!($t); + if cfg!(debug_assertions) && !is!($p, $t) { + unreachable!( + "assertion failed: expected {:?}, got {:?}", + TOKEN, + $p.input.cur() + ); + } + let _ = cur!($p, true); + bump!($p); + }}; +} + +/// This handles automatic semicolon insertion. +/// +/// Returns bool if token is static, and Option +/// if token has data like string. +macro_rules! eat { + ($p:expr, ';') => {{ + if cfg!(feature = "debug") { + tracing::trace!("eat(';'): cur={:?}", cur!($p, false)); + } + match $p.input.cur() { + Some(&Token::Semi) => { + $p.input.bump(); + true + } + None | Some(&tok!('}')) => true, + _ => $p.input.had_line_break_before_cur(), + } + }}; + + ($p:expr, $t:tt) => {{ + if is!($p, $t) { + bump!($p); + true + } else { + false + } + }}; +} + +macro_rules! eat_exact { + ($p:expr, $t:tt) => {{ + if is_exact!($p, $t) { + bump!($p); + true + } else { + false + } + }}; +} + +macro_rules! is_exact { + ($p:expr, $t:tt) => {{ + match $p.input.cur() { + Some(&token_including_semi!($t)) => true, + _ => false, + } + }}; +} + +/// This handles automatic semicolon insertion. +macro_rules! expect { + ($p:expr, $t:tt) => {{ + const TOKEN: &Token = &token_including_semi!($t); + if !eat!($p, $t) { + let cur = $p.input.dump_cur(); + syntax_error!($p, $p.input.cur_span(), SyntaxError::Expected(TOKEN, cur)) + } + }}; +} + +macro_rules! expect_exact { + ($p:expr, $t:tt) => {{ + const TOKEN: &Token = &token_including_semi!($t); + if !eat_exact!($p, $t) { + let cur = $p.input.dump_cur(); + syntax_error!($p, $p.input.cur_span(), SyntaxError::Expected(TOKEN, cur)) + } + }}; +} + +macro_rules! store { + ($p:expr, $t:tt) => {{ + const TOKEN: Token = token_including_semi!($t); + + $p.input.store(TOKEN); + }}; +} + +/// cur!($parser, required:bool) +macro_rules! cur { + ($p:expr, false) => {{ + match $p.input.cur() { + Some(c) => Ok(c), + None => { + let pos = $p.input.end_pos(); + let last = swc_common::Span::new(pos, pos); + + Err(crate::error::Error::new( + last, + crate::error::SyntaxError::Eof, + )) + } + } + }}; + + ($p:expr, true) => {{ + match $p.input.cur() { + Some(c) => match c { + Token::Error(..) => match $p.input.bump() { + $crate::token::Token::Error(e) => { + return Err(e); + } + _ => unreachable!(), + }, + + _ => c, + }, + None => { + let pos = $p.input.end_pos(); + let span = swc_common::Span::new(pos, pos); + let err = crate::error::Error::new(span, crate::error::SyntaxError::Eof); + return Err(err); + } + } + }}; +} + +macro_rules! peek { + ($p:expr) => {{ + debug_assert!( + $p.input.knows_cur(), + "parser should not call peek() without knowing current token. +Current token is {:?}", + cur!($p, false), + ); + + $p.input.peek() + }}; +} + +macro_rules! bump { + ($p:expr) => {{ + debug_assert!( + $p.input.knows_cur(), + "parser should not call bump() without knowing current token" + ); + $p.input.bump() + }}; +} + +macro_rules! cur_pos { + ($p:expr) => {{ + $p.input.cur_pos() + }}; +} + +macro_rules! last_pos { + ($p:expr) => { + $p.input.prev_span().hi + }; +} + +macro_rules! return_if_arrow { + ($p:expr, $expr:expr) => {{ + // FIXME: + // + // + + // let is_cur = match $p.state.potential_arrow_start { + // Some(start) => $expr.span.lo() == start, + // None => false + // }; + // if is_cur { + if let Expr::Arrow { .. } = $expr { + return Ok($expr); + } + // } + }}; +} + +macro_rules! trace_cur { + ($p:expr, $name:ident) => {{ + if cfg!(feature = "debug") { + tracing::debug!("{}: {:?}", stringify!($name), $p.input.cur()); + } + }}; +} + +/// This macro requires macro named 'last_pos' to be in scope. +macro_rules! span { + ($p:expr, $start:expr) => {{ + let start: ::swc_common::BytePos = $start; + let end: ::swc_common::BytePos = last_pos!($p); + if cfg!(debug_assertions) && start > end { + unreachable!( + "assertion failed: (span.start <= span.end). + start = {}, end = {}", + start.0, end.0 + ) + } + ::swc_common::Span::new(start, end) + }}; +} + +macro_rules! make_error { + ($p:expr, $span:expr, $err:expr) => {{ + crate::error::Error::new($span, $err) + }}; +} + +macro_rules! syntax_error { + ($p:expr, $err:expr) => { + syntax_error!($p, $p.input.cur_span(), $err) + }; + + ($p:expr, $span:expr, $err:expr) => {{ + let err = make_error!($p, $span, $err); + + { + let is_err_token = match $p.input.cur() { + Some(&$crate::token::Token::Error(..)) => true, + _ => false, + }; + if is_err_token { + match $p.input.bump() { + $crate::token::Token::Error(e) => { + $p.emit_error(e); + } + _ => unreachable!(), + } + } + } + + if cfg!(feature = "debug") { + tracing::error!( + "Syntax error called from {}:{}:{}\nCurrent token = {:?}", + file!(), + line!(), + column!(), + $p.input.cur() + ); + } + return Err(err.into()); + }}; +} + +macro_rules! debug_tracing { + ($p:expr, $name:tt) => {{ + #[cfg(feature = "debug")] + { + tracing::span!( + tracing::Level::ERROR, + $name, + cur = tracing::field::debug(&$p.input.cur()) + ) + .entered() + } + }}; +} diff --git a/crates/swc_ecma_parser/src/arena/parser/mod.rs b/crates/swc_ecma_parser/src/arena/parser/mod.rs new file mode 100644 index 000000000000..73094121bc4b --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/mod.rs @@ -0,0 +1,343 @@ +#![allow(clippy::let_unit_value)] +#![deny(non_snake_case)] + +use input::Buffer; +use swc_allocator::arena::{Allocator, Box, Vec as AllocVec}; +use swc_atoms::{Atom, JsWord}; +use swc_common::{collections::AHashMap, comments::Comments, input::StringInput, BytePos, Span}; +use swc_ecma_ast::arena::*; + +use crate::{ + error::SyntaxError, + lexer::Lexer, + token::{Token, Word}, + Context, EsVersion, PResult, Syntax, Tokens, TsSyntax, +}; +#[cfg(test)] +extern crate test; +#[cfg(test)] +use test::Bencher; + +use crate::error::Error; + +#[macro_use] +mod macros; +mod class_and_fn; +mod expr; +mod ident; +pub mod input; +mod jsx; +mod object; +mod pat; +mod stmt; +#[cfg(test)] +mod tests; +#[cfg(feature = "typescript")] +mod typescript; +mod util; + +/// EcmaScript parser. +#[derive(Clone)] +pub struct Parser<'a, I: Tokens> { + alloc: &'a Allocator, + state: State, + input: Buffer, +} + +#[derive(Clone, Default)] +struct State { + labels: Vec, + /// Start position of an assignment expression. + potential_arrow_start: Option, + + found_module_item: bool, + /// Start position of an AST node and the span of its trailing comma. + trailing_commas: AHashMap, +} + +impl<'a> Parser<'a, Lexer<'a>> { + pub fn new( + allocator: &'a Allocator, + syntax: Syntax, + input: StringInput<'a>, + comments: Option<&'a dyn Comments>, + ) -> Self { + Self::new_from( + allocator, + Lexer::new(syntax, Default::default(), input, comments), + ) + } +} + +impl<'a, I: Tokens> Parser<'a, I> { + pub fn new_from(allocator: &'a Allocator, mut input: I) -> Self { + #[cfg(feature = "typescript")] + let in_declare = matches!( + input.syntax(), + Syntax::Typescript(TsSyntax { dts: true, .. }) + ); + #[cfg(not(feature = "typescript"))] + let in_declare = false; + let ctx = Context { + in_declare, + ..input.ctx() + }; + input.set_ctx(ctx); + + Parser { + alloc: allocator, + state: Default::default(), + input: Buffer::new(input), + } + } + + pub fn take_errors(&mut self) -> Vec { + self.input().take_errors() + } + + pub fn take_script_module_errors(&mut self) -> Vec { + self.input().take_script_module_errors() + } + + pub fn parse_script(&mut self) -> PResult> { + trace_cur!(self, parse_script); + + let ctx = Context { + module: false, + ..self.ctx() + }; + self.set_ctx(ctx); + + let start = cur_pos!(self); + + let shebang = self.parse_shebang()?; + + self.parse_block_body(true, true, None).map(|body| Script { + span: span!(self, start), + body, + shebang, + }) + } + + pub fn parse_typescript_module(&mut self) -> PResult> { + trace_cur!(self, parse_typescript_module); + + debug_assert!(self.syntax().typescript()); + + //TODO: parse() -> PResult + let ctx = Context { + module: true, + strict: false, + ..self.ctx() + }; + // Module code is always in strict mode + self.set_ctx(ctx); + + let start = cur_pos!(self); + let shebang = self.parse_shebang()?; + + self.parse_block_body(true, true, None).map(|body| Module { + span: span!(self, start), + body, + shebang, + }) + } + + /// Returns [Module] if it's a module and returns [Script] if it's not a + /// module. + /// + /// Note: This is not perfect yet. It means, some strict mode violations may + /// not be reported even if the method returns [Module]. + pub fn parse_program(&mut self) -> PResult> { + let start = cur_pos!(self); + let shebang = self.parse_shebang()?; + let ctx = Context { + can_be_module: true, + ..self.ctx() + }; + + let body: AllocVec = self.with_ctx(ctx).parse_block_body(true, true, None)?; + let has_module_item = self.state.found_module_item + || body + .iter() + .any(|item| matches!(item, ModuleItem::ModuleDecl(..))); + if has_module_item && !self.ctx().module { + let ctx = Context { + module: true, + can_be_module: true, + strict: true, + ..self.ctx() + }; + // Emit buffered strict mode / module code violations + self.input.set_ctx(ctx); + } + + Ok(if has_module_item { + Program::Module(self.ast(Module { + span: span!(self, start), + body, + shebang, + })) + } else { + let body = AllocVec::from_iter_in( + body.into_iter().map(|item| match item { + ModuleItem::ModuleDecl(_) => unreachable!("Module is handled above"), + ModuleItem::Stmt(stmt) => stmt, + }), + self.alloc, + ); + Program::Script(self.ast(Script { + span: span!(self, start), + body, + shebang, + })) + }) + } + + pub fn parse_module(&mut self) -> PResult> { + let ctx = Context { + module: true, + can_be_module: true, + strict: true, + ..self.ctx() + }; + // Module code is always in strict mode + self.set_ctx(ctx); + + let start = cur_pos!(self); + let shebang = self.parse_shebang()?; + + self.parse_block_body(true, true, None).map(|body| Module { + span: span!(self, start), + body, + shebang, + }) + } + + fn parse_shebang(&mut self) -> PResult> { + match cur!(self, false) { + Ok(&Token::Shebang(..)) => match bump!(self) { + Token::Shebang(v) => Ok(Some(v)), + _ => unreachable!(), + }, + _ => Ok(None), + } + } + + fn ctx(&self) -> Context { + self.input.get_ctx() + } + + #[cold] + fn emit_err(&mut self, span: Span, error: SyntaxError) { + if self.ctx().ignore_error || !self.syntax().early_errors() { + return; + } + + self.emit_error(Error::new(span, error)) + } + + #[cold] + fn emit_error(&mut self, error: Error) { + if self.ctx().ignore_error || !self.syntax().early_errors() { + return; + } + + if matches!(self.input.cur(), Some(Token::Error(..))) { + let err = self.input.bump(); + match err { + Token::Error(err) => { + self.input_ref().add_error(err); + } + _ => unreachable!(), + } + } + + self.input_ref().add_error(error); + } + + #[cold] + fn emit_strict_mode_err(&self, span: Span, error: SyntaxError) { + if self.ctx().ignore_error { + return; + } + let error = Error::new(span, error); + self.input_ref().add_module_mode_error(error); + } + + pub(crate) fn ast(&self, value: T) -> Box<'a, T> { + Box::new_in(value, self.alloc) + } +} + +#[cfg(test)] +pub fn test_parser<'a, F, Ret>(alloc: &'a Allocator, s: &'static str, syntax: Syntax, f: F) -> Ret +where + F: FnOnce(&mut Parser<'a, Lexer>) -> Result, +{ + crate::with_test_sess(s, |handler, input| { + let lexer = Lexer::new(syntax, EsVersion::Es2019, input, None); + let mut p = Parser::new_from(alloc, lexer); + let ret = f(&mut p); + let mut error = false; + + for err in p.take_errors() { + error = true; + err.into_diagnostic(handler).emit(); + } + + let res = ret.map_err(|err| err.into_diagnostic(handler).emit())?; + + if error { + return Err(()); + } + + Ok(res) + }) + .unwrap_or_else(|output| panic!("test_parser(): failed to parse \n{}\n{}", s, output)) +} + +#[cfg(test)] +pub fn test_parser_comment<'a, F, Ret>( + alloc: &'a Allocator, + c: &dyn Comments, + s: &'static str, + syntax: Syntax, + f: F, +) -> Ret +where + F: FnOnce(&mut Parser<'a, Lexer>) -> Result, +{ + crate::with_test_sess(s, |handler, input| { + let lexer = Lexer::new(syntax, EsVersion::Es2019, input, Some(&c)); + let mut p = Parser::new_from(alloc, lexer); + let ret = f(&mut p); + + for err in p.take_errors() { + err.into_diagnostic(handler).emit(); + } + + ret.map_err(|err| err.into_diagnostic(handler).emit()) + }) + .unwrap_or_else(|output| panic!("test_parser(): failed to parse \n{}\n{}", s, output)) +} + +#[cfg(test)] +pub fn bench_parser(b: &mut Bencher, s: &'static str, syntax: Syntax, mut f: F) +where + F: for<'a> FnMut(&'a mut Parser>) -> PResult<()>, +{ + b.bytes = s.len() as u64; + + let mut allocator = Allocator::default(); + let _ = crate::with_test_sess(s, |handler, input| { + b.iter(|| { + let lexer = Lexer::new(syntax, Default::default(), input.clone(), None); + let _ = f(&mut Parser::new_from(&allocator, lexer)) + .map_err(|err| err.into_diagnostic(handler).emit()); + allocator.reset(); + }); + + Ok(()) + }); +} diff --git a/crates/swc_ecma_parser/src/arena/parser/object.rs b/crates/swc_ecma_parser/src/arena/parser/object.rs new file mode 100644 index 000000000000..c63e9ab077f0 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/object.rs @@ -0,0 +1,551 @@ +//! Parser for object literal. + +use swc_allocator::arena::Vec; +use swc_common::{Spanned, DUMMY_SP}; + +use super::{class_and_fn::is_not_this, *}; + +impl<'a, I: Tokens> Parser<'a, I> { + /// spec: 'PropertyName' + pub(crate) fn parse_prop_name(&mut self) -> PResult> { + trace_cur!(self, parse_prop_name); + + let ctx = self.ctx(); + self.with_ctx(Context { + in_property_name: true, + ..ctx + }) + .parse_with(|p| { + let start = cur_pos!(p); + + let v = match *cur!(p, true) { + Token::Str { .. } => match bump!(p) { + Token::Str { value, raw } => PropName::Str(p.ast(Str { + span: span!(p, start), + value, + raw: Some(raw), + })), + _ => unreachable!(), + }, + Token::Num { .. } => match bump!(p) { + Token::Num { value, raw } => PropName::Num(p.ast(Number { + span: span!(p, start), + value, + raw: Some(raw), + })), + _ => unreachable!(), + }, + Token::BigInt { .. } => match bump!(p) { + Token::BigInt { value, raw } => PropName::BigInt(p.ast(BigInt { + span: span!(p, start), + value: p.ast(*value), + raw: Some(raw), + })), + _ => unreachable!(), + }, + Word(..) => match bump!(p) { + Word(w) => PropName::Ident(p.ast(IdentName::new(w.into(), span!(p, start)))), + _ => unreachable!(), + }, + tok!('[') => { + bump!(p); + let inner_start = cur_pos!(p); + + let mut expr = p.include_in_expr(true).parse_assignment_expr()?; + + if p.syntax().typescript() && is!(p, ',') { + let mut exprs = Vec::new_in(p.alloc); + exprs.push(expr); + + while eat!(p, ',') { + exprs.push(p.include_in_expr(true).parse_assignment_expr()?); + } + + p.emit_err(span!(p, inner_start), SyntaxError::TS1171); + + expr = Expr::Seq(p.ast(SeqExpr { + span: span!(p, inner_start), + exprs, + })); + } + + expect!(p, ']'); + + PropName::Computed(p.ast(ComputedPropName { + span: span!(p, start), + expr, + })) + } + _ => unexpected!( + p, + "identifier, string literal, numeric literal or [ for the computed key" + ), + }; + + Ok(v) + }) + } +} + +impl<'a, I: Tokens> Parser<'a, I> { + /// Parse a object literal or object pattern. + pub(crate) fn parse_object_expr(&mut self) -> PResult> { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + trace_cur!(p, parse_object); + + let start = cur_pos!(p); + let mut trailing_comma = None; + assert_and_bump!(p, '{'); + + let mut props = Vec::new_in(p.alloc); + + while !eat!(p, '}') { + props.push(p.parse_object_prop_expr()?); + + if !is!(p, '}') { + expect!(p, ','); + if is!(p, '}') { + trailing_comma = Some(p.input.prev_span()); + } + } + } + + p.make_object_expr(span!(p, start), props, trailing_comma) + }) + } + + pub(crate) fn make_object_expr( + &mut self, + span: Span, + props: Vec<'a, PropOrSpread<'a>>, + trailing_comma: Option, + ) -> PResult> { + if let Some(trailing_comma) = trailing_comma { + self.state.trailing_commas.insert(span.lo, trailing_comma); + } + Ok(Expr::Object(self.ast(ObjectLit { span, props }))) + } + + /// spec: 'PropertyDefinition' + fn parse_object_prop_expr(&mut self) -> PResult> { + trace_cur!(self, parse_object_prop); + + let start = cur_pos!(self); + // Parse as 'MethodDefinition' + + if eat!(self, "...") { + // spread element + let dot3_token = span!(self, start); + + let expr = self.include_in_expr(true).parse_assignment_expr()?; + + return Ok(PropOrSpread::Spread( + self.ast(SpreadElement { dot3_token, expr }), + )); + } + + if eat!(self, '*') { + let name = self.parse_prop_name()?; + let decorators = Vec::new_in(self.alloc); + return self + .with_ctx(Context { + allow_direct_super: true, + in_class_field: false, + ..self.ctx() + }) + .parse_with(|parser| { + parser + .parse_fn_args_body( + // no decorator in an object literal + decorators, + start, + |p| p.parse_unique_formal_params(), + false, + true, + ) + .map(|function| { + PropOrSpread::Prop(parser.ast(Prop::Method(parser.ast(MethodProp { + key: name, + function, + })))) + }) + }); + } + + let has_modifiers = self.eat_any_ts_modifier()?; + let modifiers_span = self.input.prev_span(); + + let key = self.parse_prop_name()?; + + if self.input.syntax().typescript() + && !is_one_of!(self, '(', '[', ':', ',', '?', '=', '*', IdentName, Str, Num) + && !(self.input.syntax().typescript() && is!(self, '<')) + && !(is!(self, '}') && matches!(key, PropName::Ident(..))) + { + trace_cur!(self, parse_object_prop_error); + + self.emit_err(self.input.cur_span(), SyntaxError::TS1005); + return Ok(PropOrSpread::Prop(self.ast(Prop::KeyValue(self.ast( + KeyValueProp { + key, + value: Expr::Invalid(self.ast(Invalid { + span: span!(self, start), + })), + }, + ))))); + } + // + // {[computed()]: a,} + // { 'a': a, } + // { 0: 1, } + // { a: expr, } + if eat!(self, ':') { + let value = self.include_in_expr(true).parse_assignment_expr()?; + return Ok(PropOrSpread::Prop( + self.ast(Prop::KeyValue(self.ast(KeyValueProp { key, value }))), + )); + } + + // Handle `a(){}` (and async(){} / get(){} / set(){}) + if (self.input.syntax().typescript() && is!(self, '<')) || is!(self, '(') { + return self + .with_ctx(Context { + allow_direct_super: true, + in_class_field: false, + ..self.ctx() + }) + .parse_with(|parser| { + parser + .parse_fn_args_body( + // no decorator in an object literal + Vec::new_in(parser.alloc), + start, + |p| p.parse_unique_formal_params(), + false, + false, + ) + .map(|function| { + parser.ast(Prop::Method(parser.ast(MethodProp { key, function }))) + }) + .map(PropOrSpread::Prop) + }); + } + + let ident = match key { + PropName::Ident(ident) => ident, + // TODO + _ => unexpected!(self, "identifier"), + }; + + if eat!(self, '?') { + self.emit_err(self.input.prev_span(), SyntaxError::TS1162); + } + + // `ident` from parse_prop_name is parsed as 'IdentifierName' + // It means we should check for invalid expressions like { for, } + if is_one_of!(self, '=', ',', '}') { + let is_reserved_word = { self.ctx().is_reserved_word(&ident.sym) }; + if is_reserved_word { + self.emit_err(ident.span, SyntaxError::ReservedWordInObjShorthandOrPat); + } + + if eat!(self, '=') { + let value = self.include_in_expr(true).parse_assignment_expr()?; + let span = span!(self, start); + return Ok(PropOrSpread::Prop(self.ast(Prop::Assign(self.ast( + AssignProp { + span, + key: ident.into_inner().into(), + value, + }, + ))))); + } + + return Ok(PropOrSpread::Prop( + self.ast(Prop::Shorthand(self.ast(ident.into_inner().into()))), + )); + } + + // get a(){} + // set a(v){} + // async a(){} + + match &*ident.sym { + "get" | "set" | "async" => { + trace_cur!(self, parse_object_prop__after_accessor); + + if has_modifiers { + self.emit_err(modifiers_span, SyntaxError::TS1042); + } + + let is_generator = ident.sym == "async" && eat!(self, '*'); + let key = self.parse_prop_name()?; + let key_span = key.span(); + self.with_ctx(Context { + allow_direct_super: true, + in_class_field: false, + ..self.ctx() + }) + .parse_with(|parser| { + match &*ident.sym { + "get" => parser + .parse_fn_args_body( + // no decorator in an object literal + Vec::new_in(parser.alloc), + start, + |p| { + let params = p.parse_formal_params()?; + + if params.iter().filter(|p| is_not_this(p)).count() != 0 { + p.emit_err(key_span, SyntaxError::GetterParam); + } + + Ok(params) + }, + false, + false, + ) + .map(|function| function.into_inner()) + .map( + |Function { + body, return_type, .. + }| { + if parser.input.syntax().typescript() + && parser.input.target() == EsVersion::Es3 + { + parser.emit_err(key_span, SyntaxError::TS1056); + } + + PropOrSpread::Prop(parser.ast(Prop::Getter(parser.ast( + GetterProp { + span: span!(parser, start), + key, + type_ann: return_type, + body, + }, + )))) + }, + ), + "set" => { + parser + .parse_fn_args_body( + // no decorator in an object literal + Vec::new_in(parser.alloc), + start, + |p| { + let params = p.parse_formal_params()?; + + if params.iter().filter(|p| is_not_this(p)).count() != 1 { + p.emit_err(key_span, SyntaxError::SetterParam); + } + + if !params.is_empty() { + if let Pat::Rest(..) = params[0].pat { + p.emit_err( + params[0].span(), + SyntaxError::RestPatInSetter, + ); + } + } + + if p.input.syntax().typescript() + && p.input.target() == EsVersion::Es3 + { + p.emit_err(key_span, SyntaxError::TS1056); + } + + Ok(params) + }, + false, + false, + ) + .map(|v| v.into_inner()) + .map( + |Function { + mut params, body, .. + }| { + let mut this = None; + if params.len() >= 2 { + this = Some(params.remove(0).pat); + } + + let param = params + .into_iter() + .next() + .map(|v| v.pat) + .unwrap_or_else(|| { + parser.emit_err(key_span, SyntaxError::SetterParam); + + Pat::Invalid(parser.ast(Invalid { span: DUMMY_SP })) + }); + + // debug_assert_eq!(params.len(), 1); + PropOrSpread::Prop(parser.ast(Prop::Setter(parser.ast( + SetterProp { + span: span!(parser, start), + key, + body, + param, + this_param: this, + }, + )))) + }, + ) + } + "async" => { + parser + .parse_fn_args_body( + // no decorator in an object literal + Vec::new_in(parser.alloc), + start, + |p| p.parse_unique_formal_params(), + true, + is_generator, + ) + .map(|function| { + PropOrSpread::Prop(parser.ast(Prop::Method( + parser.ast(MethodProp { key, function }), + ))) + }) + } + _ => unreachable!(), + } + }) + } + _ => { + if self.input.syntax().typescript() { + unexpected!( + self, + "... , *, (, [, :, , ?, =, an identifier, public, protected, private, \ + readonly, <." + ) + } else { + unexpected!(self, "... , *, (, [, :, , ?, = or an identifier") + } + } + } + } +} + +impl<'a, I: Tokens> Parser<'a, I> { + /// Parse a object literal or object pattern. + pub(crate) fn parse_object_pat(&mut self) -> PResult> { + let ctx = Context { + will_expect_colon_for_cond: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + trace_cur!(p, parse_object); + + let start = cur_pos!(p); + let mut trailing_comma = None; + assert_and_bump!(p, '{'); + + let mut props = Vec::new_in(p.alloc); + + while !eat!(p, '}') { + props.push(p.parse_object_prop_pat()?); + + if !is!(p, '}') { + expect!(p, ','); + if is!(p, '}') { + trailing_comma = Some(p.input.prev_span()); + } + } + } + + p.make_object_pat(span!(p, start), props, trailing_comma) + }) + } + + fn make_object_pat( + &mut self, + span: Span, + props: Vec<'a, ObjectPatProp<'a>>, + trailing_comma: Option, + ) -> PResult> { + let len = props.len(); + for (i, p) in props.iter().enumerate() { + if i == len - 1 { + if let ObjectPatProp::Rest(ref rest) = p { + match rest.arg { + Pat::Ident(..) => { + if let Some(trailing_comma) = trailing_comma { + self.emit_err(trailing_comma, SyntaxError::CommaAfterRestElement); + } + } + _ => syntax_error!(self, p.span(), SyntaxError::DotsWithoutIdentifier), + } + } + continue; + } + + if let ObjectPatProp::Rest(..) = p { + self.emit_err(p.span(), SyntaxError::NonLastRestParam) + } + } + + let optional = (self.input.syntax().dts() || self.ctx().in_declare) && eat!(self, '?'); + + Ok(Pat::Object(self.ast(ObjectPat { + span, + props, + optional, + type_ann: None, + }))) + } + + /// Production 'BindingProperty' + fn parse_object_prop_pat(&mut self) -> PResult> { + let start = cur_pos!(self); + + if eat!(self, "...") { + // spread element + let dot3_token = span!(self, start); + + let arg = self.parse_binding_pat_or_ident(false)?; + + return Ok(ObjectPatProp::Rest(self.ast(RestPat { + span: span!(self, start), + dot3_token, + arg, + type_ann: None, + }))); + } + + let key = self.parse_prop_name()?; + if eat!(self, ':') { + let value = self.parse_binding_element()?; + + return Ok(ObjectPatProp::KeyValue( + self.ast(KeyValuePatProp { key, value }), + )); + } + let key = match key { + PropName::Ident(ident) => ident, + _ => unexpected!(self, "an identifier"), + }; + + let value = if eat!(self, '=') { + self.include_in_expr(true) + .parse_assignment_expr() + .map(Some)? + } else { + if self.ctx().is_reserved_word(&key.sym) { + self.emit_err(key.span, SyntaxError::ReservedWordInObjShorthandOrPat); + } + + None + }; + + Ok(ObjectPatProp::Assign(self.ast(AssignPatProp { + span: span!(self, start), + key: key.into_inner().into(), + value, + }))) + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/pat.rs b/crates/swc_ecma_parser/src/arena/parser/pat.rs new file mode 100644 index 000000000000..ee5ed3e3adf6 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/pat.rs @@ -0,0 +1,1336 @@ +//! 13.3.3 Destructuring Binding Patterns + +use swc_allocator::arena::{Box, Vec}; +use swc_common::Spanned; +use util::ExprExt; + +use super::{class_and_fn::is_not_this, expr::AssignTargetOrSpread, *}; +use crate::{ + token::{IdentLike, Keyword}, + Tokens, +}; + +impl<'a, I: Tokens> Parser<'a, I> { + pub fn parse_pat(&mut self) -> PResult> { + self.parse_binding_pat_or_ident(false) + } + + pub(crate) fn parse_opt_binding_ident( + &mut self, + disallow_let: bool, + ) -> PResult>> { + trace_cur!(self, parse_opt_binding_ident); + + if is!(self, BindingIdent) || (self.input.syntax().typescript() && is!(self, "this")) { + self.parse_binding_ident(disallow_let).map(Some) + } else { + Ok(None) + } + } + + /// babel: `parseBindingIdentifier` + /// + /// spec: `BindingIdentifier` + pub(crate) fn parse_binding_ident(&mut self, disallow_let: bool) -> PResult> { + trace_cur!(self, parse_binding_ident); + + if disallow_let { + if let Some(Token::Word(Word::Keyword(Keyword::Let))) = self.input.cur() { + unexpected!(self, "let is reserved in const, let, class declaration") + } + } + + // "yield" and "await" is **lexically** accepted. + let ident = self.parse_ident(true, true)?; + if ident.is_reserved_in_strict_bind() { + self.emit_strict_mode_err(ident.span, SyntaxError::EvalAndArgumentsInStrict); + } + if (self.ctx().in_async || self.ctx().in_static_block) && ident.sym == "await" { + self.emit_err(ident.span, SyntaxError::ExpectedIdent); + } + if self.ctx().in_generator && ident.sym == "yield" { + self.emit_err(ident.span, SyntaxError::ExpectedIdent); + } + + Ok(ident.into()) + } + + pub(crate) fn parse_binding_pat_or_ident(&mut self, disallow_let: bool) -> PResult> { + trace_cur!(self, parse_binding_pat_or_ident); + + match *cur!(self, true) { + tok!("yield") | Word(..) => self + .parse_binding_ident(disallow_let) + .map(|ident| Pat::Ident(self.ast(ident))), + tok!('[') => self.parse_array_binding_pat(), + tok!('{') => self.parse_object_pat(), + // tok!('(') => { + // bump!(self); + // let pat = self.parse_binding_pat_or_ident()?; + // expect!(self, ')'); + // Ok(pat) + // } + _ => unexpected!(self, "yield, an identifier, [ or {"), + } + } + + /// babel: `parseBindingAtom` + pub(crate) fn parse_binding_element(&mut self) -> PResult> { + trace_cur!(self, parse_binding_element); + + let start = cur_pos!(self); + let left = self.parse_binding_pat_or_ident(false)?; + + if eat!(self, '=') { + let right = self.include_in_expr(true).parse_assignment_expr()?; + + if self.ctx().in_declare { + self.emit_err(span!(self, start), SyntaxError::TS2371); + } + + return Ok(Pat::Assign(self.ast(AssignPat { + span: span!(self, start), + left, + right, + }))); + } + + Ok(left) + } + + fn parse_array_binding_pat(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, '['); + + let mut elems = Vec::new_in(self.alloc); + let mut comma = 0; + let mut rest_span = Span::default(); + + while !eof!(self) && !is!(self, ']') { + if !rest_span.is_dummy() { + self.emit_err(rest_span, SyntaxError::NonLastRestParam); + } + + if eat!(self, ',') { + comma += 1; + continue; + } + if comma > 0 { + for _ in 0..comma { + elems.push(None); + } + comma = 0; + } + let start = cur_pos!(self); + + let mut is_rest = false; + if eat!(self, "...") { + is_rest = true; + let dot3_token = span!(self, start); + + let pat = self.parse_binding_pat_or_ident(false)?; + rest_span = span!(self, start); + let pat = Pat::Rest(self.ast(RestPat { + span: rest_span, + dot3_token, + arg: pat, + type_ann: None, + })); + elems.push(Some(pat)); + } else { + elems.push(self.parse_binding_element().map(Some)?); + } + + if !is!(self, ']') { + expect!(self, ','); + if is_rest && is!(self, ']') { + self.emit_err(self.input.prev_span(), SyntaxError::CommaAfterRestElement); + } + } + } + + expect!(self, ']'); + let optional = (self.input.syntax().dts() || self.ctx().in_declare) && eat!(self, '?'); + + Ok(Pat::Array(self.ast(ArrayPat { + span: span!(self, start), + elems, + optional, + type_ann: None, + }))) + } + + pub(crate) fn eat_any_ts_modifier(&mut self) -> PResult { + let has_modifier = self.syntax().typescript() + && matches!( + *cur!(self, false)?, + Word(Word::Ident(IdentLike::Known( + known_ident!("public") + | known_ident!("protected") + | known_ident!("private") + | known_ident!("readonly") + ))) + ) + && (peeked_is!(self, IdentName) || peeked_is!(self, '{') || peeked_is!(self, '[')); + if has_modifier { + let _ = self.parse_ts_modifier(&["public", "protected", "private", "readonly"], false); + } + + Ok(has_modifier) + } + + /// spec: 'FormalParameter' + /// + /// babel: `parseAssignableListItem` + pub(crate) fn parse_formal_param_pat(&mut self) -> PResult> { + let start = cur_pos!(self); + + let has_modifier = self.eat_any_ts_modifier()?; + + let pat_start = cur_pos!(self); + let mut pat = self.parse_binding_element()?; + let mut opt = false; + + if self.input.syntax().typescript() { + if eat!(self, '?') { + match &mut pat { + Pat::Ident(ident) => { + ident.id.optional = true; + opt = true; + } + Pat::Array(array_pat) => { + array_pat.optional = true; + opt = true; + } + Pat::Object(object_pat) => { + object_pat.optional = true; + opt = true; + } + _ if self.input.syntax().dts() || self.ctx().in_declare => {} + _ => { + syntax_error!( + self, + self.input.prev_span(), + SyntaxError::TsBindingPatCannotBeOptional + ); + } + } + } + + match &mut pat { + Pat::Array(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Object(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Rest(p) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + if new_type_ann.is_some() { + p.span = Span::new(pat_start, self.input.prev_span().hi); + } + p.type_ann = new_type_ann; + } + Pat::Ident(ident) => { + let new_type_ann = self.try_parse_ts_type_ann()?; + ident.type_ann = new_type_ann; + } + + Pat::Assign(assign_pat) => { + if (self.try_parse_ts_type_ann()?).is_some() { + assign_pat.span = Span::new(pat_start, self.input.prev_span().hi); + self.emit_err(assign_pat.span, SyntaxError::TSTypeAnnotationAfterAssign); + } + } + Pat::Invalid(..) => {} + _ => unreachable!("invalid syntax: Pat: {:?}", pat), + } + } + + let pat = if eat!(self, '=') { + // `=` cannot follow optional parameter. + if opt { + self.emit_err(pat.span(), SyntaxError::TS1015); + } + + let right = self.parse_assignment_expr()?; + if self.ctx().in_declare { + self.emit_err(span!(self, start), SyntaxError::TS2371); + } + + Pat::Assign(self.ast(AssignPat { + span: span!(self, start), + left: pat, + right, + })) + } else { + pat + }; + + if has_modifier { + self.emit_err(span!(self, start), SyntaxError::TS2369); + return Ok(pat); + } + + Ok(pat) + } + + pub(crate) fn parse_constructor_params(&mut self) -> PResult>> { + let mut params = Vec::new_in(self.alloc); + let mut rest_span = Span::default(); + + while !eof!(self) && !is!(self, ')') { + if !rest_span.is_dummy() { + self.emit_err(rest_span, SyntaxError::TS1014); + } + + let param_start = cur_pos!(self); + let decorators = self.parse_decorators(false)?; + let pat_start = cur_pos!(self); + + let mut is_rest = false; + if eat!(self, "...") { + is_rest = true; + let dot3_token = span!(self, pat_start); + + let pat = self.parse_binding_pat_or_ident(false)?; + let type_ann = if self.input.syntax().typescript() && is!(self, ':') { + let cur_pos = cur_pos!(self); + Some(self.parse_ts_type_ann(/* eat_colon */ true, cur_pos)?) + } else { + None + }; + + rest_span = span!(self, pat_start); + let pat = Pat::Rest(self.ast(RestPat { + span: rest_span, + dot3_token, + arg: pat, + type_ann, + })); + params.push(ParamOrTsParamProp::Param(self.ast(Param { + span: span!(self, param_start), + decorators, + pat, + }))); + } else { + params.push(self.parse_constructor_param(param_start, decorators)?); + } + + if !is!(self, ')') { + expect!(self, ','); + if is!(self, ')') && is_rest { + self.emit_err(self.input.prev_span(), SyntaxError::CommaAfterRestElement); + } + } + } + + Ok(params) + } + + fn parse_constructor_param( + &mut self, + param_start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + let (accessibility, is_override, readonly) = if self.input.syntax().typescript() { + let accessibility = self.parse_access_modifier()?; + ( + accessibility, + self.parse_ts_modifier(&["override"], false)?.is_some(), + self.parse_ts_modifier(&["readonly"], false)?.is_some(), + ) + } else { + (None, false, false) + }; + if accessibility.is_none() && !is_override && !readonly { + let pat = self.parse_formal_param_pat()?; + Ok(ParamOrTsParamProp::Param(self.ast(Param { + span: span!(self, param_start), + decorators, + pat, + }))) + } else { + let param = match self.parse_formal_param_pat()? { + Pat::Ident(i) => TsParamPropParam::Ident(i), + Pat::Assign(a) => TsParamPropParam::Assign(a), + node => syntax_error!(self, node.span(), SyntaxError::TsInvalidParamPropPat), + }; + Ok(ParamOrTsParamProp::TsParamProp(self.ast(TsParamProp { + span: span!(self, param_start), + accessibility, + is_override, + readonly, + decorators, + param, + }))) + } + } + + #[allow(dead_code)] + pub(crate) fn parse_setter_param(&mut self, key_span: Span) -> PResult>> { + let params = self.parse_formal_params()?; + let cnt = params.iter().filter(|p| is_not_this(p)).count(); + + if cnt != 1 { + self.emit_err(key_span, SyntaxError::SetterParam); + } + + if !params.is_empty() { + if let Pat::Rest(..) = params[0].pat { + self.emit_err(params[0].pat.span(), SyntaxError::RestPatInSetter); + } + } + + if params.is_empty() { + syntax_error!(self, SyntaxError::SetterParamRequired); + } + + Ok(self.ast(params.into_iter().next().unwrap())) + } + + pub(crate) fn parse_formal_params(&mut self) -> PResult>> { + let mut params = Vec::new_in(self.alloc); + let mut rest_span = Span::default(); + + while !eof!(self) && !is!(self, ')') { + if !rest_span.is_dummy() { + self.emit_err(rest_span, SyntaxError::TS1014); + } + + let param_start = cur_pos!(self); + let decorators = self.parse_decorators(false)?; + let pat_start = cur_pos!(self); + + let pat = if eat!(self, "...") { + let dot3_token = span!(self, pat_start); + + let mut pat = self.parse_binding_pat_or_ident(false)?; + + if eat!(self, '=') { + let right = self.parse_assignment_expr()?; + self.emit_err(pat.span(), SyntaxError::TS1048); + pat = Pat::Assign(self.ast(AssignPat { + span: span!(self, pat_start), + left: pat, + right, + })); + } + + let type_ann = if self.input.syntax().typescript() && is!(self, ':') { + let cur_pos = cur_pos!(self); + let ty = self.parse_ts_type_ann(/* eat_colon */ true, cur_pos)?; + Some(ty) + } else { + None + }; + + rest_span = span!(self, pat_start); + let pat = Pat::Rest(self.ast(RestPat { + span: rest_span, + dot3_token, + arg: pat, + type_ann, + })); + + if self.syntax().typescript() && eat!(self, '?') { + self.emit_err(self.input.prev_span(), SyntaxError::TS1047); + // + } + + pat + } else { + self.parse_formal_param_pat()? + }; + let is_rest = matches!(pat, Pat::Rest(_)); + + params.push(Param { + span: span!(self, param_start), + decorators, + pat, + }); + + if !is!(self, ')') { + expect!(self, ','); + if is_rest && is!(self, ')') { + self.emit_err(self.input.prev_span(), SyntaxError::CommaAfterRestElement); + } + } + } + + Ok(params) + } + + pub(crate) fn parse_unique_formal_params(&mut self) -> PResult>> { + // FIXME: This is wrong + self.parse_formal_params() + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PatType { + BindingPat, + BindingElement, + /// AssignmentPattern + AssignPat, + AssignElement, +} + +impl PatType { + pub fn element(self) -> Self { + match self { + PatType::BindingPat | PatType::BindingElement => PatType::BindingElement, + PatType::AssignPat | PatType::AssignElement => PatType::AssignElement, + } + } +} + +impl<'a, I: Tokens> Parser<'a, I> { + /// This does not return 'rest' pattern because non-last parameter cannot be + /// rest. + pub(crate) fn reparse_expr_as_pat( + &mut self, + pat_ty: PatType, + expr: Expr<'a>, + ) -> PResult> { + if let Expr::Invalid(i) = expr { + return Ok(i.into()); + } + + if pat_ty == PatType::AssignPat { + match expr { + Expr::Object(..) | Expr::Array(..) => { + // It is a Syntax Error if LeftHandSideExpression is either + // an ObjectLiteral or an ArrayLiteral + // and LeftHandSideExpression cannot + // be reparsed as an AssignmentPattern. + } + + _ => { + self.check_assign_target(&expr, true); + } + } + } + + self.reparse_expr_as_pat_inner(pat_ty, expr) + } + + fn reparse_expr_as_pat_inner(&mut self, pat_ty: PatType, expr: Expr<'a>) -> PResult> { + // In dts, we do not reparse. + debug_assert!(!self.input.syntax().dts()); + + let span = expr.span(); + + if pat_ty == PatType::AssignPat { + match expr { + Expr::Object(..) | Expr::Array(..) => { + // It is a Syntax Error if LeftHandSideExpression is either + // an ObjectLiteral or an ArrayLiteral + // and LeftHandSideExpression cannot + // be reparsed as an AssignmentPattern. + } + + _ => match expr { + // It is a Syntax Error if the LeftHandSideExpression is + // CoverParenthesizedExpressionAndArrowParameterList:(Expression) and + // Expression derives a phrase that would produce a Syntax Error according + // to these rules if that phrase were substituted for + // LeftHandSideExpression. This rule is recursively applied. + Expr::Paren(..) => { + return Ok(Pat::Expr(expr)); + } + Expr::Ident(i) => return Ok(Pat::Ident(self.ast(i.into_inner().into()))), + _ => { + return Ok(Pat::Expr(expr)); + } + }, + } + } + + // AssignmentElement: + // DestructuringAssignmentTarget Initializer[+In]? + // + // DestructuringAssignmentTarget: + // LeftHandSideExpression + if pat_ty == PatType::AssignElement { + match expr { + Expr::Array(..) | Expr::Object(..) => {} + + Expr::Member(..) + | Expr::SuperProp(..) + | Expr::Call(..) + | Expr::New(..) + | Expr::Lit(..) + | Expr::Ident(..) + | Expr::Fn(..) + | Expr::Class(..) + | Expr::Paren(..) + | Expr::Tpl(..) + | Expr::TsAs(..) => { + if !expr.is_valid_simple_assignment_target(self.ctx().strict) { + self.emit_err(span, SyntaxError::NotSimpleAssign) + } + match expr { + Expr::Ident(i) => return Ok(Pat::Ident(self.ast(i.into_inner().into()))), + _ => { + return Ok(Pat::Expr(expr)); + } + } + } + + // It's special because of optional initializer + Expr::Assign(..) => {} + + _ => self.emit_err(span, SyntaxError::InvalidPat), + } + } + + match expr { + Expr::Paren(..) => { + self.emit_err(span, SyntaxError::InvalidPat); + Ok(Pat::Invalid(self.ast(Invalid { span }))) + } + Expr::Assign(assign_expr) if assign_expr.op == AssignOp::Assign => { + let AssignExpr { + span, left, right, .. + } = assign_expr.into_inner(); + let left = match left { + AssignTarget::Simple(left) => { + self.reparse_expr_as_pat(pat_ty, left.into_expr(self.alloc))? + } + AssignTarget::Pat(pat) => pat.into(), + }; + Ok(Pat::Assign(self.ast(AssignPat { span, left, right }))) + } + Expr::Object(obj) => { + let obj = obj.into_inner(); + let len = obj.props.len(); + let mut props = Vec::new_in(self.alloc); + for (idx, prop) in obj.props.into_iter().enumerate() { + let span = prop.span(); + let prop = match prop { + PropOrSpread::Prop(prop) => { + let prop = prop.into_inner(); + match prop { + Prop::Shorthand(id) => { + Ok(ObjectPatProp::Assign(self.ast(AssignPatProp { + span: id.span(), + key: id.into_inner().into(), + value: None, + }))) + } + Prop::KeyValue(kv_prop) => { + let kv_prop = kv_prop.into_inner(); + let value = + self.reparse_expr_as_pat(pat_ty.element(), kv_prop.value)?; + Ok(ObjectPatProp::KeyValue(self.ast(KeyValuePatProp { + key: kv_prop.key, + value, + }))) + } + Prop::Assign(assign_prop) => { + let assign_prop = assign_prop.into_inner(); + Ok(ObjectPatProp::Assign(self.ast(AssignPatProp { + span, + key: assign_prop.key.into(), + value: Some(assign_prop.value), + }))) + } + _ => syntax_error!(self, prop.span(), SyntaxError::InvalidPat), + } + } + + PropOrSpread::Spread(spread) => { + let spread = spread.into_inner(); + if idx != len - 1 { + self.emit_err(span, SyntaxError::NonLastRestParam) + } else if let Some(trailing_comma) = + self.state.trailing_commas.get(&obj.span.lo) + { + self.emit_err(*trailing_comma, SyntaxError::CommaAfterRestElement); + }; + + let element_pat_ty = pat_ty.element(); + let pat = if let PatType::BindingElement = element_pat_ty { + if let Expr::Ident(i) = spread.expr { + Pat::Ident(self.ast(i.into_inner().into())) + } else { + self.emit_err(span, SyntaxError::DotsWithoutIdentifier); + Pat::Invalid(self.ast(Invalid { span })) + } + } else { + self.reparse_expr_as_pat(element_pat_ty, spread.expr)? + }; + + if let Pat::Assign(_) = pat { + self.emit_err(span, SyntaxError::TS1048) + }; + + Ok(ObjectPatProp::Rest(self.ast(RestPat { + span, + dot3_token: spread.dot3_token, + arg: pat, + type_ann: None, + }))) + } + }?; + props.push(prop); + } + Ok(Pat::Object(self.ast(ObjectPat { + span: obj.span, + props, + optional: false, + type_ann: None, + }))) + } + Expr::Ident(ident) => Ok(Pat::Ident(self.ast(ident.into_inner().into()))), + Expr::Array(array) => { + let mut array = array.into_inner(); + if array.elems.is_empty() { + return Ok(Pat::Array(self.ast(ArrayPat { + span, + elems: Vec::new_in(self.alloc), + optional: false, + type_ann: None, + }))); + } + + // Trailing comma may exist. We should remove those commas. + let count_of_trailing_comma = + array.elems.iter().rev().take_while(|e| e.is_none()).count(); + + let len = array.elems.len(); + let mut params = + Vec::with_capacity_in(array.elems.len() - count_of_trailing_comma, self.alloc); + + // Comma or other pattern cannot follow a rest pattern. + let idx_of_rest_not_allowed = if count_of_trailing_comma == 0 { + len - 1 + } else { + // last element is comma, so rest is not allowed for every pattern element. + len - count_of_trailing_comma + }; + + for expr in array.elems.drain(..idx_of_rest_not_allowed) { + match expr { + Some( + expr @ ExprOrSpread { + spread: Some(..), .. + }, + ) => self.emit_err(expr.span(), SyntaxError::NonLastRestParam), + Some(ExprOrSpread { expr, .. }) => { + params.push(self.reparse_expr_as_pat(pat_ty.element(), expr).map(Some)?) + } + None => params.push(None), + } + } + + if count_of_trailing_comma == 0 { + let expr = array.elems.into_iter().next().unwrap(); + let outer_expr_span = expr.span(); + let last = match expr { + // Rest + Some(ExprOrSpread { + spread: Some(dot3_token), + expr, + }) => { + // TODO: is BindingPat correct? + if let Expr::Assign(_) = expr { + self.emit_err(outer_expr_span, SyntaxError::TS1048); + }; + if let Some(trailing_comma) = self.state.trailing_commas.get(&span.lo) { + self.emit_err(*trailing_comma, SyntaxError::CommaAfterRestElement); + } + let expr_span = expr.span(); + self.reparse_expr_as_pat(pat_ty.element(), expr) + .map(|pat| { + Pat::Rest(self.ast(RestPat { + span: expr_span, + dot3_token, + arg: pat, + type_ann: None, + })) + }) + .map(Some)? + } + Some(ExprOrSpread { expr, .. }) => { + // TODO: is BindingPat correct? + self.reparse_expr_as_pat(pat_ty.element(), expr).map(Some)? + } + // TODO: syntax error if last element is ellison and ...rest exists. + None => None, + }; + params.push(last); + } + Ok(Pat::Array(self.ast(ArrayPat { + span, + elems: params, + optional: false, + type_ann: None, + }))) + } + + // Invalid patterns. + // Note that assignment expression with '=' is valid, and handled above. + Expr::Lit(..) | Expr::Assign(..) => { + self.emit_err(span, SyntaxError::InvalidPat); + Ok(Pat::Invalid(self.ast(Invalid { span }))) + } + + Expr::Yield(..) if self.ctx().in_generator => { + self.emit_err(span, SyntaxError::InvalidPat); + Ok(Pat::Invalid(self.ast(Invalid { span }))) + } + + _ => { + self.emit_err(span, SyntaxError::InvalidPat); + + Ok(Pat::Invalid(self.ast(Invalid { span }))) + } + } + } + + pub(crate) fn parse_paren_items_as_params( + &mut self, + mut exprs: Vec<'a, AssignTargetOrSpread<'a>>, + trailing_comma: Option, + ) -> PResult>> { + let pat_ty = PatType::BindingPat; + + let len = exprs.len(); + if len == 0 { + return Ok(Vec::new_in(self.alloc)); + } + + let mut params = Vec::with_capacity_in(len, self.alloc); + + for expr in exprs.drain(..len - 1) { + match expr { + AssignTargetOrSpread::ExprOrSpread(expr_or_spread) => { + if expr_or_spread.spread.is_some() { + self.emit_err(expr_or_spread.span(), SyntaxError::TS1014) + } else { + params.push( + self.reparse_expr_as_pat(pat_ty, expr_or_spread.into_inner().expr)?, + ) + } + } + AssignTargetOrSpread::Pat(ref pat) if pat.is_rest() => { + self.emit_err(expr.span(), SyntaxError::TS1014) + } + AssignTargetOrSpread::Pat(pat) => params.push(pat), + } + } + + debug_assert_eq!(exprs.len(), 1); + let expr = exprs.into_iter().next().unwrap(); + let outer_expr_span = expr.span(); + let last = match expr { + // Rest + AssignTargetOrSpread::ExprOrSpread(expr_or_spread) => { + if let Some(dot3_token) = expr_or_spread.spread { + if expr_or_spread.expr.is_assign() { + self.emit_err(outer_expr_span, SyntaxError::TS1048) + }; + if let Some(trailing_comma) = trailing_comma { + self.emit_err(trailing_comma, SyntaxError::CommaAfterRestElement); + } + let expr_span = expr_or_spread.expr.span(); + self.reparse_expr_as_pat(pat_ty, expr_or_spread.into_inner().expr) + .map(|pat| { + Pat::Rest(self.ast(RestPat { + span: expr_span, + dot3_token, + arg: pat, + type_ann: None, + })) + })? + } else { + self.reparse_expr_as_pat(pat_ty, expr_or_spread.into_inner().expr)? + } + } + AssignTargetOrSpread::Pat(pat) => { + if let Some(trailing_comma) = trailing_comma { + if pat.is_rest() { + self.emit_err(trailing_comma, SyntaxError::CommaAfterRestElement); + } + } + pat + } + }; + params.push(last); + + if self.ctx().strict { + for param in params.iter() { + self.pat_is_valid_argument_in_strict(param) + } + } + + Ok(params) + } + + /// argument of arrow is pattern, although idents in pattern is already + /// checked if is a keyword, it should also be checked if is arguments or + /// eval + fn pat_is_valid_argument_in_strict(&self, pat: &Pat<'a>) { + match pat { + Pat::Ident(i) => { + if i.is_reserved_in_strict_bind() { + self.emit_strict_mode_err(i.span, SyntaxError::EvalAndArgumentsInStrict) + } + } + Pat::Array(arr) => { + for pat in arr.elems.iter().flatten() { + self.pat_is_valid_argument_in_strict(pat) + } + } + Pat::Rest(r) => self.pat_is_valid_argument_in_strict(&r.arg), + Pat::Object(obj) => { + for prop in obj.props.iter() { + match prop { + ObjectPatProp::KeyValue(kv) => { + self.pat_is_valid_argument_in_strict(&kv.value) + } + ObjectPatProp::Rest(rest_pat) => { + self.pat_is_valid_argument_in_strict(&rest_pat.arg) + } + ObjectPatProp::Assign(assign_pat) => { + if assign_pat.key.is_reserved_in_strict_bind() { + self.emit_strict_mode_err( + assign_pat.key.span, + SyntaxError::EvalAndArgumentsInStrict, + ) + } + } + } + } + } + Pat::Assign(a) => self.pat_is_valid_argument_in_strict(&a.left), + Pat::Invalid(_) | Pat::Expr(_) => (), + } + } +} + +#[cfg(test)] +mod tests { + use swc_allocator::vec; + use swc_common::DUMMY_SP as span; + use swc_ecma_visit::assert_eq_ignore_span_arena; + + use super::*; + + fn array_pat<'a>(alloc: &'a Allocator, s: &'static str) -> Pat<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_array_binding_pat()) + } + + fn object_pat<'a>(alloc: &'a Allocator, s: &'static str) -> Pat<'a> { + test_parser(alloc, s, Syntax::default(), |p| { + p.parse_binding_pat_or_ident(false) + }) + } + + fn ident(s: &str) -> Ident { + Ident::new_no_ctxt(s.into(), span) + } + + fn ident_name(s: &str) -> IdentName { + IdentName::new(s.into(), span) + } + + fn rest(alloc: &Allocator) -> Option> { + Some(Pat::Rest(Box::new_in( + RestPat { + span, + dot3_token: span, + type_ann: None, + arg: Pat::Ident(Box::new_in(ident("tail").into(), alloc)), + }, + alloc, + ))) + } + + #[test] + fn array_pat_simple() { + let alloc = Allocator::default(); + let mut elems = Vec::new_in(&alloc); + elems.push(Some(Pat::Ident(Box::new_in(ident("a").into(), &alloc)))); + elems.push(Some(Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("b").into(), &alloc)))], + type_ann: None, + }, + &alloc, + )))); + elems.push(Some(Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("c").into(), &alloc)))], + type_ann: None, + }, + &alloc, + )))); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[a, [b], [c]]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems, + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_pat_empty_start() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[, a, [b], [c]]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; + None, + Some(Pat::Ident(Box::new_in(ident("a").into(), &alloc))), + Some(Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("b").into(), &alloc)))], + type_ann: None + } + , &alloc))), + Some(Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("c").into(), &alloc)))], + type_ann: None + } + , &alloc))) + ], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_pat_empty() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[a, , [b], [c]]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; + Some(Pat::Ident(Box::new_in(ident("a").into(), &alloc))), + None, + Some(Pat::Array(Box::new_in(ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("b").into(), &alloc)))], + type_ann: None + }, &alloc))), + Some(Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; Some(Pat::Ident(Box::new_in(ident("c").into(), &alloc)))], + type_ann: None + } + , &alloc))) + ], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_binding_pattern_tail() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[...tail]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; rest(&alloc)], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_binding_pattern_assign() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[,a=1,]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc;None, + Some(Pat::Assign(Box::new_in( + AssignPat { + span, + left: Pat::Ident(Box::new_in(ident("a").into(), &alloc)), + right: Expr::Lit(Box::new_in(Lit::Num(Box::new_in( + Number { + span, + value: 1.0, + raw: Some("1".into()) + } + , &alloc)), &alloc)) + } + , &alloc))) + ], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_binding_pattern_tail_with_elems() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[,,,...tail]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; None, None, None, rest(&alloc)], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn array_binding_pattern_tail_inside_tail() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + array_pat(&alloc, "[,,,...[...tail]]"), + Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; + None, + None, + None, + Some(Pat::Rest(Box::new_in( + RestPat { + span, + dot3_token: span, + type_ann: None, + arg: Pat::Array(Box::new_in( + ArrayPat { + span, + optional: false, + elems: vec![in &alloc; rest(&alloc)], + type_ann: None + } + , &alloc)) + } + , &alloc))) + ], + type_ann: None + }, + &alloc + )) + ); + } + + #[test] + fn object_binding_pattern_tail() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + object_pat(&alloc, "{...obj}"), + Pat::Object(Box::new_in( + ObjectPat { + span, + type_ann: None, + optional: false, + props: vec![in &alloc; ObjectPatProp::Rest(Box::new_in( + RestPat { + span, + dot3_token: span, + type_ann: None, + arg: Pat::Ident(Box::new_in(ident("obj").into(), &alloc)) + } + , &alloc))] + }, + &alloc + )) + ); + } + + #[test] + fn object_binding_pattern_with_prop() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + object_pat(&alloc, "{prop = 10 }"), + Pat::Object(Box::new_in( + ObjectPat { + span, + type_ann: None, + optional: false, + props: vec![in &alloc; ObjectPatProp::Assign(Box::new_in( + AssignPatProp { + span, + key: ident("prop").into(), + value: Some(Expr::Lit(Box::new_in(Lit::Num(Box::new_in( +Number { + span, + value: 10.0, + raw: Some("10".into()) + } + , &alloc)), &alloc))) + } + , &alloc))] + }, + &alloc + )) + ); + } + + #[test] + fn object_binding_pattern_with_prop_and_label() { + fn prop<'a>( + alloc: &'a Allocator, + key: PropName<'a>, + assign_name: &str, + expr: Expr<'a>, + ) -> PropOrSpread<'a> { + PropOrSpread::Prop(Box::new_in( + Prop::KeyValue(Box::new_in( + KeyValueProp { + key, + value: Expr::Assign(Box::new_in( + AssignExpr { + span, + op: AssignOp::Assign, + left: AssignTarget::Simple(SimpleAssignTarget::Ident(Box::new_in( + ident(assign_name).into(), + alloc, + ))), + right: expr, + }, + alloc, + )), + }, + alloc, + )), + alloc, + )) + } + + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + object_pat( + &alloc, + "{obj = {$: num = 10, '': sym = '', \" \": quote = \" \", _: under = [...tail],}}" + ), + Pat::Object(Box::new_in( + ObjectPat { + span, + type_ann: None, + optional: false, + props: vec![in &alloc; ObjectPatProp::Assign(Box::new_in( +AssignPatProp { + span, + key: ident("obj").into(), + value: Some(Expr::Object(Box::new_in(ObjectLit { + span, + props: vec![in &alloc; + prop( + &alloc, + PropName::Ident(Box::new_in(ident_name("$"), &alloc)), + "num", + Expr::Lit(Box::new_in(Lit::Num(Box::new_in( +Number { + span, + value: 10.0, + raw: Some("10".into()) + } + , &alloc)), &alloc)) + ), + prop( + &alloc, + PropName::Str(Box::new_in(Str { + span, + value: "".into(), + raw: Some("''".into()), + }, &alloc)), + "sym", + Expr::Lit(Box::new_in(Lit::Str(Box::new_in(Str { + span, + value: "".into(), + raw: Some("''".into()), + }, &alloc)), &alloc)) + ), + prop( + &alloc, + PropName::Str(Box::new_in(Str { + span, + value: " ".into(), + raw: Some("\" \"".into()), + }, &alloc)), + "quote", + Expr::Lit(Box::new_in(Lit::Str(Box::new_in( +Str { + span, + value: " ".into(), + raw: Some("\" \"".into()), + } + , &alloc)), &alloc)) + ), + prop( + &alloc, + PropName::Ident(Box::new_in(ident_name("_"), &alloc)), + "under", + Expr::Array(Box::new_in( + ArrayLit { + span, + elems: vec![in &alloc; Some(ExprOrSpread { + spread: Some(span), + expr: Expr::Ident(Box::new_in(ident("tail"), &alloc)) + })] + } + , &alloc)) + ), + ] + }, &alloc))) + } + , &alloc))] + }, + &alloc + )) + ); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/stmt.rs b/crates/swc_ecma_parser/src/arena/parser/stmt.rs new file mode 100644 index 000000000000..1ba50affc129 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/stmt.rs @@ -0,0 +1,2936 @@ +use swc_allocator::arena::{Box, CloneIn, Vec}; +use swc_common::{BytePos, Span, Spanned}; +use swc_ecma_ast::arena::*; + +use super::Parser; +use crate::{ + arena::parser::pat::PatType, + error::{Error, SyntaxError}, + token::Token, + Context, PResult, Tokens, +}; + +mod module_item; + +impl<'a, I: Tokens> Parser<'a, I> { + pub fn parse_module_item(&mut self) -> PResult> { + self.parse_stmt_like(true, true) + } + + pub(crate) fn parse_block_body( + &mut self, + mut allow_directives: bool, + top_level: bool, + end: Option<&'static Token>, + ) -> PResult> + where + Self: StmtLikeParser<'a, Type>, + Type: IsDirective<'a> + From>, + { + trace_cur!(self, parse_block_body); + + let old_ctx = self.ctx(); + + let mut stmts = Vec::new_in(self.alloc); + while { + if self.input.cur().is_none() && end.is_some() { + let eof_text = self.input.dump_cur(); + self.emit_err( + self.input.cur_span(), + SyntaxError::Expected(end.unwrap(), eof_text), + ); + false + } else { + let c = cur!(self, false).ok(); + c != end + } + } { + let stmt = self.parse_stmt_like(true, top_level)?; + if allow_directives { + allow_directives = false; + if stmt.is_use_strict() { + let ctx = Context { + strict: true, + ..old_ctx + }; + self.set_ctx(ctx); + + if self.input.knows_cur() && !is!(self, ';') { + unreachable!( + "'use strict'; directive requires parser.input.cur to be empty or \ + '}}', but current token was: {:?}", + self.input.cur() + ) + } + } + } + + stmts.push(stmt); + } + + if self.input.cur().is_some() && end.is_some() { + bump!(self); + } + + self.set_ctx(old_ctx); + + Ok(stmts) + } + + /// Parse a statement but not a declaration. + pub fn parse_stmt(&mut self, top_level: bool) -> PResult> { + trace_cur!(self, parse_stmt); + self.parse_stmt_like(false, top_level) + } + + /// Parse a statement and maybe a declaration. + pub fn parse_stmt_list_item(&mut self, top_level: bool) -> PResult> { + trace_cur!(self, parse_stmt_list_item); + self.parse_stmt_like(true, top_level) + } + + /// Parse a statement, declaration or module item. + fn parse_stmt_like(&mut self, include_decl: bool, top_level: bool) -> PResult + where + Self: StmtLikeParser<'a, Type>, + Type: IsDirective<'a> + From>, + { + trace_cur!(self, parse_stmt_like); + + let _tracing = debug_tracing!(self, "parse_stmt_like"); + + let start = cur_pos!(self); + let decorators = self.parse_decorators(true)?; + + if is_one_of!(self, "import", "export") { + return self.handle_import_export(top_level, decorators); + } + + let ctx = Context { + will_expect_colon_for_cond: false, + allow_using_decl: true, + ..self.ctx() + }; + self.with_ctx(ctx) + .parse_stmt_internal(start, include_decl, top_level, decorators) + .map(From::from) + } + + /// `parseStatementContent` + fn parse_stmt_internal( + &mut self, + start: BytePos, + include_decl: bool, + top_level: bool, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + trace_cur!(self, parse_stmt_internal); + + let is_typescript = self.input.syntax().typescript(); + + if is_typescript && is!(self, "const") && peeked_is!(self, "enum") { + assert_and_bump!(self, "const"); + assert_and_bump!(self, "enum"); + return self + .parse_ts_enum_decl(start, true) + .map(Decl::from) + .map(|decl| self.ast(decl)) + .map(Stmt::from); + } + + match cur!(self, true) { + tok!("await") if include_decl || top_level => { + if top_level { + self.state.found_module_item = true; + if !self.ctx().can_be_module { + self.emit_err(self.input.cur_span(), SyntaxError::TopLevelAwaitInScript); + } + } + + if peeked_is!(self, "using") { + let eaten_await = Some(self.input.cur_pos()); + assert_and_bump!(self, "await"); + let v = self.parse_using_decl(start, true)?; + if let Some(v) = v { + return Ok(Stmt::Decl(self.ast(Decl::Using(v)))); + } + + let expr = self.parse_await_expr(eaten_await)?; + let expr = self + .include_in_expr(true) + .parse_bin_op_recursively(expr, 0)?; + eat!(self, ';'); + + let span = span!(self, start); + return Ok(Stmt::Expr(self.ast(ExprStmt { span, expr }))); + } + } + + tok!("break") | tok!("continue") => { + let is_break = is!(self, "break"); + bump!(self); + + let label = if eat!(self, ';') { + None + } else { + let i = self.parse_label_ident().map(Some)?; + expect!(self, ';'); + i + }; + + let span = span!(self, start); + if is_break { + if label.is_some() && !self.state.labels.contains(&label.as_ref().unwrap().sym) + { + self.emit_err(span, SyntaxError::TS1116); + } else if !self.ctx().is_break_allowed { + self.emit_err(span, SyntaxError::TS1105); + } + } else if !self.ctx().is_continue_allowed { + self.emit_err(span, SyntaxError::TS1115); + } else if label.is_some() + && !self.state.labels.contains(&label.as_ref().unwrap().sym) + { + self.emit_err(span, SyntaxError::TS1107); + } + + return Ok(if is_break { + Stmt::Break(self.ast(BreakStmt { span, label })) + } else { + Stmt::Continue(self.ast(ContinueStmt { span, label })) + }); + } + + tok!("debugger") => { + bump!(self); + expect!(self, ';'); + return Ok(Stmt::Debugger(self.ast(DebuggerStmt { + span: span!(self, start), + }))); + } + + tok!("do") => { + return self.parse_do_stmt(); + } + + tok!("for") => { + return self.parse_for_stmt(); + } + + tok!("function") => { + if !include_decl { + self.emit_err(self.input.cur_span(), SyntaxError::DeclNotAllowed); + } + + return self + .parse_fn_decl(decorators) + .map(|decl| self.ast(decl)) + .map(Stmt::from); + } + + tok!("class") => { + if !include_decl { + self.emit_err(self.input.cur_span(), SyntaxError::DeclNotAllowed); + } + return self + .parse_class_decl(start, start, decorators, false) + .map(|decl| self.ast(decl)) + .map(Stmt::from); + } + + tok!("if") => { + return self + .parse_if_stmt() + .map(|stmt| self.ast(stmt)) + .map(Stmt::If); + } + + tok!("return") => { + return self.parse_return_stmt(); + } + + tok!("switch") => { + return self.parse_switch_stmt(); + } + + tok!("throw") => { + return self.parse_throw_stmt(); + } + + // Error recovery + tok!("catch") => { + let span = self.input.cur_span(); + self.emit_err(span, SyntaxError::TS1005); + + let _ = self.parse_catch_clause(); + let _ = self.parse_finally_block(); + + return Ok(Stmt::Expr(self.ast(ExprStmt { + span, + expr: Expr::Invalid(self.ast(Invalid { span })), + }))); + } + + // Error recovery + tok!("finally") => { + let span = self.input.cur_span(); + self.emit_err(span, SyntaxError::TS1005); + + let _ = self.parse_finally_block(); + + return Ok(Stmt::Expr(self.ast(ExprStmt { + span, + expr: Expr::Invalid(self.ast(Invalid { span })), + }))); + } + + tok!("try") => { + return self.parse_try_stmt(); + } + + tok!("with") => { + return self.parse_with_stmt(); + } + + tok!("while") => { + return self.parse_while_stmt(); + } + + tok!("var") => { + let v = self.parse_var_stmt(false)?; + return Ok(Stmt::Decl(self.ast(Decl::Var(v)))); + } + + tok!("const") if include_decl => { + let v = self.parse_var_stmt(false)?; + return Ok(Stmt::Decl(self.ast(Decl::Var(v)))); + } + + // 'let' can start an identifier reference. + tok!("let") if include_decl => { + let strict = self.ctx().strict; + let is_keyword = match peek!(self) { + Some(t) => t.kind().follows_keyword_let(strict), + _ => false, + }; + + if is_keyword { + let v = self.parse_var_stmt(false)?; + return Ok(Stmt::Decl(self.ast(Decl::Var(v)))); + } + } + + tok!("using") if include_decl => { + let v = self.parse_using_decl(start, false)?; + if let Some(v) = v { + return Ok(Stmt::Decl(self.ast(Decl::Using(v)))); + } + } + + tok!("interface") => { + if is_typescript + && peeked_is!(self, IdentName) + && !self.input.has_linebreak_between_cur_and_peeked() + { + let start = self.input.cur_pos(); + bump!(self); + let decl = Decl::TsInterface(self.parse_ts_interface_decl(start)?); + return Ok(Stmt::Decl(self.ast(decl))); + } + } + + tok!("type") => { + if is_typescript + && peeked_is!(self, IdentName) + && !self.input.has_linebreak_between_cur_and_peeked() + { + let start = self.input.cur_pos(); + bump!(self); + let decl = Decl::TsTypeAlias(self.parse_ts_type_alias_decl(start)?); + return Ok(Stmt::Decl(self.ast(decl))); + } + } + + tok!("enum") => { + if is_typescript + && peeked_is!(self, IdentName) + && !self.input.has_linebreak_between_cur_and_peeked() + { + let start = self.input.cur_pos(); + bump!(self); + let decl = self.parse_ts_enum_decl(start, false)?; + return Ok(Stmt::Decl(self.ast(Decl::TsEnum(decl)))); + } + } + + tok!('{') => { + let ctx = Context { + allow_using_decl: true, + ..self.ctx() + }; + return self.with_ctx(ctx).parse_with(|p| { + p.parse_block(false) + .map(|stmt| p.ast(stmt)) + .map(Stmt::Block) + }); + } + + _ => {} + } + + if eat_exact!(self, ';') { + return Ok(Stmt::Empty(self.ast(EmptyStmt { + span: span!(self, start), + }))); + } + + // Handle async function foo() {} + if is!(self, "async") + && peeked_is!(self, "function") + && !self.input.has_linebreak_between_cur_and_peeked() + { + return self + .parse_async_fn_decl(decorators) + .map(|decl| self.ast(decl)) + .map(From::from); + } + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + let expr = self.include_in_expr(true).parse_expr()?; + + let expr = match expr { + Expr::Ident(ident) => { + if eat!(self, ':') { + return self.parse_labelled_stmt(ident.into_inner()); + } + Expr::Ident(ident) + } + _ => self.verify_expr(expr)?, + }; + if let Expr::Ident(ident) = &expr { + if &*ident.sym == "interface" && self.input.had_line_break_before_cur() { + self.emit_strict_mode_err( + ident.span, + SyntaxError::InvalidIdentInStrict(ident.sym.clone()), + ); + + eat!(self, ';'); + + return Ok(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + }))); + } + + if self.input.syntax().typescript() { + if let Some(decl) = + self.parse_ts_expr_stmt(decorators, ident.clone_in(self.alloc).into_inner())? + { + return Ok(Stmt::Decl(self.ast(decl))); + } + } + } + + if let Expr::Ident(ident) = &expr { + match ident.sym.as_str() { + "enum" | "interface" => { + self.emit_strict_mode_err( + ident.span, + SyntaxError::InvalidIdentInStrict(ident.sym.clone()), + ); + } + _ => {} + } + } + + if self.syntax().typescript() { + if let Expr::Ident(i) = &expr { + match i.sym.as_str() { + "public" | "static" | "abstract" => { + if eat!(self, "interface") { + self.emit_err(i.span, SyntaxError::TS2427); + return self + .parse_ts_interface_decl(start) + .map(Decl::from) + .map(|decl| self.ast(decl)) + .map(Stmt::from); + } + } + _ => {} + } + } + } + + if eat!(self, ';') { + Ok(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + }))) + } else { + if let Token::BinOp(..) = *cur!(self, false)? { + self.emit_err(self.input.cur_span(), SyntaxError::TS1005); + let expr = self.parse_bin_op_recursively(expr, 0)?; + return Ok(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + }))); + } + + syntax_error!( + self, + SyntaxError::ExpectedSemiForExprStmt { expr: expr.span() } + ); + } + } + + /// Utility function used to parse large if else statements iteratively. + /// + /// THis function is recursive, but it is very cheap so stack overflow will + /// not occur. + fn adjust_if_else_clause(&mut self, cur: &mut Box<'a, IfStmt<'a>>, alt: Stmt<'a>) { + cur.span = span!(self, cur.span.lo); + + if let Some(Stmt::If(prev_alt)) = cur.alt.as_mut() { + self.adjust_if_else_clause(prev_alt, alt) + } else { + debug_assert_eq!(cur.alt, None); + cur.alt = Some(alt); + } + } + + fn parse_if_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "if"); + let if_token = self.input.prev_span(); + + expect!(self, '('); + let ctx = Context { + ignore_else_clause: false, + ..self.ctx() + }; + let test = self + .with_ctx(ctx) + .include_in_expr(true) + .parse_expr() + .map_err(|err| { + Error::new( + err.span(), + SyntaxError::WithLabel { + inner: std::boxed::Box::new(err), + span: if_token, + note: "Tried to parse the condition for an if statement", + }, + ) + })?; + + expect!(self, ')'); + + let cons = { + // Prevent stack overflow + crate::maybe_grow(256 * 1024, 1024 * 1024, || { + // Annex B + if !self.ctx().strict && is!(self, "function") { + // TODO: report error? + } + let ctx = Context { + ignore_else_clause: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_stmt(false) + })? + }; + + // We parse `else` branch iteratively, to avoid stack overflow + // See https://github.com/swc-project/swc/pull/3961 + + let alt = if self.ctx().ignore_else_clause { + None + } else { + let mut cur = None; + + let ctx = Context { + ignore_else_clause: true, + ..self.ctx() + }; + + let last = loop { + if !eat!(self, "else") { + break None; + } + + if !is!(self, "if") { + let ctx = Context { + ignore_else_clause: false, + ..self.ctx() + }; + + // As we eat `else` above, we need to parse statement once. + let last = self.with_ctx(ctx).parse_stmt(false)?; + break Some(last); + } + + // We encountered `else if` + + let alt = self.with_ctx(ctx).parse_if_stmt()?; + + match &mut cur { + Some(cur) => { + self.adjust_if_else_clause(cur, Stmt::If(self.ast(alt))); + } + _ => { + cur = Some(self.ast(alt)); + } + } + }; + + match cur { + Some(mut cur) => { + if let Some(last) = last { + self.adjust_if_else_clause(&mut cur, last); + } + Some(Stmt::If(cur)) + } + _ => last, + } + }; + + let span = span!(self, start); + Ok(IfStmt { + span, + test, + cons, + alt, + }) + } + + fn parse_return_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + let stmt = self.parse_with(|p| { + assert_and_bump!(p, "return"); + + let arg = if is!(p, ';') { + None + } else { + p.include_in_expr(true).parse_expr().map(Some)? + }; + expect!(p, ';'); + Ok(Stmt::Return(p.ast(ReturnStmt { + span: span!(p, start), + arg, + }))) + }); + + if !self.ctx().in_function && !self.input.syntax().allow_return_outside_function() { + self.emit_err(span!(self, start), SyntaxError::ReturnNotAllowed); + } + + stmt + } + + fn parse_switch_stmt(&mut self) -> PResult> { + let switch_start = cur_pos!(self); + + assert_and_bump!(self, "switch"); + + expect!(self, '('); + let discriminant = self.include_in_expr(true).parse_expr()?; + expect!(self, ')'); + + let mut cases = Vec::new_in(self.alloc); + let mut span_of_previous_default = None; + + expect!(self, '{'); + let ctx = Context { + is_break_allowed: true, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_with(|p| { + while is_one_of!(p, "case", "default") { + let mut cons = Vec::new_in(p.alloc); + let is_case = is!(p, "case"); + let case_start = cur_pos!(p); + bump!(p); + let test = if is_case { + p.include_in_expr(true).parse_expr().map(Some)? + } else { + if let Some(previous) = span_of_previous_default { + syntax_error!(p, SyntaxError::MultipleDefault { previous }); + } + span_of_previous_default = Some(span!(p, case_start)); + + None + }; + expect!(p, ':'); + + while !eof!(p) && !is_one_of!(p, "case", "default", '}') { + cons.push(p.parse_stmt_list_item(false)?); + } + + cases.push(SwitchCase { + span: Span::new(case_start, p.input.prev_span().hi), + test, + cons, + }); + } + + Ok(()) + })?; + + // eof or rbrace + expect!(self, '}'); + + Ok(Stmt::Switch(self.ast(SwitchStmt { + span: span!(self, switch_start), + discriminant, + cases, + }))) + } + + fn parse_throw_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "throw"); + + if self.input.had_line_break_before_cur() { + // TODO: Suggest throw arg; + syntax_error!(self, SyntaxError::LineBreakInThrow); + } + + let arg = self.include_in_expr(true).parse_expr()?; + expect!(self, ';'); + + let span = span!(self, start); + Ok(Stmt::Throw(self.ast(ThrowStmt { span, arg }))) + } + + fn parse_try_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + assert_and_bump!(self, "try"); + + let block = self.parse_block(false)?; + + let catch_start = cur_pos!(self); + let handler = self.parse_catch_clause()?; + let finalizer = self.parse_finally_block()?; + + if handler.is_none() && finalizer.is_none() { + self.emit_err(Span::new(catch_start, catch_start), SyntaxError::TS1005); + } + + let span = span!(self, start); + Ok(Stmt::Try(self.ast(TryStmt { + span, + block, + handler, + finalizer, + }))) + } + + fn parse_catch_clause(&mut self) -> PResult>> { + let start = cur_pos!(self); + + Ok(if eat!(self, "catch") { + let param = self.parse_catch_param()?; + + self.parse_block(false) + .map(|body| CatchClause { + span: span!(self, start), + param, + body, + }) + .map(Some)? + } else { + None + }) + } + + fn parse_finally_block(&mut self) -> PResult>> { + Ok(if eat!(self, "finally") { + self.parse_block(false).map(Some)? + } else { + None + }) + } + + /// It's optional since es2019 + fn parse_catch_param(&mut self) -> PResult>> { + if eat!(self, '(') { + let mut pat = self.parse_binding_pat_or_ident(false)?; + + let type_ann_start = cur_pos!(self); + + if self.syntax().typescript() && eat!(self, ':') { + let ctx = Context { + in_type: true, + ..self.ctx() + }; + + let ty = self.with_ctx(ctx).parse_with(|p| p.parse_ts_type())?; + // self.emit_err(ty.span(), SyntaxError::TS1196); + + match &mut pat { + Pat::Ident(p) => { + p.type_ann = Some(self.ast(TsTypeAnn { + span: span!(self, type_ann_start), + type_ann: ty, + })); + } + Pat::Array(p) => { + p.type_ann = Some(self.ast(TsTypeAnn { + span: span!(self, type_ann_start), + type_ann: ty, + })); + } + Pat::Rest(p) => { + p.type_ann = Some(self.ast(TsTypeAnn { + span: span!(self, type_ann_start), + type_ann: ty, + })); + } + Pat::Object(p) => { + p.type_ann = Some(self.ast(TsTypeAnn { + span: span!(self, type_ann_start), + type_ann: ty, + })); + } + Pat::Assign(..) => {} + Pat::Invalid(_) => {} + Pat::Expr(_) => {} + } + } + expect!(self, ')'); + Ok(Some(pat)) + } else { + Ok(None) + } + } + + pub(crate) fn parse_using_decl( + &mut self, + start: BytePos, + is_await: bool, + ) -> PResult>>> { + // using + // reader = init() + + // is two statements + let _ = cur!(self, false); + if self.input.has_linebreak_between_cur_and_peeked() { + return Ok(None); + } + + if !peeked_is!(self, BindingIdent) { + return Ok(None); + } + + assert_and_bump!(self, "using"); + + let mut decls = Vec::new_in(self.alloc); + let mut first = true; + while first || eat!(self, ',') { + if first { + first = false; + } + + // Handle + // var a,; + // + // NewLine is ok + if is_exact!(self, ';') || eof!(self) { + let span = self.input.prev_span(); + self.emit_err(span, SyntaxError::TS1009); + break; + } + + decls.push(self.parse_var_declarator(false, VarDeclKind::Var)?); + } + + if !self.syntax().explicit_resource_management() { + self.emit_err(span!(self, start), SyntaxError::UsingDeclNotEnabled); + } + + if !self.ctx().allow_using_decl { + self.emit_err(span!(self, start), SyntaxError::UsingDeclNotAllowed); + } + + for decl in &decls { + match decl.name { + Pat::Ident(..) => {} + _ => { + self.emit_err(span!(self, start), SyntaxError::InvalidNameInUsingDecl); + } + } + + if decl.init.is_none() { + self.emit_err(span!(self, start), SyntaxError::InitRequiredForUsingDecl); + } + } + + Ok(Some(self.ast(UsingDecl { + span: span!(self, start), + is_await, + decls, + }))) + } + + pub(crate) fn parse_var_stmt(&mut self, for_loop: bool) -> PResult>> { + let start = cur_pos!(self); + let kind = match bump!(self) { + tok!("const") => VarDeclKind::Const, + tok!("let") => VarDeclKind::Let, + tok!("var") => VarDeclKind::Var, + _ => unreachable!(), + }; + let var_span = span!(self, start); + let should_include_in = kind != VarDeclKind::Var || !for_loop; + + if self.syntax().typescript() && for_loop { + let res = if is_one_of!(self, "in", "of") { + self.ts_look_ahead(|p| { + // + if !eat!(p, "of") && !eat!(p, "in") { + return Ok(false); + } + + p.parse_assignment_expr()?; + expect!(p, ')'); + + Ok(true) + }) + } else { + Ok(false) + }; + + match res { + Ok(true) => { + let pos = var_span.hi(); + let span = Span::new(pos, pos); + self.emit_err(span, SyntaxError::TS1123); + + return Ok(self.ast(VarDecl { + span: span!(self, start), + kind, + declare: false, + decls: Vec::new_in(self.alloc), + ctxt: Default::default(), + })); + } + Err(..) => {} + _ => {} + } + } + + let mut decls = Vec::new_in(self.alloc); + let mut first = true; + while first || eat!(self, ',') { + if first { + first = false; + } + + let ctx = if should_include_in { + Context { + include_in_expr: true, + ..self.ctx() + } + } else { + self.ctx() + }; + + // Handle + // var a,; + // + // NewLine is ok + if is_exact!(self, ';') || eof!(self) { + let prev_span = self.input.prev_span(); + let span = if prev_span == var_span { + Span::new(prev_span.hi, prev_span.hi) + } else { + prev_span + }; + self.emit_err(span, SyntaxError::TS1009); + break; + } + + decls.push(self.with_ctx(ctx).parse_var_declarator(for_loop, kind)?); + } + + if !for_loop && !eat!(self, ';') { + self.emit_err(self.input.cur_span(), SyntaxError::TS1005); + + let _ = self.parse_expr(); + + while !eat!(self, ';') { + bump!(self); + + if let Some(Token::Error(_)) = self.input.cur() { + break; + } + } + } + + Ok(self.ast(VarDecl { + span: span!(self, start), + declare: false, + kind, + decls, + ctxt: Default::default(), + })) + } + + fn parse_var_declarator( + &mut self, + for_loop: bool, + kind: VarDeclKind, + ) -> PResult> { + let start = cur_pos!(self); + + let is_let_or_const = matches!(kind, VarDeclKind::Let | VarDeclKind::Const); + + let mut name = self.parse_binding_pat_or_ident(is_let_or_const)?; + + let definite = if self.input.syntax().typescript() { + match name { + Pat::Ident(..) => eat!(self, '!'), + _ => false, + } + } else { + false + }; + + // Typescript extension + if self.input.syntax().typescript() && is!(self, ':') { + let type_annotation = self.try_parse_ts_type_ann()?; + match &mut name { + Pat::Array(p) => p.type_ann = type_annotation, + Pat::Ident(p) => p.type_ann = type_annotation, + Pat::Object(p) => p.type_ann = type_annotation, + Pat::Rest(p) => p.type_ann = type_annotation, + _ => unreachable!("invalid syntax: Pat: {:?}", name), + } + } + + //FIXME: This is wrong. Should check in/of only on first loop. + let init = if !for_loop || !is_one_of!(self, "in", "of") { + if eat!(self, '=') { + let expr = self.parse_assignment_expr()?; + let expr = self.verify_expr(expr)?; + + Some(expr) + } else { + // Destructuring bindings require initializers, but + // typescript allows `declare` vars not to have initializers. + if self.ctx().in_declare { + None + } else if kind == VarDeclKind::Const && self.ctx().strict && !self.ctx().in_declare + { + self.emit_err( + span!(self, start), + SyntaxError::ConstDeclarationsRequireInitialization, + ); + + None + } else { + match name { + Pat::Ident(..) => None, + _ => { + syntax_error!(self, span!(self, start), SyntaxError::PatVarWithoutInit) + } + } + } + } + } else { + // e.g. for(let a;;) + None + }; + + Ok(VarDeclarator { + span: span!(self, start), + name, + init, + definite, + }) + } + + fn parse_do_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "do"); + + let ctx = Context { + is_break_allowed: true, + is_continue_allowed: true, + ..self.ctx() + }; + let body = self.with_ctx(ctx).parse_stmt(false)?; + expect!(self, "while"); + expect!(self, '('); + let test = self.include_in_expr(true).parse_expr()?; + expect!(self, ')'); + // We *may* eat semicolon. + let _ = eat!(self, ';'); + + let span = span!(self, start); + + Ok(Stmt::DoWhile(self.ast(DoWhileStmt { span, test, body }))) + } + + fn parse_while_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "while"); + + expect!(self, '('); + let test = self.include_in_expr(true).parse_expr()?; + expect!(self, ')'); + + let ctx = Context { + is_break_allowed: true, + is_continue_allowed: true, + ..self.ctx() + }; + let body = self.with_ctx(ctx).parse_stmt(false)?; + + let span = span!(self, start); + Ok(Stmt::While(self.ast(WhileStmt { span, test, body }))) + } + + fn parse_with_stmt(&mut self) -> PResult> { + if self.syntax().typescript() { + let span = self.input.cur_span(); + self.emit_err(span, SyntaxError::TS2410); + } + + { + let span = self.input.cur_span(); + self.emit_strict_mode_err(span, SyntaxError::WithInStrict); + } + + let start = cur_pos!(self); + + assert_and_bump!(self, "with"); + + expect!(self, '('); + let obj = self.include_in_expr(true).parse_expr()?; + expect!(self, ')'); + + let ctx = Context { + in_function: true, + ..self.ctx() + }; + let body = self.with_ctx(ctx).parse_stmt(false)?; + + let span = span!(self, start); + Ok(Stmt::With(self.ast(WithStmt { span, obj, body }))) + } + + pub(crate) fn parse_block(&mut self, allow_directives: bool) -> PResult> { + let start = cur_pos!(self); + + expect!(self, '{'); + + let stmts = self.parse_block_body(allow_directives, false, Some(&tok!('}')))?; + + let span = span!(self, start); + Ok(BlockStmt { + span, + stmts, + ctxt: Default::default(), + }) + } + + fn parse_labelled_stmt(&mut self, l: Ident) -> PResult> { + let ctx = Context { + is_break_allowed: true, + allow_using_decl: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + let start = l.span.lo(); + + let mut errors = Vec::new_in(p.alloc); + for lb in &p.state.labels { + if l.sym == *lb { + errors.push(Error::new( + l.span, + SyntaxError::DuplicateLabel(l.sym.clone()), + )); + } + } + p.state.labels.push(l.sym.clone()); + + let body = if is!(p, "function") { + let f = p.parse_fn_decl(Vec::new_in(p.alloc))?; + if let Decl::Fn(fn_decl) = &f { + let function = &fn_decl.function; + if p.ctx().strict { + p.emit_err(function.span, SyntaxError::LabelledFunctionInStrict) + } + if function.is_generator || function.is_async { + p.emit_err(function.span, SyntaxError::LabelledGeneratorOrAsync) + } + } + Stmt::Decl(p.ast(f)) + } else { + p.parse_stmt(false)? + }; + + for err in errors { + p.emit_error(err); + } + + { + let pos = p.state.labels.iter().position(|v| v == &l.sym); + if let Some(pos) = pos { + p.state.labels.remove(pos); + } + } + + Ok(Stmt::Labeled(p.ast(LabeledStmt { + span: span!(p, start), + label: l, + body, + }))) + }) + } + + fn parse_for_stmt(&mut self) -> PResult> { + let start = cur_pos!(self); + + assert_and_bump!(self, "for"); + let await_start = cur_pos!(self); + let await_token = if eat!(self, "await") { + Some(span!(self, await_start)) + } else { + None + }; + expect!(self, '('); + + let mut ctx = self.ctx(); + ctx.expr_ctx.for_loop_init = true; + ctx.expr_ctx.for_await_loop_init = await_token.is_some(); + + let head = self.with_ctx(ctx).parse_for_head()?; + expect!(self, ')'); + let ctx = Context { + is_break_allowed: true, + is_continue_allowed: true, + ..self.ctx() + }; + let body = self.with_ctx(ctx).parse_stmt(false)?; + + let span = span!(self, start); + Ok(match head { + TempForHead::For { init, test, update } => { + if let Some(await_token) = await_token { + syntax_error!(self, await_token, SyntaxError::AwaitForStmt); + } + + Stmt::For(self.ast(ForStmt { + span, + init, + test, + update, + body, + })) + } + TempForHead::ForIn { left, right } => { + if let Some(await_token) = await_token { + syntax_error!(self, await_token, SyntaxError::AwaitForStmt); + } + + Stmt::ForIn(self.ast(ForInStmt { + span, + left, + right, + body, + })) + } + TempForHead::ForOf { left, right } => Stmt::ForOf(self.ast(ForOfStmt { + span, + is_await: await_token.is_some(), + left, + right, + body, + })), + }) + } + + fn parse_for_head(&mut self) -> PResult> { + let strict = self.ctx().strict; + + if is_one_of!(self, "const", "var") + || (is!(self, "let") + && peek!(self).map_or(false, |v| v.kind().follows_keyword_let(strict))) + { + let decl = self.parse_var_stmt(true)?; + + if is_one_of!(self, "of", "in") { + if decl.decls.len() != 1 { + for d in decl.decls.iter().skip(1) { + self.emit_err(d.name.span(), SyntaxError::TooManyVarInForInHead); + } + } else { + if (self.ctx().strict || is!(self, "of")) && decl.decls[0].init.is_some() { + self.emit_err( + decl.decls[0].name.span(), + SyntaxError::VarInitializerInForInHead, + ); + } + + if self.syntax().typescript() { + let type_ann = match decl.decls[0].name { + Pat::Ident(ref v) => Some(&v.type_ann), + Pat::Array(ref v) => Some(&v.type_ann), + Pat::Rest(ref v) => Some(&v.type_ann), + Pat::Object(ref v) => Some(&v.type_ann), + _ => None, + }; + + if let Some(type_ann) = type_ann { + if type_ann.is_some() { + self.emit_err(decl.decls[0].name.span(), SyntaxError::TS2483); + } + } + } + } + + return self.parse_for_each_head(ForHead::VarDecl(decl)); + } + + expect_exact!(self, ';'); + return self.parse_normal_for_head(Some(VarDeclOrExpr::VarDecl(decl))); + } + + if eat_exact!(self, ';') { + return self.parse_normal_for_head(None); + } + + let start = cur_pos!(self); + let init = self.include_in_expr(false).parse_for_head_prefix()?; + + let mut is_using_decl = false; + let mut is_await_using_decl = false; + + if self.input.syntax().explicit_resource_management() { + // using foo + let mut maybe_using_decl = init.is_ident_ref_to("using"); + let mut maybe_await_using_decl = false; + + // await using foo + if !maybe_using_decl + && init + .as_await_expr() + .filter(|e| e.arg.is_ident_ref_to("using")) + .is_some() + { + maybe_using_decl = true; + maybe_await_using_decl = true; + } + + if maybe_using_decl + && !is!(self, "of") + && (peeked_is!(self, "of") || peeked_is!(self, "in")) + { + is_using_decl = maybe_using_decl; + is_await_using_decl = maybe_await_using_decl; + } + } + + if is_using_decl { + let name = self.parse_binding_ident(false)?; + let decl = VarDeclarator { + name: Pat::Ident(self.ast(name)), + span: span!(self, start), + init: None, + definite: false, + }; + + let mut decls = Vec::new_in(self.alloc); + decls.push(decl); + let pat = self.ast(UsingDecl { + span: span!(self, start), + is_await: is_await_using_decl, + decls, + }); + + cur!(self, true); + + return self.parse_for_each_head(ForHead::UsingDecl(pat)); + } + + // for (a of b) + if is_one_of!(self, "of", "in") { + let is_in = is!(self, "in"); + + let pat = self.reparse_expr_as_pat(PatType::AssignPat, init)?; + + // for ({} in foo) is invalid + if self.input.syntax().typescript() && is_in { + match pat { + Pat::Ident(..) => {} + Pat::Expr(..) => {} + ref v => self.emit_err(v.span(), SyntaxError::TS2491), + } + } + + return self.parse_for_each_head(ForHead::Pat(pat)); + } + + expect_exact!(self, ';'); + + let init = self.verify_expr(init)?; + self.parse_normal_for_head(Some(VarDeclOrExpr::Expr(init))) + } + + fn parse_for_each_head(&mut self, left: ForHead<'a>) -> PResult> { + let is_of = bump!(self) == tok!("of"); + if is_of { + let right = self.include_in_expr(true).parse_assignment_expr()?; + Ok(TempForHead::ForOf { left, right }) + } else { + if let ForHead::UsingDecl(d) = &left { + self.emit_err(d.span, SyntaxError::UsingDeclNotAllowedForForInLoop) + } + + let right = self.include_in_expr(true).parse_expr()?; + Ok(TempForHead::ForIn { left, right }) + } + } + + fn parse_normal_for_head( + &mut self, + init: Option>, + ) -> PResult> { + let test = if eat_exact!(self, ';') { + None + } else { + let test = self.include_in_expr(true).parse_expr().map(Some)?; + expect_exact!(self, ';'); + test + }; + + let update = if is!(self, ')') { + None + } else { + self.include_in_expr(true).parse_expr().map(Some)? + }; + + Ok(TempForHead::For { init, test, update }) + } +} + +#[allow(clippy::enum_variant_names)] +enum TempForHead<'a> { + For { + init: Option>, + test: Option>, + update: Option>, + }, + ForIn { + left: ForHead<'a>, + right: Expr<'a>, + }, + ForOf { + left: ForHead<'a>, + right: Expr<'a>, + }, +} + +pub(crate) trait IsDirective<'a> { + fn as_ref(&self) -> Option<&Stmt<'a>>; + fn is_use_strict(&self) -> bool { + self.as_ref().map_or(false, Stmt::is_use_strict) + } +} + +impl<'a, T> IsDirective<'a> for Box<'a, T> +where + T: IsDirective<'a>, +{ + fn as_ref(&self) -> Option<&Stmt<'a>> { + T::as_ref(&**self) + } +} + +impl<'a> IsDirective<'a> for Stmt<'a> { + fn as_ref(&self) -> Option<&Stmt<'a>> { + Some(self) + } +} + +pub(crate) trait StmtLikeParser<'a, Type: IsDirective<'a>> { + fn handle_import_export( + &mut self, + top_level: bool, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult; +} + +impl<'a, I: Tokens, T> StmtLikeParser<'a, Box<'a, T>> for Parser<'a, I> +where + T: IsDirective<'a>, + Self: StmtLikeParser<'a, T>, +{ + fn handle_import_export( + &mut self, + top_level: bool, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + >::handle_import_export(self, top_level, decorators) + .map(|stmt| self.ast(stmt)) + } +} + +impl<'a, I: Tokens> StmtLikeParser<'a, Stmt<'a>> for Parser<'a, I> { + fn handle_import_export(&mut self, _: bool, _: Vec<'a, Decorator<'a>>) -> PResult> { + let start = cur_pos!(self); + if is!(self, "import") && peeked_is!(self, '(') { + let expr = self.parse_expr()?; + + eat!(self, ';'); + + return Ok(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + }))); + } + + if is!(self, "import") && peeked_is!(self, '.') { + let expr = self.parse_expr()?; + + eat!(self, ';'); + + return Ok(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + }))); + } + + syntax_error!(self, SyntaxError::ImportExportInScript); + } +} + +#[cfg(test)] +mod tests { + use swc_allocator::{arena::Allocator, vec}; + use swc_common::{comments::SingleThreadedComments, SyntaxContext, DUMMY_SP as span}; + use swc_ecma_visit::assert_eq_ignore_span_arena; + + use super::*; + use crate::{ + arena::parser::{test_parser, test_parser_comment}, + EsSyntax, Syntax, + }; + + fn stmt<'a>(alloc: &'a Allocator, s: &'static str) -> Stmt<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_stmt(true)) + } + + fn module_item<'a>(alloc: &'a Allocator, s: &'static str) -> ModuleItem<'a> { + test_parser(alloc, s, Syntax::default(), |p| { + p.parse_stmt_like(true, true) + }) + } + fn expr<'a>(alloc: &'a Allocator, s: &'static str) -> Expr<'a> { + test_parser(alloc, s, Syntax::default(), |p| p.parse_expr()) + } + + #[test] + fn expr_stmt() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "a + b + c"), + Stmt::Expr(Box::new_in( + ExprStmt { + span, + expr: expr(&alloc, "a + b + c") + }, + &alloc + )) + ) + } + + #[test] + fn catch_rest_pat() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "try {} catch({ ...a34 }) {}"), + Stmt::Try(Box::new_in( + TryStmt { + span, + block: BlockStmt { + span, + stmts: vec![in &alloc], + ctxt: SyntaxContext::default(), + }, + handler: Some(CatchClause { + span, + param: Some(Pat::Object(Box::new_in( + ObjectPat { + span, + optional: false, + props: vec![in &alloc; ObjectPatProp::Rest(Box::new_in( +RestPat { + span, + dot3_token: span, + arg: Pat::Ident(Box::new_in(Ident::new_no_ctxt("a34".into(), span).into(), &alloc)), + type_ann: None + } + , &alloc))], + type_ann: None, + }, + &alloc + ))), + body: BlockStmt { + span, + stmts: vec![in &alloc], + ctxt: SyntaxContext::default(), + } + }), + finalizer: None + }, + &alloc + )) + ); + } + + #[test] + fn throw_this() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "throw this"), + Stmt::Throw(Box::new_in( + ThrowStmt { + span, + arg: expr(&alloc, "this"), + }, + &alloc + )) + ) + } + + #[test] + fn await_for_of() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "for await (const a of b) ;"), + Stmt::ForOf(Box::new_in( + ForOfStmt { + span, + is_await: true, + left: ForHead::VarDecl(Box::new_in( + VarDecl { + span, + kind: VarDeclKind::Const, + decls: vec![in &alloc; VarDeclarator { + span, + init: None, + name: Pat::Ident(Box::new_in(Ident::new_no_ctxt("a".into(), span).into(), &alloc)), + definite: false, + }], + ctxt: SyntaxContext::default(), + declare: false, + }, + &alloc + )), + right: Expr::Ident(Box::new_in(Ident::new_no_ctxt("b".into(), span), &alloc)), + body: Stmt::Empty(Box::new_in(EmptyStmt { span }, &alloc)), + }, + &alloc + )) + ) + } + + #[test] + fn no_empty_without_semi() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "(function foo() { return 1 })"), + stmt( + &alloc, + "(function foo () { + return 1 + })" + ) + ); + + assert_eq_ignore_span_arena!( + stmt(&alloc, "{ 1; }"), + Stmt::Block(Box::new_in( + BlockStmt { + span, + stmts: vec![in &alloc; stmt(&alloc, "1")], + ctxt: SyntaxContext::default(), + }, + &alloc + )) + ); + } + + #[test] + fn if_else() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + stmt(&alloc, "if (a) b; else c"), + Stmt::If(Box::new_in( + IfStmt { + span, + test: expr(&alloc, "a"), + cons: stmt(&alloc, "b;"), + alt: Some(stmt(&alloc, "c")), + }, + &alloc + )) + ); + } + + #[test] + fn class_decorator() { + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser( + &alloc, + " + @decorator + @dec2 + class Foo {} + ", + Syntax::Es(EsSyntax { + decorators: true, + ..Default::default() + }), + |p| p.parse_stmt_list_item(true), + ), + Stmt::Decl(Box::new_in( + Decl::Class(Box::new_in( + ClassDecl { + ident: Ident::new_no_ctxt("Foo".into(), span), + class: Box::new_in( + Class { + span, + decorators: vec![in &alloc; + Decorator { + span, + expr: expr(&alloc, "decorator") + }, + Decorator { + span, + expr: expr(&alloc, "dec2") + } + ], + super_class: None, + body: Vec::new_in(&alloc), + is_abstract: false, + ctxt: SyntaxContext::default(), + implements: Vec::new_in(&alloc), + super_type_params: None, + type_params: None + }, + &alloc + ), + declare: false, + }, + &alloc + )), + &alloc + )) + ); + } + + #[test] + fn example() { + let src = r#" +import React from 'react' +import ReactDOM from 'react-dom' + +function App() { + return

JSX is working!

+} + +ReactDOM.render(, document.getElementById('root')) + +"#; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + jsx: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn ice() { + let src = r#"import React from "react" + +function App() { + return

works

+} + +export default App"#; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + jsx: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn export_default() { + let src = "export v, { x, y as w } from 'mod';"; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn export_default_2() { + let src = "export foo from 'bar';"; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn export_default_3() { + let src = "export default from 'bar';"; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn export_default_4() { + let src = "export default, {foo} from 'bar';"; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn shebang_01() { + let src = "#!/usr/bin/env node"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn shebang_02() { + let src = "#!/usr/bin/env node +let x = 4"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn empty() { + let alloc = Allocator::default(); + test_parser(&alloc, "", Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn issue_226() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "export * as Foo from 'bar';", + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + #[should_panic(expected = "Expected 'from', got ','")] + fn issue_4369_1() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"export * as foo, { bar } from "mod""#, + Syntax::Es(EsSyntax { + export_default_from: false, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_4369_2() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"export foo, * as bar, { baz } from "mod""#, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_4369_3() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"export foo, * as bar from "mod""#, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_4369_4() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"export * as bar, { baz } from "mod""#, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_4369_5() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"export foo, { baz } from "mod""#, + Syntax::Es(EsSyntax { + export_default_from: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_257_var() { + let alloc = Allocator::default(); + test_parser( + &alloc, + " +export default function waitUntil(callback, options = {}) { + var timeout = 'timeout' in options ? options.timeout : 1000; +}", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_257_let() { + let alloc = Allocator::default(); + test_parser( + &alloc, + " +export default function waitUntil(callback, options = {}) { + let timeout = 'timeout' in options ? options.timeout : 1000; +}", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_269() { + let alloc = Allocator::default(); + test_parser( + &alloc, + ";(function() {})(window, window.lib || (window.lib = {}))", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_319_2() { + let alloc = Allocator::default(); + module_item( + &alloc, + "export default obj({ + async f() { + await g(); + } +});", + ); + } + + #[test] + fn issue_340_fn() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "export default function(){};", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_340_async_fn() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "export default async function(){};", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_340_generator_fn() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "export default function*(){};", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_340_class() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "export default class {};", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_360() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;", + Default::default(), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_380_1() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "import(filePath).then(bar => {})", + Syntax::Es(Default::default()), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_380_2() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "class Foo { + componentDidMount() { + const filePath = '../foo/bar' + import(filePath).then(bar => {}) + } + }", + Syntax::Es(Default::default()), + |p| p.parse_module(), + ); + } + + #[test] + fn issue_411() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "try { +} catch {}", + Syntax::Es(Default::default()), + |p| p.parse_module(), + ); + } + + #[test] + fn top_level_await() { + let alloc = Allocator::default(); + test_parser(&alloc, "await foo", Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn issue_856() { + let c = SingleThreadedComments::default(); + let s = "class Foo { + static _extensions: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: (module: Module, filename: string) => any; + } = Object.create(null); +} +"; + let alloc = Allocator::default(); + let _ = test_parser_comment(&alloc, &c, s, Syntax::Typescript(Default::default()), |p| { + p.parse_typescript_module() + }); + + let (leading, trailing) = c.take_all(); + assert!(trailing.borrow().is_empty()); + assert_eq!(leading.borrow().len(), 1); + } + + #[test] + fn issue_856_2() { + let c = SingleThreadedComments::default(); + let s = "type ConsoleExamineFunc = ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + csl: any, + out: StringBuffer, + err?: StringBuffer, + both?: StringBuffer +) => void;"; + + let alloc = Allocator::default(); + let _ = test_parser_comment(&alloc, &c, s, Syntax::Typescript(Default::default()), |p| { + p.parse_typescript_module() + }); + + let (leading, trailing) = c.take_all(); + assert!(trailing.borrow().is_empty()); + assert_eq!(leading.borrow().len(), 1); + } + + #[test] + fn issue_856_3() { + let c = SingleThreadedComments::default(); + let s = "type RequireWrapper = ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + exports: any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + require: any, + module: Module, + __filename: string, + __dirname: string +) => void;"; + let alloc = Allocator::default(); + let _ = test_parser_comment(&alloc, &c, s, Syntax::Typescript(Default::default()), |p| { + p.parse_typescript_module() + }); + + let (leading, trailing) = c.take_all(); + assert!(trailing.borrow().is_empty()); + assert_eq!(leading.borrow().len(), 2); + } + + #[test] + fn issue_856_4() { + let c = SingleThreadedComments::default(); + let s = "const _extensions: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: (module: Module, filename: string) => any; + } = Object.create(null);"; + let alloc = Allocator::default(); + let _ = test_parser_comment(&alloc, &c, s, Syntax::Typescript(Default::default()), |p| { + p.parse_typescript_module() + }); + + let (leading, trailing) = c.take_all(); + assert!(trailing.borrow().is_empty()); + assert_eq!(leading.borrow().len(), 1); + } + fn parse_for_head<'a>(alloc: &'a Allocator, str: &'static str) -> TempForHead<'a> { + test_parser(alloc, str, Syntax::default(), |p| p.parse_for_head()) + } + + #[test] + fn for_array_binding_pattern() { + let alloc = Allocator::default(); + match parse_for_head(&alloc, "let [, , t] = simple_array; t < 10; t++") { + TempForHead::For { init: Some(v), .. } => assert_eq_ignore_span_arena!( + v, + VarDeclOrExpr::VarDecl(Box::new_in( + VarDecl { + span, + declare: false, + kind: VarDeclKind::Let, + decls: vec![in &alloc; VarDeclarator { + span, + name: Pat::Array(Box::new_in( + ArrayPat { + span, + type_ann: None, + optional: false, + elems: vec![in &alloc; + None, + None, + Some(Pat::Ident(Box::new_in(Ident::new_no_ctxt("t".into(), span).into(), &alloc))) + ] + } + , &alloc)), + init: Some( + Expr::Ident(Box::new_in(Ident::new_no_ctxt("simple_array".into(), span), &alloc)) + ), + definite: false + }], + ctxt: SyntaxContext::default(), + }, + &alloc + )) + ), + _ => unreachable!(), + }; + } + #[test] + fn for_object_binding_pattern() { + let alloc = Allocator::default(); + match parse_for_head(&alloc, "let {num} = obj; num < 11; num++") { + TempForHead::For { init: Some(v), .. } => assert_eq_ignore_span_arena!( + v, + VarDeclOrExpr::VarDecl(Box::new_in( + VarDecl { + span, + kind: VarDeclKind::Let, + decls: vec![in &alloc; VarDeclarator { + span, + name: Pat::Object(Box::new_in( + ObjectPat { + optional: false, + type_ann: None, + span, + props: vec![in &alloc; ObjectPatProp::Assign(Box::new_in( + AssignPatProp { + span, + key: Ident::new_no_ctxt("num".into(), span).into(), + value: None + } + , &alloc))] + } + , &alloc)), + init: Some(Expr::Ident(Box::new_in(Ident::new_no_ctxt("obj".into(), span), &alloc))), + definite: false + }], + ctxt: SyntaxContext::default(), + declare: false, + }, + &alloc + )) + ), + _ => unreachable!(), + }; + } + + #[test] + #[should_panic(expected = "'import.meta' cannot be used outside of module code.")] + fn import_meta_in_script() { + let src = "const foo = import.meta.url;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + fn import_meta_in_program() { + let src = "const foo = import.meta.url;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_program() + }); + } + + #[test] + #[should_panic(expected = "'import', and 'export' cannot be used outside of module code")] + fn import_statement_in_script() { + let src = "import 'foo';"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + #[should_panic(expected = "top level await is only allowed in module")] + fn top_level_await_in_script() { + let src = "await promise"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + fn top_level_await_in_program() { + let src = "await promise"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_program() + }); + } + + #[test] + fn for_of_head_lhs_async_dot() { + let src = "for (async.x of [1]) ;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn for_head_init_async_of() { + let src = "for (async of => {}; i < 10; ++i) { ++counter; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + #[should_panic(expected = "await isn't allowed in non-async function")] + fn await_in_function_in_module() { + let src = "function foo (p) { await p; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + #[should_panic(expected = "await isn't allowed in non-async function")] + fn await_in_function_in_script() { + let src = "function foo (p) { await p; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + #[should_panic(expected = "await isn't allowed in non-async function")] + fn await_in_function_in_program() { + let src = "function foo (p) { await p; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_program() + }); + } + + #[test] + #[should_panic(expected = "`await` cannot be used as an identifier in an async context")] + fn await_in_nested_async_function_in_module() { + let src = "async function foo () { function bar(x = await) {} }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn await_in_nested_async_function_in_script() { + let src = "async function foo () { function bar(x = await) {} }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + fn await_in_nested_async_function_in_program() { + let src = "async function foo () { function bar(x = await) {} }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_program() + }); + } + + #[test] + #[should_panic(expected = "`await` cannot be used as an identifier in an async context")] + fn await_as_param_ident_in_module() { + let src = "function foo (x = await) { }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn await_as_param_ident_in_script() { + let src = "function foo (x = await) { }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + #[should_panic(expected = "`await` cannot be used as an identifier in an async context")] + fn await_as_ident_in_module() { + let src = "let await = 1"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn await_as_ident_in_script() { + let src = "let await = 1"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + #[should_panic(expected = "`await` cannot be used as an identifier in an async context")] + fn await_as_ident_in_async() { + let src = "async function foo() { let await = 1; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + fn top_level_await_in_block() { + let src = "if (true) { await promise; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn class_static_blocks() { + let src = "class Foo { static { 1 + 1; } }"; + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| p + .parse_expr()), + Expr::Class(Box::new_in( + ClassExpr { + ident: Some(Ident { + span, + sym: "Foo".into(), + ..Default::default() + }), + class: Box::new_in( + Class { + span, + decorators: Vec::new_in(&alloc), + super_class: None, + type_params: None, + super_type_params: None, + is_abstract: false, + implements: Vec::new_in(&alloc), + body: vec![in &alloc; ClassMember::StaticBlock(Box::new_in( +StaticBlock { + span, + body: BlockStmt { + span, + stmts: vec![in &alloc; stmt(&alloc, "1 + 1;") ], + ctxt: SyntaxContext::default(), + } + } + , &alloc)) ], + ctxt: SyntaxContext::default(), + }, + &alloc + ) + }, + &alloc + )) + ); + } + + #[test] + fn multiple_class_static_blocks() { + let src = "class Foo { static { 1 + 1; } static { 1 + 1; } }"; + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| p + .parse_expr()), + Expr::Class(Box::new_in( + ClassExpr { + ident: Some(Ident { + span, + sym: "Foo".into(), + ..Default::default() + }), + class: Box::new_in( + Class { + span, + decorators: Vec::new_in(&alloc), + super_class: None, + is_abstract: false, + body: vec![in &alloc; + ClassMember::StaticBlock(Box::new_in(StaticBlock { + span, + body: BlockStmt { + span, + stmts: vec![in &alloc; stmt(&alloc, "1 + 1;") ], + ctxt: SyntaxContext::default(), + }, + }, &alloc)), + ClassMember::StaticBlock(Box::new_in( + StaticBlock { + span, + body: BlockStmt { + span, + stmts: vec![in &alloc; stmt(&alloc, "1 + 1;") ], + ctxt: SyntaxContext::default(), + }, + } + , &alloc)) + ], + ctxt: SyntaxContext::default(), + implements: Vec::new_in(&alloc), + super_type_params: None, + type_params: None, + }, + &alloc + ) + }, + &alloc + )) + ); + } + + #[test] + fn class_static_blocks_with_line_breaks_01() { + let src = "class Foo { + static + { + 1 + 1; + } + }"; + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| p + .parse_expr()), + Expr::Class(Box::new_in( + ClassExpr { + ident: Some(Ident { + span, + sym: "Foo".into(), + optional: false, + ctxt: SyntaxContext::default(), + }), + class: Box::new_in( + Class { + span, + is_abstract: false, + body: vec![in &alloc; ClassMember::StaticBlock(Box::new_in( + StaticBlock { + span, + body: BlockStmt { + span, + stmts: vec![in &alloc; stmt(&alloc, "1 + 1;") ], + ctxt: SyntaxContext::default(), + } + } + , &alloc)) ], + ctxt: SyntaxContext::default(), + decorators: Vec::new_in(&alloc), + implements: Vec::new_in(&alloc), + super_class: None, + super_type_params: None, + type_params: None, + }, + &alloc + ) + }, + &alloc + )) + ); + } + + #[test] + fn class_static_blocks_with_line_breaks_02() { + let src = "class Foo { + static + {} + }"; + let alloc = Allocator::default(); + assert_eq_ignore_span_arena!( + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| p + .parse_expr()), + Expr::Class(Box::new_in( + ClassExpr { + ident: Some(Ident { + span, + sym: "Foo".into(), + ctxt: SyntaxContext::default(), + optional: false, + }), + class: Box::new_in( + Class { + span, + is_abstract: false, + body: vec![in &alloc; ClassMember::StaticBlock(Box::new_in( + StaticBlock { + span, + body: BlockStmt { + span, + stmts: Vec::new_in(&alloc), + ctxt: SyntaxContext::default(), + } + } + , &alloc)) ], + ctxt: SyntaxContext::default(), + decorators: Vec::new_in(&alloc), + implements: Vec::new_in(&alloc), + super_class: None, + super_type_params: None, + type_params: None, + }, + &alloc + ) + }, + &alloc + )) + ); + } + + #[test] + fn class_static_blocks_in_ts() { + let src = "class Foo { static { 1 + 1 }; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + fn class_static_blocks_with_line_breaks_in_ts_01() { + let src = "class Foo { + static + { + 1 + 1; + } + }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + fn class_static_blocks_with_line_breaks_in_ts_02() { + let src = "class Foo { + static + {} + }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Expected ident")] + fn class_static_blocks_with_await() { + let src = "class Foo{ + static { + var await = 'bar'; + } + }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Expected ident")] + fn class_static_blocks_with_await_in_nested_class() { + let src = "class Foo{ + static { + function foo() { + class Foo { + static { + var await = 'bar'; + } + } + } + } + }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + fn class_static_blocks_with_await_in_fn() { + let src = "class Foo{ + static { + function foo() { + var await = 'bar'; + } + } + }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Modifiers cannot appear here")] + fn class_static_blocks_in_ts_with_invalid_modifier_01() { + let src = "class Foo { abstract static { 1 + 1 }; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Modifiers cannot appear here")] + fn class_static_blocks_in_ts_with_invalid_modifier_02() { + let src = "class Foo { static static { 1 + 1 }; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Modifiers cannot appear here")] + fn class_static_blocks_in_ts_with_invalid_modifier_03() { + let src = "class Foo { declare static { 1 + 1 }; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Modifiers cannot appear here")] + fn class_static_blocks_in_ts_with_invalid_modifier_04() { + let src = "class Foo { private static { 1 + 1 }; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + #[should_panic(expected = "Trailing comma is disallowed inside import(...) arguments")] + fn error_for_trailing_comma_inside_dynamic_import() { + let src = "import('foo',)"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_expr() + }); + } + + #[test] + fn no_error_for_trailing_comma_inside_dynamic_import_with_import_assertions() { + let src = "import('foo',)"; + let alloc = Allocator::default(); + test_parser( + &alloc, + src, + Syntax::Es(EsSyntax { + import_attributes: true, + ..Default::default() + }), + |p| p.parse_expr(), + ); + } + + #[test] + fn type_only_star_exports_with_name() { + let src = "export type * as bar from 'mod'"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + fn type_only_star_exports_without_name() { + let src = "export type * from 'mod'"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + #[should_panic(expected = "A string literal cannot be used as an imported binding.")] + fn error_for_string_literal_is_import_binding() { + let src = "import { \"str\" } from \"mod\""; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + #[should_panic( + expected = "A string literal cannot be used as an exported binding without `from`." + )] + fn error_for_string_literal_is_export_binding() { + let src = "export { 'foo' };"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_module() + }); + } + + #[test] + #[should_panic(expected = "'const' declarations must be initialized")] + fn ts_error_for_const_declaration_not_initialized() { + let src = r#" +"use strict"; +const foo;"#; + + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Typescript(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + #[should_panic(expected = "'const' declarations must be initialized")] + fn es_error_for_const_declaration_not_initialized() { + let src = r#" +"use strict"; +const foo;"#; + + let alloc = Allocator::default(); + test_parser(&alloc, src, Syntax::Es(Default::default()), |p| { + p.parse_script() + }); + } + + #[test] + fn issue_5557_expr_follow_class() { + let src = "foo * class {} / bar;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_5722_class_keyword_in_tpl() { + let src = "console.log(`${toStr({class: fn})}`)"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt() { + let src = "try { await; } catch { console.log('caught'); }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt_1() { + let src = "try { await, await; } catch { console.log('caught'); }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt_2() { + let src = "function test() { await; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt_3() { + let src = "function test() { await, await; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt_4() { + let src = "function test() { [await]; }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6301_await_expr_stmt_5() { + let src = "function test() { (await); }"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6322() { + let src = "for ( ; { } / 1 ; ) ;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } + + #[test] + fn issue_6323() { + let src = "let x = 0 < { } / 0 ;"; + let alloc = Allocator::default(); + test_parser(&alloc, src, Default::default(), |p| p.parse_script()); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/stmt/module_item.rs b/crates/swc_ecma_parser/src/arena/parser/stmt/module_item.rs new file mode 100644 index 000000000000..9a81b2771acd --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/stmt/module_item.rs @@ -0,0 +1,945 @@ +use swc_allocator::arena::{Box, CloneIn, Vec}; +use swc_common::Span; +use swc_ecma_ast::arena::*; + +use super::{IsDirective, StmtLikeParser}; +use crate::{arena::parser::Parser, error::SyntaxError, token::Token, Context, PResult, Tokens}; + +impl<'a, I: Tokens> Parser<'a, I> { + fn parse_import(&mut self) -> PResult> { + let start = cur_pos!(self); + + if peeked_is!(self, '.') { + let expr = self.parse_expr()?; + + eat!(self, ';'); + + return Ok(ModuleItem::Stmt(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + })))); + } + + if peeked_is!(self, '(') { + let expr = self.parse_expr()?; + + eat!(self, ';'); + + return Ok(ModuleItem::Stmt(Stmt::Expr(self.ast(ExprStmt { + span: span!(self, start), + expr, + })))); + } + + // It's now import statement + + if !self.ctx().module { + // Switch to module mode + let ctx = Context { + module: true, + strict: true, + ..self.ctx() + }; + self.set_ctx(ctx); + } + + expect!(self, "import"); + + // Handle import 'mod.js' + let str_start = cur_pos!(self); + if let Ok(&Token::Str { .. }) = cur!(self, false) { + let src = match bump!(self) { + Token::Str { value, raw, .. } => self.ast(Str { + span: span!(self, str_start), + value, + raw: Some(raw), + }), + _ => unreachable!(), + }; + let _ = cur!(self, false); + let with = if self.input.syntax().import_attributes() + && !self.input.had_line_break_before_cur() + && (eat!(self, "assert") || eat!(self, "with")) + { + match self.parse_object_expr()? { + Expr::Object(v) => Some(v), + _ => unreachable!(), + } + } else { + None + }; + expect!(self, ';'); + return Ok(ModuleItem::ModuleDecl(ModuleDecl::Import(self.ast( + ImportDecl { + span: span!(self, start), + src, + specifiers: Vec::new_in(self.alloc), + type_only: false, + with, + phase: Default::default(), + }, + )))); + } + + let mut type_only = false; + let mut phase = ImportPhase::Evaluation; + let mut specifiers = Vec::new_in(self.alloc); + + 'import_maybe_ident: { + if is!(self, BindingIdent) { + let mut local = self.parse_imported_default_binding()?; + + if self.input.syntax().typescript() && local.sym == "type" { + if is_one_of!(self, '*', '{') { + type_only = true; + break 'import_maybe_ident; + } + + if is!(self, BindingIdent) { + if !is!(self, "from") || peeked_is!(self, "from") { + type_only = true; + local = self.parse_imported_default_binding()?; + } else if peeked_is!(self, '=') { + type_only = true; + local = self.parse_ident_name().map(From::from)?; + } + } + } + + if self.input.syntax().typescript() && is!(self, '=') { + return self + .parse_ts_import_equals_decl(start, local, false, type_only) + .map(ModuleDecl::from) + .map(ModuleItem::from); + } + + if matches!(&*local.sym, "source" | "defer") { + let new_phase = match &*local.sym { + "source" => ImportPhase::Source, + "defer" => ImportPhase::Defer, + _ => unreachable!(), + }; + + if is_one_of!(self, '*', '{') { + phase = new_phase; + break 'import_maybe_ident; + } + + if is!(self, BindingIdent) && !is!(self, "from") || peeked_is!(self, "from") { + phase = new_phase; + local = self.parse_imported_default_binding()?; + } + } + + //TODO: Better error reporting + if !is!(self, "from") { + expect!(self, ','); + } + specifiers.push(ImportSpecifier::Default(self.ast(ImportDefaultSpecifier { + span: local.span, + local, + }))); + } + } + + { + let import_spec_start = cur_pos!(self); + if eat!(self, '*') { + expect!(self, "as"); + let local = self.parse_imported_binding()?; + specifiers.push(ImportSpecifier::Namespace(self.ast( + ImportStarAsSpecifier { + span: span!(self, import_spec_start), + local, + }, + ))); + } else if eat!(self, '{') { + while !eof!(self) && !is!(self, '}') { + specifiers.push(self.parse_import_specifier(type_only)?); + + if is!(self, '}') { + break; + } else { + expect!(self, ','); + } + } + expect!(self, '}'); + } + } + + let src = { + expect!(self, "from"); + let str_start = cur_pos!(self); + + match *cur!(self, true) { + Token::Str { .. } => match bump!(self) { + Token::Str { value, raw, .. } => self.ast(Str { + span: span!(self, str_start), + value, + raw: Some(raw), + }), + _ => unreachable!(), + }, + _ => unexpected!(self, "a string literal"), + } + }; + + let _ = cur!(self, false); + let with = if self.input.syntax().import_attributes() + && !self.input.had_line_break_before_cur() + && (eat!(self, "assert") || eat!(self, "with")) + { + match self.parse_object_expr()? { + Expr::Object(v) => Some(v), + _ => unreachable!(), + } + } else { + None + }; + + expect!(self, ';'); + + Ok(ModuleItem::ModuleDecl(ModuleDecl::Import(self.ast( + ImportDecl { + span: span!(self, start), + specifiers, + src, + type_only, + with, + phase, + }, + )))) + } + + /// Parse `foo`, `foo2 as bar` in `import { foo, foo2 as bar }` + fn parse_import_specifier(&mut self, type_only: bool) -> PResult> { + let start = cur_pos!(self); + match self.parse_module_export_name()? { + ModuleExportName::Ident(mut orig_name) => { + let mut is_type_only = false; + // Handle: + // `import { type xx } from 'mod'` + // `import { type xx as yy } from 'mod'` + // `import { type as } from 'mod'` + // `import { type as as } from 'mod'` + // `import { type as as as } from 'mod'` + if self.syntax().typescript() && orig_name.sym == "type" && is!(self, IdentName) { + let possibly_orig_name = self.parse_ident_name().map(Ident::from)?; + if possibly_orig_name.sym == "as" { + // `import { type as } from 'mod'` + if !is!(self, IdentName) { + if self.ctx().is_reserved_word(&possibly_orig_name.sym) { + syntax_error!( + self, + possibly_orig_name.span, + SyntaxError::ReservedWordInImport + ) + } + + if type_only { + self.emit_err(orig_name.span, SyntaxError::TS2206); + } + + return Ok(ImportSpecifier::Named(self.ast(ImportNamedSpecifier { + span: span!(self, start), + local: possibly_orig_name, + imported: None, + is_type_only: true, + }))); + } + + let maybe_as: Ident = self.parse_binding_ident(false)?.into(); + if maybe_as.sym == "as" { + if is!(self, IdentName) { + // `import { type as as as } from 'mod'` + // `import { type as as foo } from 'mod'` + let local: Ident = self.parse_binding_ident(false)?.into(); + + if type_only { + self.emit_err(orig_name.span, SyntaxError::TS2206); + } + + return Ok(ImportSpecifier::Named(self.ast( + ImportNamedSpecifier { + span: Span::new(start, orig_name.span.hi()), + local, + imported: Some(ModuleExportName::Ident( + self.ast(possibly_orig_name), + )), + is_type_only: true, + }, + ))); + } else { + // `import { type as as } from 'mod'` + return Ok(ImportSpecifier::Named(self.ast( + ImportNamedSpecifier { + span: Span::new(start, maybe_as.span.hi()), + local: maybe_as, + imported: Some(ModuleExportName::Ident(orig_name)), + is_type_only: false, + }, + ))); + } + } else { + // `import { type as xxx } from 'mod'` + return Ok(ImportSpecifier::Named(self.ast(ImportNamedSpecifier { + span: Span::new(start, orig_name.span.hi()), + local: maybe_as, + imported: Some(ModuleExportName::Ident(orig_name)), + is_type_only: false, + }))); + } + } else { + // `import { type xx } from 'mod'` + // `import { type xx as yy } from 'mod'` + if type_only { + self.emit_err(orig_name.span, SyntaxError::TS2206); + } + + orig_name = self.ast(possibly_orig_name); + is_type_only = true; + } + } + + if eat!(self, "as") { + let local: Ident = self.parse_binding_ident(false)?.into(); + return Ok(ImportSpecifier::Named(self.ast(ImportNamedSpecifier { + span: Span::new(start, local.span.hi()), + local, + imported: Some(ModuleExportName::Ident(orig_name)), + is_type_only, + }))); + } + + // Handle difference between + // + // 'ImportedBinding' + // 'IdentifierName' as 'ImportedBinding' + if self.ctx().is_reserved_word(&orig_name.sym) { + syntax_error!(self, orig_name.span, SyntaxError::ReservedWordInImport) + } + + let local = orig_name; + Ok(ImportSpecifier::Named(self.ast(ImportNamedSpecifier { + span: span!(self, start), + local: local.into_inner(), + imported: None, + is_type_only, + }))) + } + ModuleExportName::Str(orig_str) => { + if eat!(self, "as") { + let local: Ident = self.parse_binding_ident(false)?.into(); + Ok(ImportSpecifier::Named(self.ast(ImportNamedSpecifier { + span: Span::new(start, local.span.hi()), + local, + imported: Some(ModuleExportName::Str(orig_str)), + is_type_only: false, + }))) + } else { + syntax_error!( + self, + orig_str.span, + SyntaxError::ImportBindingIsString(orig_str.into_inner().value) + ) + } + } + } + } + + fn parse_imported_default_binding(&mut self) -> PResult { + self.parse_imported_binding() + } + + fn parse_imported_binding(&mut self) -> PResult { + let ctx = Context { + in_async: false, + in_generator: false, + ..self.ctx() + }; + Ok(self.with_ctx(ctx).parse_binding_ident(false)?.into()) + } + + fn parse_export(&mut self, mut decorators: Vec<'a, Decorator<'a>>) -> PResult> { + if !self.ctx().module { + // Switch to module mode + let ctx = Context { + module: true, + strict: true, + ..self.ctx() + }; + self.set_ctx(ctx); + } + + let start = cur_pos!(self); + assert_and_bump!(self, "export"); + let _ = cur!(self, true); + let after_export_start = cur_pos!(self); + + // "export declare" is equivalent to just "export". + let declare = self.input.syntax().typescript() && eat!(self, "declare"); + + if declare { + // TODO: Remove + if let Some(decl) = + self.try_parse_ts_declare(after_export_start, decorators.clone_in(self.alloc))? + { + return Ok(ModuleDecl::ExportDecl(self.ast(ExportDecl { + span: span!(self, start), + decl, + }))); + } + } + + if self.input.syntax().typescript() && is!(self, IdentName) { + let sym = match *cur!(self, true) { + Token::Word(ref w) => w.clone().into(), + _ => unreachable!(), + }; + // TODO: remove clone + if let Some(decl) = self.try_parse_ts_export_decl(decorators.clone_in(self.alloc), sym) + { + return Ok(ModuleDecl::ExportDecl(self.ast(ExportDecl { + span: span!(self, start), + decl, + }))); + } + } + + if self.input.syntax().typescript() { + if eat!(self, "import") { + let is_type_only = is!(self, "type") && peeked_is!(self, IdentRef); + + if is_type_only { + assert_and_bump!(self, "type"); + } + + let id = self.parse_ident_name()?; + + // export import A = B + return self + .parse_ts_import_equals_decl( + start, + id.into(), + /* is_export */ true, + is_type_only, + ) + .map(From::from); + } + + if eat!(self, '=') { + // `export = x;` + let expr = self.parse_expr()?; + expect!(self, ';'); + return Ok(ModuleDecl::TsExportAssignment(self.ast( + TsExportAssignment { + span: span!(self, start), + expr, + }, + ))); + } + + if eat!(self, "as") { + // `export as namespace A;` + // See `parseNamespaceExportDeclaration` in TypeScript's own parser + expect!(self, "namespace"); + let id = self.parse_ident(false, false)?; + expect!(self, ';'); + return Ok(ModuleDecl::TsNamespaceExport(self.ast( + TsNamespaceExportDecl { + span: span!(self, start), + id, + }, + ))); + } + } + + let ns_export_specifier_start = cur_pos!(self); + + let type_only = self.input.syntax().typescript() && eat!(self, "type"); + + // Some("default") if default is exported from 'src' + let mut export_default = None; + + if !type_only && eat!(self, "default") { + if is!(self, '@') { + let start = cur_pos!(self); + let after_decorators = self.parse_decorators(false)?; + + if !decorators.is_empty() { + syntax_error!(self, span!(self, start), SyntaxError::TS8038); + } + + decorators = after_decorators; + } + + if self.input.syntax().typescript() { + if is!(self, "abstract") + && peeked_is!(self, "class") + && !self.input.has_linebreak_between_cur_and_peeked() + { + let class_start = cur_pos!(self); + assert_and_bump!(self, "abstract"); + let _ = cur!(self, true); + + return self + .parse_default_class(start, class_start, decorators, true) + .map(|decl| self.ast(decl)) + .map(ModuleDecl::ExportDefaultDecl); + } + if is!(self, "abstract") && peeked_is!(self, "interface") { + self.emit_err(self.input.cur_span(), SyntaxError::TS1242); + assert_and_bump!(self, "abstract"); + } + + if is!(self, "interface") { + let interface_start = cur_pos!(self); + assert_and_bump!(self, "interface"); + let decl = self + .parse_ts_interface_decl(interface_start) + .map(DefaultDecl::from)?; + return Ok(ModuleDecl::ExportDefaultDecl(self.ast(ExportDefaultDecl { + span: span!(self, start), + decl, + }))); + } + } + + if is!(self, "class") { + let class_start = cur_pos!(self); + let decl = self.parse_default_class(start, class_start, decorators, false)?; + return Ok(ModuleDecl::ExportDefaultDecl(self.ast(decl))); + } else if is!(self, "async") + && peeked_is!(self, "function") + && !self.input.has_linebreak_between_cur_and_peeked() + { + let decl = self.parse_default_async_fn(start, decorators)?; + return Ok(ModuleDecl::ExportDefaultDecl(self.ast(decl))); + } else if is!(self, "function") { + let decl = self.parse_default_fn(start, decorators)?; + return Ok(ModuleDecl::ExportDefaultDecl(self.ast(decl))); + } else if self.input.syntax().export_default_from() + && (is!(self, "from") + || (is!(self, ',') && (peeked_is!(self, '{') || peeked_is!(self, '*')))) + { + export_default = Some(Ident::new_no_ctxt("default".into(), self.input.prev_span())) + } else { + let expr = self.include_in_expr(true).parse_assignment_expr()?; + expect!(self, ';'); + return Ok(ModuleDecl::ExportDefaultExpr(self.ast(ExportDefaultExpr { + span: span!(self, start), + expr, + }))); + } + } + + if is!(self, '@') { + let start = cur_pos!(self); + let after_decorators = self.parse_decorators(false)?; + + if !decorators.is_empty() { + syntax_error!(self, span!(self, start), SyntaxError::TS8038); + } + + decorators = after_decorators; + } + + let decl = if !type_only && is!(self, "class") { + let class_start = cur_pos!(self); + self.parse_class_decl(start, class_start, decorators, false)? + } else if !type_only + && is!(self, "async") + && peeked_is!(self, "function") + && !self.input.has_linebreak_between_cur_and_peeked() + { + self.parse_async_fn_decl(decorators)? + } else if !type_only && is!(self, "function") { + self.parse_fn_decl(decorators)? + } else if !type_only + && self.input.syntax().typescript() + && is!(self, "const") + && peeked_is!(self, "enum") + { + let enum_start = cur_pos!(self); + assert_and_bump!(self, "const"); + let _ = cur!(self, true); + assert_and_bump!(self, "enum"); + return self + .parse_ts_enum_decl(enum_start, /* is_const */ true) + .map(Decl::from) + .map(|decl| { + ModuleDecl::ExportDecl(self.ast(ExportDecl { + span: span!(self, start), + decl, + })) + }); + } else if !type_only + && (is!(self, "var") + || is!(self, "const") + || (is!(self, "let")) + && peek!(self) + .map(|t| { + // module code is always in strict mode. + t.kind().follows_keyword_let(true) + }) + .unwrap_or(false)) + { + self.parse_var_stmt(false).map(Decl::Var)? + } else { + // ```javascript + // export foo, * as bar, { baz } from "mod"; // * + // export * as bar, { baz } from "mod"; // * + // export foo, { baz } from "mod"; // * + // export foo, * as bar from "mod"; // * + // export foo from "mod"; // * + // export * as bar from "mod"; // + // export { baz } from "mod"; // + // export { baz } ; // + // export * from "mod"; // + // ``` + + // export default + // export foo + let default = match export_default { + Some(default) => Some(default), + None => { + if self.input.syntax().export_default_from() && is!(self, IdentName) { + Some(self.parse_ident(false, false)?) + } else { + None + } + } + }; + + if default.is_none() && is!(self, '*') && !peeked_is!(self, "as") { + assert_and_bump!(self, '*'); + + // improve error message for `export * from foo` + let (src, with) = self.parse_from_clause_and_semi()?; + return Ok(ModuleDecl::ExportAll(self.ast(ExportAll { + span: span!(self, start), + src, + type_only, + with, + }))); + } + + let mut specifiers = Vec::new_in(self.alloc); + + let mut has_default = false; + let mut has_ns = false; + + if let Some(default) = default { + has_default = true; + + specifiers.push(ExportSpecifier::Default( + self.ast(ExportDefaultSpecifier { exported: default }), + )) + } + + // export foo, * as bar + // ^ + if !specifiers.is_empty() && is!(self, ',') && peeked_is!(self, '*') { + assert_and_bump!(self, ','); + + has_ns = true; + } + // export * as bar + // ^ + else if specifiers.is_empty() && is!(self, '*') { + has_ns = true; + } + + if has_ns { + assert_and_bump!(self, '*'); + expect!(self, "as"); + let name = self.parse_module_export_name()?; + specifiers.push(ExportSpecifier::Namespace(self.ast( + ExportNamespaceSpecifier { + span: span!(self, ns_export_specifier_start), + name, + }, + ))); + } + + if has_default || has_ns { + if is!(self, "from") { + let (src, with) = self.parse_from_clause_and_semi()?; + return Ok(ModuleDecl::ExportNamed(self.ast(NamedExport { + span: span!(self, start), + specifiers, + src: Some(src), + type_only, + with, + }))); + } else if !self.input.syntax().export_default_from() { + // emit error + expect!(self, "from"); + } + + expect!(self, ','); + } + + expect!(self, '{'); + + while !eof!(self) && !is!(self, '}') { + let specifier = self.parse_named_export_specifier(type_only)?; + specifiers.push(ExportSpecifier::Named(specifier)); + + if is!(self, '}') { + break; + } else { + expect!(self, ','); + } + } + expect!(self, '}'); + + let opt = if is!(self, "from") { + Some(self.parse_from_clause_and_semi()?) + } else { + for s in &specifiers { + match s { + ExportSpecifier::Default(default) => { + self.emit_err( + default.exported.span, + SyntaxError::ExportExpectFrom(default.exported.sym.clone()), + ); + } + ExportSpecifier::Namespace(namespace) => { + let export_name = match &namespace.name { + ModuleExportName::Ident(i) => i.sym.clone(), + ModuleExportName::Str(s) => s.value.clone(), + }; + self.emit_err( + namespace.span, + SyntaxError::ExportExpectFrom(export_name), + ); + } + ExportSpecifier::Named(named) => match &named.orig { + ModuleExportName::Ident(id) if id.is_reserved() => { + self.emit_err( + id.span, + SyntaxError::ExportExpectFrom(id.sym.clone()), + ); + } + ModuleExportName::Str(s) => { + self.emit_err(s.span, SyntaxError::ExportBindingIsString); + } + _ => {} + }, + } + } + + eat!(self, ';'); + + None + }; + let (src, with) = match opt { + Some(v) => (Some(v.0), v.1), + None => (None, None), + }; + return Ok(ModuleDecl::ExportNamed(self.ast(NamedExport { + span: span!(self, start), + specifiers, + src, + type_only, + with, + }))); + }; + + Ok(ModuleDecl::ExportDecl(self.ast(ExportDecl { + span: span!(self, start), + decl, + }))) + } + + fn parse_named_export_specifier( + &mut self, + type_only: bool, + ) -> PResult>> { + let start = cur_pos!(self); + + let mut is_type_only = false; + + let orig = match self.parse_module_export_name()? { + ModuleExportName::Ident(orig_ident) => { + // Handle: + // `export { type xx }` + // `export { type xx as yy }` + // `export { type as }` + // `export { type as as }` + // `export { type as as as }` + if self.syntax().typescript() && orig_ident.sym == "type" && is!(self, IdentName) { + let possibly_orig = self.parse_ident_name().map(Ident::from)?; + if possibly_orig.sym == "as" { + // `export { type as }` + if !is!(self, IdentName) { + if type_only { + self.emit_err(orig_ident.span, SyntaxError::TS2207); + } + + return Ok(self.ast(ExportNamedSpecifier { + span: span!(self, start), + orig: ModuleExportName::Ident(self.ast(possibly_orig)), + exported: None, + is_type_only: true, + })); + } + + let maybe_as = self.parse_ident_name().map(Ident::from)?; + if maybe_as.sym == "as" { + if is!(self, IdentName) { + // `export { type as as as }` + // `export { type as as foo }` + let exported = self.parse_ident_name().map(Ident::from)?; + + if type_only { + self.emit_err(orig_ident.span, SyntaxError::TS2207); + } + + return Ok(self.ast(ExportNamedSpecifier { + span: Span::new(start, orig_ident.span.hi()), + orig: ModuleExportName::Ident(self.ast(possibly_orig)), + exported: Some(ModuleExportName::Ident(self.ast(exported))), + is_type_only: true, + })); + } else { + // `export { type as as }` + return Ok(self.ast(ExportNamedSpecifier { + span: Span::new(start, orig_ident.span.hi()), + orig: ModuleExportName::Ident(orig_ident), + exported: Some(ModuleExportName::Ident(self.ast(maybe_as))), + is_type_only: false, + })); + } + } else { + // `export { type as xxx }` + return Ok(self.ast(ExportNamedSpecifier { + span: Span::new(start, orig_ident.span.hi()), + orig: ModuleExportName::Ident(orig_ident), + exported: Some(ModuleExportName::Ident(self.ast(maybe_as))), + is_type_only: false, + })); + } + } else { + // `export { type xx }` + // `export { type xx as yy }` + if type_only { + self.emit_err(orig_ident.span, SyntaxError::TS2207); + } + + is_type_only = true; + ModuleExportName::Ident(self.ast(possibly_orig)) + } + } else { + ModuleExportName::Ident(orig_ident) + } + } + module_export_name => module_export_name, + }; + + let exported = if eat!(self, "as") { + Some(self.parse_module_export_name()?) + } else { + None + }; + + Ok(self.ast(ExportNamedSpecifier { + span: span!(self, start), + orig, + exported, + is_type_only, + })) + } + + /// Parses `from 'foo.js' with {};` or `from 'foo.js' assert {};` + fn parse_from_clause_and_semi( + &mut self, + ) -> PResult<(Box<'a, Str>, Option>>)> { + expect!(self, "from"); + + let str_start = cur_pos!(self); + let src = match *cur!(self, true) { + Token::Str { .. } => match bump!(self) { + Token::Str { value, raw, .. } => self.ast(Str { + span: span!(self, str_start), + value, + raw: Some(raw), + }), + _ => unreachable!(), + }, + _ => unexpected!(self, "a string literal"), + }; + let _ = cur!(self, false); + let with = if self.input.syntax().import_attributes() + && !self.input.had_line_break_before_cur() + && (eat!(self, "assert") || eat!(self, "with")) + { + match self.parse_object_expr()? { + Expr::Object(v) => Some(v), + _ => unreachable!(), + } + } else { + None + }; + expect!(self, ';'); + Ok((src, with)) + } +} + +impl<'a> IsDirective<'a> for ModuleItem<'a> { + fn as_ref(&self) -> Option<&Stmt<'a>> { + match *self { + ModuleItem::Stmt(ref s) => Some(s), + _ => None, + } + } +} + +impl<'a, I: Tokens> StmtLikeParser<'a, ModuleItem<'a>> for Parser<'a, I> { + fn handle_import_export( + &mut self, + top_level: bool, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult> { + if !top_level { + syntax_error!(self, SyntaxError::NonTopLevelImportExport); + } + + let decl = if is!(self, "import") { + self.parse_import()? + } else if is!(self, "export") { + self.parse_export(decorators).map(ModuleItem::ModuleDecl)? + } else { + unreachable!( + "handle_import_export should not be called if current token isn't import nor \ + export" + ) + }; + + Ok(decl) + } +} + +#[cfg(test)] +mod tests { + use crate::{EsSyntax, Syntax}; + + #[test] + fn test_legacy_decorator() { + crate::test_parser( + "@foo +export default class Foo { + bar() { + class Baz {} + } +}", + Syntax::Es(EsSyntax { + decorators: true, + decorators_before_export: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/tests.rs b/crates/swc_ecma_parser/src/arena/parser/tests.rs new file mode 100644 index 000000000000..b73fe2f8729b --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/tests.rs @@ -0,0 +1,406 @@ +use swc_common::comments::SingleThreadedComments; + +use super::*; +use crate::EsSyntax; + +fn program<'a>(alloc: &'a Allocator, src: &'static str) -> Program<'a> { + test_parser(alloc, src, Default::default(), |p| p.parse_program()) +} + +/// Assert that Parser.parse_program returns [Program::Module]. +fn module<'a>(alloc: &'a Allocator, src: &'static str) -> Module<'a> { + program(alloc, src).expect_module().into_inner() +} + +/// Assert that Parser.parse_program returns [Program::Script]. +fn script<'a>(alloc: &'a Allocator, src: &'static str) -> Script<'a> { + program(alloc, src).expect_script().into_inner() +} + +/// Assert that Parser.parse_program returns [Program::Module] and has errors. +#[track_caller] +fn assert_module_error<'a>(alloc: &'a Allocator, src: &'static str) -> Module<'a> { + test_parser(alloc, src, Default::default(), |p| { + let program = p.parse_program()?; + + let errors = p.take_errors(); + assert_ne!(errors, Vec::new()); + + let module = program.expect_module(); + + Ok(module.into_inner()) + }) +} + +#[test] +fn parse_program_module_01() { + let alloc = Allocator::default(); + module(&alloc, "import 'foo';"); + module(&alloc, "export const a = 1;"); +} + +#[test] +fn parse_program_script_01() { + let alloc = Allocator::default(); + script(&alloc, "let a = 5;"); + script(&alloc, "function foo() {}"); + script(&alloc, "const a = 00176;"); +} + +#[test] +fn parse_program_module_02() { + let alloc = Allocator::default(); + module( + &alloc, + " + function foo() {} + export default foo; + ", + ); + module( + &alloc, + " + export function foo() {} + export default foo; + ", + ); +} + +#[test] +fn parse_program_module_error_01() { + let alloc = Allocator::default(); + assert_module_error( + &alloc, + " + const a = 01234; + export default a; + ", + ); +} + +#[test] +fn issue_1813() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "\\u{cccccccccsccccccQcXt[uc(~).const[uctor().const[uctor())tbr())", + Default::default(), + |p| { + p.parse_program().expect_err("should fail"); + + Ok(()) + }, + ) +} + +#[test] +fn parse_module_export_named_span() { + let alloc = Allocator::default(); + let m = module(&alloc, "export function foo() {}"); + if let ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(export_decl)) = &m.body[0] { + assert_eq!(export_decl.span.lo, BytePos(1)); + } else { + panic!("expected ExportDecl"); + } +} + +#[test] +fn parse_module_export_default_fn_span() { + let alloc = Allocator::default(); + let m = module(&alloc, "export default function foo() {}"); + if let ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(export_default_decl)) = &m.body[0] { + assert_eq!(export_default_decl.span.lo, BytePos(1)); + assert_eq!(export_default_decl.span.hi, BytePos(33)); + } else { + panic!("expected ExportDefaultDecl"); + } +} + +#[test] +fn parse_module_export_default_async_fn_span() { + let alloc = Allocator::default(); + let m = module(&alloc, "export default async function foo() {}"); + if let ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(export_default_decl)) = &m.body[0] { + assert_eq!(export_default_decl.span.lo, BytePos(1)); + assert_eq!(export_default_decl.span.hi, BytePos(39)); + } else { + panic!("expected ExportDefaultDecl"); + } +} + +#[test] +fn parse_module_export_default_class_span() { + let alloc = Allocator::default(); + let m = module(&alloc, "export default class Foo {}"); + if let ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(decl)) = &m.body[0] { + assert_eq!(decl.span.lo, BytePos(1)); + assert_eq!(decl.span.hi, BytePos(28)); + } else { + panic!("expected ExportDefaultDecl"); + } +} + +#[test] +fn issue_1878() { + // file with only comments should have the comments + // in the leading map instead of the trailing + { + let c = SingleThreadedComments::default(); + let s = " + // test + "; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Typescript(Default::default()), + |p| p.parse_typescript_module(), + ); + + let (leading, trailing) = c.take_all(); + assert!(trailing.borrow().is_empty()); + assert_eq!(leading.borrow().len(), 1); + assert!(leading.borrow().get(&BytePos(1)).is_some()); + } + + // file with shebang and comments should still work with the comments trailing + // the shebang + { + let c = SingleThreadedComments::default(); + let s = "#!/foo/bar + // test + "; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Typescript(Default::default()), + |p| p.parse_typescript_module(), + ); + + let (leading, trailing) = c.take_all(); + assert!(leading.borrow().is_empty()); + assert_eq!(trailing.borrow().len(), 1); + assert!(trailing.borrow().get(&BytePos(11)).is_some()); + } +} + +#[test] +fn issue_2264_1() { + let c = SingleThreadedComments::default(); + let s = " + const t = + // 1 + /* 2 */ + + "; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Typescript(TsSyntax { + tsx: true, + ..Default::default() + }), + |p| p.parse_typescript_module(), + ); + + let (_leading, trailing) = c.take_all(); + // assert!(leading.borrow().is_empty()); + assert!(trailing.borrow().is_empty()); +} + +#[test] +fn issue_2264_2() { + let c = SingleThreadedComments::default(); + let s = " + const t = + // 1 + /* 2 */ + + "; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Es(EsSyntax { + jsx: true, + ..Default::default() + }), + |p| p.parse_module(), + ); + + let (leading, trailing) = c.take_all(); + assert!(leading.borrow().is_empty()); + assert!(trailing.borrow().is_empty()); +} + +#[test] +fn issue_2264_3() { + let c = SingleThreadedComments::default(); + let s = "const foo =

/* no */{/* 1 */ bar /* 2 */}/* no */

;"; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Typescript(TsSyntax { + tsx: true, + ..Default::default() + }), + |p| p.parse_typescript_module(), + ); + + let (leading, trailing) = c.take_all(); + assert!(leading.borrow().is_empty()); + assert_eq!(trailing.borrow().len(), 2); + assert_eq!(trailing.borrow().get(&BytePos(26)).unwrap().len(), 1); + assert_eq!(trailing.borrow().get(&BytePos(37)).unwrap().len(), 1); +} + +#[test] +fn issue_2339_1() { + let c = SingleThreadedComments::default(); + let s = " + const t = () => { + // 1 + /* 2 */ + test; + }; + "; + let alloc = Allocator::default(); + let _ = super::test_parser_comment( + &alloc, + &c, + s, + Syntax::Typescript(TsSyntax { + tsx: true, + ..Default::default() + }), + |p| p.parse_typescript_module(), + ); + + let (leading, trailing) = c.take_all(); + assert_eq!(leading.borrow().len(), 1); + assert_eq!(leading.borrow().get(&BytePos(80)).unwrap().len(), 2); + assert!(trailing.borrow().is_empty()); +} + +#[test] +fn issue_2853_1() { + let alloc = Allocator::default(); + test_parser(&alloc, "const a = \"\\0a\";", Default::default(), |p| { + let program = p.parse_program()?; + + let errors = p.take_errors(); + assert_eq!(errors, Vec::new()); + assert_eq!(errors, Vec::new()); + + Ok(program) + }); +} + +#[test] +fn issue_2853_2() { + let alloc = Allocator::default(); + test_parser( + &alloc, + "const a = \"\u{0000}a\";", + Default::default(), + |p| { + let program = p.parse_program()?; + + let errors = p.take_errors(); + assert_eq!(errors, Vec::new()); + + Ok(program) + }, + ); +} + +#[test] +fn illegal_language_mode_directive1() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"function f(a = 0) { "use strict"; }"#, + Default::default(), + |p| { + let program = p.parse_program()?; + + let errors = p.take_errors(); + assert_eq!( + errors, + vec![Error::new( + Span { + lo: BytePos(21), + hi: BytePos(34), + }, + SyntaxError::IllegalLanguageModeDirective + )] + ); + + Ok(program) + }, + ); +} + +#[test] +fn illegal_language_mode_directive2() { + let alloc = Allocator::default(); + test_parser( + &alloc, + r#"let f = (a = 0) => { "use strict"; }"#, + Default::default(), + |p| { + let program = p.parse_program()?; + + let errors = p.take_errors(); + assert_eq!( + errors, + vec![Error::new( + Span { + lo: BytePos(22), + hi: BytePos(35), + }, + SyntaxError::IllegalLanguageModeDirective + )] + ); + + Ok(program) + }, + ); +} + +#[test] +fn parse_non_strict_for_loop() { + let alloc = Allocator::default(); + script(&alloc, "for (var v1 = 1 in v3) {}"); +} + +#[test] +fn parse_program_take_script_module_errors() { + let alloc = Allocator::default(); + test_parser(&alloc, r#"077;"#, Default::default(), |p| { + let program = p.parse_program()?; + + assert_eq!(p.take_errors(), vec![]); + // will contain the script's potential module errors + assert_eq!( + p.take_script_module_errors(), + vec![Error::new( + Span { + lo: BytePos(1), + hi: BytePos(4), + }, + SyntaxError::LegacyOctal + )] + ); + + Ok(program) + }); +} diff --git a/crates/swc_ecma_parser/src/arena/parser/typescript.rs b/crates/swc_ecma_parser/src/arena/parser/typescript.rs new file mode 100644 index 000000000000..d56153acda49 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/typescript.rs @@ -0,0 +1,3063 @@ +use std::fmt::Write; + +use either::Either; +use swc_allocator::arena::{Box, Vec}; +use swc_atoms::{js_word, JsWord}; +use swc_common::{BytePos, Span, Spanned}; +use swc_ecma_ast::arena::*; + +use super::{class_and_fn::IsSimpleParameterList, Parser}; +use crate::{ + error::SyntaxError, + lexer::TokenContexts, + token::{Keyword, Token, Word}, + Context, PResult, Syntax, Tokens, TsSyntax, +}; + +impl<'a, I: Tokens> Parser<'a, I> { + /// `tsNextTokenCanFollowModifier` + fn ts_next_token_can_follow_modifier(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + // Note: TypeScript's implementation is much more complicated because + // more things are considered modifiers there. + // This implementation only handles modifiers not handled by @babel/parser + // itself. And "static". TODO: Would be nice to avoid lookahead. Want a + // hasLineBreakUpNext() method... + bump!(self); + Ok(!self.input.had_line_break_before_cur() + && is_one_of!(self, '[', '{', '*', "...", '#', IdentName, Str, Num, BigInt)) + } + + /// Parses a modifier matching one the given modifier names. + /// + /// `tsParseModifier` + pub(crate) fn parse_ts_modifier( + &mut self, + allowed_modifiers: &[&'static str], + stop_on_start_of_class_static_blocks: bool, + ) -> PResult> { + if !self.input.syntax().typescript() { + return Ok(None); + } + + let pos = { + let modifier = match *cur!(self, true) { + Token::Word(ref w @ Word::Ident(..)) + | Token::Word(ref w @ Word::Keyword(Keyword::In | Keyword::Const)) => w.cow(), + + _ => return Ok(None), + }; + + allowed_modifiers.iter().position(|s| **s == **modifier) + }; + + if let Some(pos) = pos { + if stop_on_start_of_class_static_blocks && is!(self, "static") && peeked_is!(self, '{') + { + return Ok(None); + } + if self.try_parse_ts_bool(|p| p.ts_next_token_can_follow_modifier().map(Some))? { + return Ok(Some(allowed_modifiers[pos])); + } + } + + Ok(None) + } + + /// `tsIsListTerminator` + fn is_ts_list_terminator(&mut self, kind: ParsingContext) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + Ok(match kind { + ParsingContext::EnumMembers | ParsingContext::TypeMembers => is!(self, '}'), + ParsingContext::HeritageClauseElement { .. } => { + is!(self, '{') || is!(self, "implements") || is!(self, "extends") + } + ParsingContext::TupleElementTypes => is!(self, ']'), + ParsingContext::TypeParametersOrArguments => is!(self, '>'), + }) + } + + /// `tsParseList` + fn parse_ts_list( + &mut self, + kind: ParsingContext, + mut parse_element: F, + ) -> PResult> + where + F: FnMut(&mut Self) -> PResult, + { + debug_assert!(self.input.syntax().typescript()); + + let mut buf = Vec::new_in(self.alloc); + while !self.is_ts_list_terminator(kind)? { + // Skipping "parseListElement" from the TS source since that's just for error + // handling. + buf.push(parse_element(self)?); + } + Ok(buf) + } + + /// `tsParseDelimitedList` + fn parse_ts_delimited_list( + &mut self, + kind: ParsingContext, + mut parse_element: F, + ) -> PResult> + where + F: FnMut(&mut Self) -> PResult, + { + self.parse_ts_delimited_list_inner(kind, |p| { + let start = p.input.cur_pos(); + + Ok((start, parse_element(p)?)) + }) + } + + /// `tsParseDelimitedList` + fn parse_ts_delimited_list_inner( + &mut self, + kind: ParsingContext, + mut parse_element: F, + ) -> PResult> + where + F: FnMut(&mut Self) -> PResult<(BytePos, T)>, + { + debug_assert!(self.input.syntax().typescript()); + + let mut buf = Vec::new_in(self.alloc); + + loop { + trace_cur!(self, parse_ts_delimited_list_inner__element); + + if self.is_ts_list_terminator(kind)? { + break; + } + let (_, element) = parse_element(self)?; + buf.push(element); + + if eat!(self, ',') { + continue; + } + + if self.is_ts_list_terminator(kind)? { + break; + } + + if kind == ParsingContext::EnumMembers { + const TOKEN: &Token = &Token::Comma; + let cur = match cur!(self, false).ok() { + Some(tok) => format!("{:?}", tok), + None => "EOF".to_string(), + }; + self.emit_err(self.input.cur_span(), SyntaxError::Expected(TOKEN, cur)); + continue; + } + // This will fail with an error about a missing comma + expect!(self, ','); + } + + Ok(buf) + } + + fn parse_ts_bracketed_list( + &mut self, + kind: ParsingContext, + parse_element: F, + bracket: bool, + skip_first_token: bool, + ) -> PResult> + where + F: FnMut(&mut Self) -> PResult, + { + debug_assert!(self.input.syntax().typescript()); + + if !skip_first_token { + if bracket { + expect!(self, '['); + } else { + expect!(self, '<'); + } + } + + let result = self.parse_ts_delimited_list(kind, parse_element)?; + + if bracket { + expect!(self, ']'); + } else { + expect!(self, '>'); + } + + Ok(result) + } + + /// `tsParseEntityName` + fn parse_ts_entity_name(&mut self, allow_reserved_words: bool) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + trace_cur!(self, parse_ts_entity_name); + let start = cur_pos!(self); + + let init = self.parse_ident_name()?; + if &*init.sym == "void" { + let dot_start = cur_pos!(self); + let dot_span = span!(self, dot_start); + self.emit_err(dot_span, SyntaxError::TS1005) + } + let mut entity = TsEntityName::Ident(self.ast(init.into())); + while eat!(self, '.') { + let dot_start = cur_pos!(self); + if !is!(self, '#') && !is!(self, IdentName) { + self.emit_err(Span::new(dot_start, dot_start), SyntaxError::TS1003); + return Ok(entity); + } + + let left = entity; + let right = if allow_reserved_words { + self.parse_ident_name()? + } else { + self.parse_ident(false, false)?.into() + }; + let span = span!(self, start); + entity = TsEntityName::TsQualifiedName(self.ast(TsQualifiedName { span, left, right })); + } + + Ok(entity) + } + + /// `tsParseTypeReference` + fn parse_ts_type_ref(&mut self) -> PResult> { + trace_cur!(self, parse_ts_type_ref); + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + + let has_modifier = self.eat_any_ts_modifier()?; + + let type_name = self.parse_ts_entity_name(/* allow_reserved_words */ true)?; + trace_cur!(self, parse_ts_type_ref__type_args); + let type_params = if !self.input.had_line_break_before_cur() && is!(self, '<') { + let ctx = Context { + should_not_lex_lt_or_gt_as_type: false, + ..self.ctx() + }; + Some(self.with_ctx(ctx).parse_ts_type_args()?) + } else { + None + }; + + if has_modifier { + self.emit_err(span!(self, start), SyntaxError::TS2369); + } + + Ok(TsTypeRef { + span: span!(self, start), + type_name, + type_params, + }) + } + + /// `tsParseThisTypePredicate` + fn parse_ts_this_type_predicate( + &mut self, + start: BytePos, + has_asserts_keyword: bool, + lhs: TsThisType, + ) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let param_name = TsThisTypeOrIdent::TsThisType(self.ast(lhs)); + let type_ann = if eat!(self, "is") { + let cur_pos = cur_pos!(self); + Some(self.parse_ts_type_ann( + // eat_colon + false, cur_pos, + )?) + } else { + None + }; + + Ok(TsTypePredicate { + span: span!(self, start), + asserts: has_asserts_keyword, + param_name, + type_ann, + }) + } + + /// `tsParseThisTypeNode` + fn parse_ts_this_type_node(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + expect!(self, "this"); + + Ok(TsThisType { + span: self.input.prev_span(), + }) + } + + /// `tsParseImportType` + fn parse_ts_import_type(&mut self) -> PResult> { + let start = cur_pos!(self); + assert_and_bump!(self, "import"); + + expect!(self, '('); + + let _ = cur!(self, false); + + let arg_span = self.input.cur_span(); + + let arg = match cur!(self, true) { + Token::Str { .. } => match bump!(self) { + Token::Str { value, raw } => Str { + span: arg_span, + value, + raw: Some(raw), + }, + _ => unreachable!(), + }, + _ => { + bump!(self); + self.emit_err(arg_span, SyntaxError::TS1141); + Str { + span: arg_span, + value: "".into(), + raw: Some("\"\"".into()), + } + } + }; + + expect!(self, ')'); + + let qualifier = if eat!(self, '.') { + self.parse_ts_entity_name(false).map(Some)? + } else { + None + }; + + let type_args = if is!(self, '<') { + self.parse_ts_type_args().map(Some)? + } else { + None + }; + + Ok(TsImportType { + span: span!(self, start), + arg, + qualifier, + type_args, + }) + } + + /// `tsParseTypeQuery` + fn parse_ts_type_query(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + expect!(self, "typeof"); + let expr_name = if is!(self, "import") { + let ts_import_type = self.parse_ts_import_type()?; + TsTypeQueryExpr::Import(self.ast(ts_import_type)) + } else { + let ts_entity_name = self.parse_ts_entity_name( + // allow_reserved_word + true, + )?; + + TsTypeQueryExpr::TsEntityName(self.ast(ts_entity_name)) + }; + + let type_args = if !self.input.had_line_break_before_cur() && is!(self, '<') { + let ctx = Context { + should_not_lex_lt_or_gt_as_type: false, + ..self.ctx() + }; + Some(self.with_ctx(ctx).parse_ts_type_args()?) + } else { + None + }; + + Ok(TsTypeQuery { + span: span!(self, start), + expr_name, + type_args, + }) + } + + /// `tsParseTypeParameter` + fn parse_ts_type_param( + &mut self, + permit_in_out: bool, + permit_const: bool, + ) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let mut is_in = false; + let mut is_out = false; + let mut is_const = false; + + let start = cur_pos!(self); + + while let Some(modifer) = self.parse_ts_modifier( + &[ + "public", + "private", + "protected", + "readonly", + "abstract", + "const", + "override", + "in", + "out", + ], + false, + )? { + match modifer { + "const" => { + is_const = true; + if !permit_const { + self.emit_err(self.input.prev_span(), SyntaxError::TS1277("const".into())); + } + } + "in" => { + if !permit_in_out { + self.emit_err(self.input.prev_span(), SyntaxError::TS1274("in".into())); + } else if is_in { + self.emit_err(self.input.prev_span(), SyntaxError::TS1030("in".into())); + } else if is_out { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1029("in".into(), "out".into()), + ); + } + is_in = true; + } + "out" => { + if !permit_in_out { + self.emit_err(self.input.prev_span(), SyntaxError::TS1274("out".into())); + } else if is_out { + self.emit_err(self.input.prev_span(), SyntaxError::TS1030("out".into())); + } + is_out = true; + } + other => self.emit_err(self.input.prev_span(), SyntaxError::TS1273(other.into())), + }; + } + + let name = self.in_type().parse_ident_name()?.into(); + let constraint = self.eat_then_parse_ts_type(&tok!("extends"))?; + let default = self.eat_then_parse_ts_type(&tok!('='))?; + + Ok(TsTypeParam { + span: span!(self, start), + name, + is_in, + is_out, + is_const, + constraint, + default, + }) + } + + /// `tsParseTypeParameter` + pub(crate) fn parse_ts_type_params( + &mut self, + permit_in_out: bool, + permit_const: bool, + ) -> PResult>> { + self.in_type().parse_with(|p| { + p.ts_in_no_context(|p| { + let start = cur_pos!(p); + + if !is!(p, '<') && !is!(p, JSXTagStart) { + unexpected!(p, "< (jsx tag start)") + } + bump!(p); // '<' + + let params = p.parse_ts_bracketed_list( + ParsingContext::TypeParametersOrArguments, + |p| p.parse_ts_type_param(permit_in_out, permit_const), // bracket + false, + // skip_first_token + true, + )?; + + Ok(p.ast(TsTypeParamDecl { + span: span!(p, start), + params, + })) + }) + }) + } + + /// `tsParseTypeOrTypePredicateAnnotation` + pub(crate) fn parse_ts_type_or_type_predicate_ann( + &mut self, + return_token: &'static Token, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + self.in_type().parse_with(|p| { + let return_token_start = cur_pos!(p); + if !p.input.eat(return_token) { + let cur = format!("{:?}", cur!(p, false).ok()); + let span = p.input.cur_span(); + syntax_error!(p, span, SyntaxError::Expected(return_token, cur)) + } + + let type_pred_start = cur_pos!(p); + let has_type_pred_asserts = is!(p, "asserts") && peeked_is!(p, IdentRef); + if has_type_pred_asserts { + assert_and_bump!(p, "asserts"); + cur!(p, false)?; + } + + let has_type_pred_is = is!(p, IdentRef) + && peeked_is!(p, "is") + && !p.input.has_linebreak_between_cur_and_peeked(); + let is_type_predicate = has_type_pred_asserts || has_type_pred_is; + if !is_type_predicate { + return p.parse_ts_type_ann( + // eat_colon + false, + return_token_start, + ); + } + + let type_pred_var = p.parse_ident_name()?; + let type_ann = if has_type_pred_is { + assert_and_bump!(p, "is"); + let pos = cur_pos!(p); + Some(p.parse_ts_type_ann( + // eat_colon + false, pos, + )?) + } else { + None + }; + + let node = TsType::TsTypePredicate(p.ast(TsTypePredicate { + span: span!(p, type_pred_start), + asserts: has_type_pred_asserts, + param_name: TsThisTypeOrIdent::Ident(p.ast(type_pred_var.into())), + type_ann, + })); + + Ok(p.ast(TsTypeAnn { + span: span!(p, return_token_start), + type_ann: node, + })) + }) + } + + /// `tsTryParse` + fn try_parse_ts_bool(&mut self, op: F) -> PResult + where + F: FnOnce(&mut Self) -> PResult>, + { + if !self.input.syntax().typescript() { + return Ok(false); + } + let prev_ignore_error = self.input.get_ctx().ignore_error; + let mut cloned = self.clone(); + let ctx = Context { + ignore_error: true, + ..self.input.get_ctx() + }; + cloned.set_ctx(ctx); + let res = op(&mut cloned); + match res { + Ok(Some(res)) if res => { + *self = cloned; + let ctx = Context { + ignore_error: prev_ignore_error, + ..self.input.get_ctx() + }; + self.input.set_ctx(ctx); + Ok(res) + } + Err(..) => Ok(false), + _ => Ok(false), + } + } + + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn try_parse_ts_type_args( + &mut self, + ) -> Option>> { + trace_cur!(self, try_parse_ts_type_args); + debug_assert!(self.input.syntax().typescript()); + + self.try_parse_ts(|p| { + let type_args = p.parse_ts_type_args()?; + + if is_one_of!( + p, '<', // invalid syntax + '>', '=', ">>", ">=", '+', '-', // becomes relational expression + /* these should be type arguments in function call or template, + * not instantiation expression */ + '(', '`' + ) { + Ok(None) + } else if p.input.had_line_break_before_cur() + || matches!(cur!(p, false), Ok(Token::BinOp(..))) + || !p.is_start_of_expr()? + { + Ok(Some(type_args)) + } else { + Ok(None) + } + }) + } + + /// `tsTryParse` + pub(crate) fn try_parse_ts(&mut self, op: F) -> Option + where + F: FnOnce(&mut Self) -> PResult>, + { + if !self.input.syntax().typescript() { + return None; + } + let _tracing = debug_tracing!(self, "try_parse_ts"); + + trace_cur!(self, try_parse_ts); + + let prev_ignore_error = self.input.get_ctx().ignore_error; + let mut cloned = self.clone(); + let ctx = Context { + ignore_error: true, + ..self.input.get_ctx() + }; + cloned.set_ctx(ctx); + let res = op(&mut cloned); + match res { + Ok(Some(res)) => { + *self = cloned; + trace_cur!(self, try_parse_ts__success_value); + let ctx = Context { + ignore_error: prev_ignore_error, + ..self.input.get_ctx() + }; + self.input.set_ctx(ctx); + + Some(res) + } + Ok(None) => { + trace_cur!(self, try_parse_ts__success_no_value); + + None + } + Err(..) => { + trace_cur!(self, try_parse_ts__fail); + + None + } + } + } + + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn parse_ts_type_ann( + &mut self, + eat_colon: bool, + start: BytePos, + ) -> PResult>> { + trace_cur!(self, parse_ts_type_ann); + + debug_assert!(self.input.syntax().typescript()); + + self.in_type().parse_with(|p| { + if eat_colon { + assert_and_bump!(p, ':'); + } + + trace_cur!(p, parse_ts_type_ann__after_colon); + + let type_ann = p.parse_ts_type()?; + + Ok(p.ast(TsTypeAnn { + span: span!(p, start), + type_ann, + })) + }) + } + + /// `tsEatThenParseType` + fn eat_then_parse_ts_type( + &mut self, + token_to_eat: &'static Token, + ) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Default::default()); + } + + self.in_type().parse_with(|p| { + if !p.input.eat(token_to_eat) { + return Ok(None); + } + + p.parse_ts_type().map(Some) + }) + } + + /// `tsExpectThenParseType` + fn expect_then_parse_ts_type( + &mut self, + token: &'static Token, + token_str: &'static str, + ) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + self.in_type().parse_with(|p| { + if !p.input.eat(token) { + let got = format!("{:?}", cur!(p, false).ok()); + syntax_error!( + p, + p.input.cur_span(), + SyntaxError::Unexpected { + got, + expected: token_str + } + ); + } + + p.parse_ts_type() + }) + } + + /// `tsNextThenParseType` + pub(crate) fn next_then_parse_ts_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let result = self.in_type().parse_with(|p| { + bump!(p); + + p.parse_ts_type() + }); + + if !self.ctx().in_type && is_one_of!(self, '>', '<') { + self.input.merge_lt_gt(); + } + + result + } + + /// `tsParseEnumMember` + fn parse_ts_enum_member(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + // Computed property names are grammar errors in an enum, so accept just string + // literal or identifier. + let id = match *cur!(self, true) { + Token::Str { .. } => self.parse_lit().map(|lit| match lit { + Lit::Str(s) => TsEnumMemberId::Str(s), + _ => unreachable!(), + })?, + Token::Num { value, ref raw } => { + let mut new_raw = String::new(); + + new_raw.push('"'); + new_raw.push_str(raw); + new_raw.push('"'); + + bump!(self); + + let span = span!(self, start); + + // Recover from error + self.emit_err(span, SyntaxError::TS2452); + + TsEnumMemberId::Str(self.ast(Str { + span, + value: value.to_string().into(), + raw: Some(new_raw.into()), + })) + } + Token::LBracket => { + assert_and_bump!(self, '['); + let _ = self.parse_expr()?; + + self.emit_err(span!(self, start), SyntaxError::TS1164); + + expect!(self, ']'); + + TsEnumMemberId::Ident( + self.ast(Ident::new_no_ctxt(js_word!(""), span!(self, start))), + ) + } + _ => { + let ident = self.parse_ident_name()?; + TsEnumMemberId::Ident(self.ast(ident.into())) + } + }; + + let init = if eat!(self, '=') { + Some(self.parse_assignment_expr()?) + } else if is!(self, ',') || is!(self, '}') { + None + } else { + let start = cur_pos!(self); + bump!(self); + store!(self, ','); + self.emit_err(Span::new(start, start), SyntaxError::TS1005); + None + }; + + Ok(TsEnumMember { + span: span!(self, start), + id, + init, + }) + } + + /// `tsParseEnumDeclaration` + pub(crate) fn parse_ts_enum_decl( + &mut self, + start: BytePos, + is_const: bool, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + let id = self.parse_ident_name()?; + expect!(self, '{'); + let members = self + .parse_ts_delimited_list(ParsingContext::EnumMembers, |p| p.parse_ts_enum_member())?; + expect!(self, '}'); + + Ok(self.ast(TsEnumDecl { + span: span!(self, start), + declare: false, + is_const, + id: id.into(), + members, + })) + } + + /// `tsParseModuleBlock` + fn parse_ts_module_block(&mut self) -> PResult> { + trace_cur!(self, parse_ts_module_block); + + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + expect!(self, '{'); + // Inside of a module block is considered "top-level", meaning it can have + // imports and exports. + let body = self.parse_block_body( + /* directives */ false, + /* topLevel */ true, + /* end */ Some(&tok!('}')), + )?; + + Ok(TsModuleBlock { + span: span!(self, start), + body, + }) + } + + /// `tsParseModuleOrNamespaceDeclaration` + fn parse_ts_module_or_ns_decl(&mut self, start: BytePos) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + let id = self.parse_ident_name()?; + let body: TsNamespaceBody = if eat!(self, '.') { + let inner_start = cur_pos!(self); + let inner = self.parse_ts_module_or_ns_decl(inner_start)?.into_inner(); + let inner = TsNamespaceDecl { + span: inner.span, + id: match inner.id { + TsModuleName::Ident(i) => i.into_inner(), + _ => unreachable!(), + }, + body: self.ast(inner.body.unwrap()), + declare: inner.declare, + global: inner.global, + }; + TsNamespaceBody::TsNamespaceDecl(self.ast(inner)) + } else { + let ts_module_block = self.parse_ts_module_block()?; + TsNamespaceBody::TsModuleBlock(self.ast(ts_module_block)) + }; + + Ok(self.ast(TsModuleDecl { + span: span!(self, start), + declare: false, + id: TsModuleName::Ident(self.ast(id.into())), + body: Some(body), + global: false, + })) + } + + /// `tsParseAmbientExternalModuleDeclaration` + fn parse_ts_ambient_external_module_decl( + &mut self, + start: BytePos, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + let (global, id) = if is!(self, "global") { + let id = self.parse_ident_name()?; + (true, TsModuleName::Ident(self.ast(id.into()))) + } else if matches!(*cur!(self, true), Token::Str { .. }) { + let id = self.parse_lit().map(|lit| match lit { + Lit::Str(s) => TsModuleName::Str(s), + _ => unreachable!(), + })?; + (false, id) + } else { + unexpected!(self, "global or a string literal"); + }; + + let body = if is!(self, '{') { + let ts_module_block = self.parse_ts_module_block()?; + Some(TsNamespaceBody::TsModuleBlock(self.ast(ts_module_block))) + } else { + expect!(self, ';'); + None + }; + + Ok(self.ast(TsModuleDecl { + span: span!(self, start), + declare: false, + id, + global, + body, + })) + } + + pub fn parse_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + self.in_type().parse_ts_type() + } + + /// Be sure to be in a type context before calling self. + /// + /// `tsParseType` + pub(crate) fn parse_ts_type(&mut self) -> PResult> { + trace_cur!(self, parse_ts_type); + + debug_assert!(self.input.syntax().typescript()); + + // Need to set `state.inType` so that we don't parse JSX in a type context. + debug_assert!(self.ctx().in_type); + + let start = cur_pos!(self); + + self.with_ctx(Context { + disallow_conditional_types: false, + ..self.ctx() + }) + .parse_with(|p| { + let ty = p.parse_ts_non_conditional_type()?; + if p.input.had_line_break_before_cur() || !eat!(p, "extends") { + return Ok(ty); + } + + let check_type = ty; + let extends_type = { + p.with_ctx(Context { + disallow_conditional_types: true, + ..p.ctx() + }) + .parse_ts_non_conditional_type()? + }; + + expect!(p, '?'); + + let true_type = p.parse_ts_type()?; + + expect!(p, ':'); + + let false_type = p.parse_ts_type()?; + + Ok(TsType::TsConditionalType(p.ast(TsConditionalType { + span: span!(p, start), + check_type, + extends_type, + true_type, + false_type, + }))) + }) + } + + /// `tsParseNonConditionalType` + fn parse_ts_non_conditional_type(&mut self) -> PResult> { + trace_cur!(self, parse_ts_non_conditional_type); + + debug_assert!(self.input.syntax().typescript()); + + if self.is_ts_start_of_fn_type()? { + return self + .parse_ts_fn_or_constructor_type(true) + .map(|t| self.ast(t)) + .map(TsType::from); + } + if (is!(self, "abstract") && peeked_is!(self, "new")) || is!(self, "new") { + // As in `new () => Date` + return self + .parse_ts_fn_or_constructor_type(false) + .map(|t| self.ast(t)) + .map(TsType::from); + } + + self.parse_ts_union_type_or_higher() + } + + fn is_ts_start_of_fn_type(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + if is!(self, '<') { + return Ok(true); + } + + Ok(is!(self, '(') && self.ts_look_ahead(|p| p.is_ts_unambiguously_start_of_fn_type())?) + } + + /// `tsParseTypeAssertion` + pub(crate) fn parse_ts_type_assertion( + &mut self, + start: BytePos, + ) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + if self.input.syntax().disallow_ambiguous_jsx_like() { + self.emit_err(span!(self, start), SyntaxError::ReservedTypeAssertion); + } + + // Not actually necessary to set state.inType because we never reach here if JSX + // plugin is enabled, but need `tsInType` to satisfy the assertion in + // `tsParseType`. + let type_ann = self.in_type().parse_with(|p| p.parse_ts_type())?; + expect!(self, '>'); + let expr = self.parse_unary_expr()?; + Ok(TsTypeAssertion { + span: span!(self, start), + type_ann, + expr, + }) + } + + /// `tsParseHeritageClause` + pub(crate) fn parse_ts_heritage_clause(&mut self) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + self.parse_ts_delimited_list(ParsingContext::HeritageClauseElement, |p| { + p.parse_ts_heritage_clause_element() + }) + } + + fn parse_ts_heritage_clause_element(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + // Note: TS uses parseLeftHandSideExpressionOrHigher, + // then has grammar errors later if it's not an EntityName. + + let ident = self.parse_ident_name()?; + let ident = Expr::Ident(self.ast(ident.into())); + let expr = self.parse_subscripts(Callee::Expr(ident), true, true)?; + if !matches!( + expr, + Expr::Ident(..) | Expr::Member(..) | Expr::TsInstantiation(..) + ) { + self.emit_err(span!(self, start), SyntaxError::TS2499); + } + + match expr { + Expr::TsInstantiation(v) => { + let v = v.into_inner(); + Ok(TsExprWithTypeArgs { + span: v.span, + expr: v.expr, + type_args: Some(v.type_args), + }) + } + _ => { + let type_args = if is!(self, '<') { + Some(self.parse_ts_type_args()?) + } else { + None + }; + + Ok(TsExprWithTypeArgs { + span: span!(self, start), + expr, + type_args, + }) + } + } + } + + /// `tsParseInterfaceDeclaration` + pub(crate) fn parse_ts_interface_decl( + &mut self, + start: BytePos, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + let id = self.parse_ident_name()?; + match &*id.sym { + "string" | "null" | "number" | "object" | "any" | "unknown" | "boolean" | "bigint" + | "symbol" | "void" | "never" | "intrinsic" => { + self.emit_err(id.span, SyntaxError::TS2427); + } + _ => {} + } + + let type_params = self.try_parse_ts_type_params(true, false)?; + + let extends = if eat!(self, "extends") { + self.parse_ts_heritage_clause()? + } else { + Vec::new_in(self.alloc) + }; + + // Recover from + // + // interface I extends A extends B {} + if is!(self, "extends") { + self.emit_err(self.input.cur_span(), SyntaxError::TS1172); + + while !eof!(self) && !is!(self, '{') { + bump!(self); + } + } + + let body_start = cur_pos!(self); + let body = self + .in_type() + .parse_with(|p| p.parse_ts_object_type_members())?; + let body = TsInterfaceBody { + span: span!(self, body_start), + body, + }; + Ok(self.ast(TsInterfaceDecl { + span: span!(self, start), + declare: false, + id: id.into(), + type_params, + extends, + body, + })) + } + + /// `tsParseTypeAliasDeclaration` + pub(crate) fn parse_ts_type_alias_decl( + &mut self, + start: BytePos, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + let id = self.parse_ident_name()?; + let type_params = self.try_parse_ts_type_params(true, false)?; + let type_ann = self.expect_then_parse_ts_type(&tok!('='), "=")?; + expect!(self, ';'); + Ok(self.ast(TsTypeAliasDecl { + declare: false, + span: span!(self, start), + id: id.into(), + type_params, + type_ann, + })) + } + + /// `tsParseImportEqualsDeclaration` + pub(crate) fn parse_ts_import_equals_decl( + &mut self, + start: BytePos, + id: Ident, + is_export: bool, + is_type_only: bool, + ) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + expect!(self, '='); + + let module_ref = self.parse_ts_module_ref()?; + expect!(self, ';'); + Ok(self.ast(TsImportEqualsDecl { + span: span!(self, start), + id, + is_export, + is_type_only, + module_ref, + })) + } + + /// `tsIsExternalModuleReference` + fn is_ts_external_module_ref(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + Ok(is!(self, "require") && peeked_is!(self, '(')) + } + + /// `tsParseModuleReference` + fn parse_ts_module_ref(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + if self.is_ts_external_module_ref()? { + let ts_external_module_ref = self.parse_ts_external_module_ref()?; + Ok(TsModuleRef::TsExternalModuleRef( + self.ast(ts_external_module_ref), + )) + } else { + let ts_entity_name = + self.parse_ts_entity_name(/* allow_reserved_words */ false)?; + Ok(TsModuleRef::TsEntityName(self.ast(ts_entity_name))) + } + } + + /// `tsParseExternalModuleReference` + fn parse_ts_external_module_ref(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + expect!(self, "require"); + expect!(self, '('); + match *cur!(self, true) { + Token::Str { .. } => {} + _ => unexpected!(self, "a string literal"), + } + let expr = match self.parse_lit()? { + Lit::Str(s) => s.into_inner(), + _ => unreachable!(), + }; + expect!(self, ')'); + Ok(TsExternalModuleRef { + span: span!(self, start), + expr, + }) + } + + pub(crate) fn ts_look_ahead(&mut self, op: F) -> PResult + where + F: FnOnce(&mut Self) -> PResult, + { + debug_assert!(self.input.syntax().typescript()); + + let mut cloned = self.clone(); + let ctx = Context { + ignore_error: true, + ..cloned.ctx() + }; + cloned.set_ctx(ctx); + op(&mut cloned) + } + + /// `tsIsUnambiguouslyStartOfFunctionType` + fn is_ts_unambiguously_start_of_fn_type(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + assert_and_bump!(self, '('); + if is_one_of!(self, ')', "...") { + // ( ) + // ( ... + return Ok(true); + } + if self.skip_ts_parameter_start()? { + if is_one_of!(self, ':', ',', '?', '=') { + // ( xxx : + // ( xxx , + // ( xxx ? + // ( xxx = + return Ok(true); + } + if eat!(self, ')') && is!(self, "=>") { + // ( xxx ) => + return Ok(true); + } + } + Ok(false) + } + + /// `tsSkipParameterStart` + fn skip_ts_parameter_start(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + let _ = self.eat_any_ts_modifier()?; + + if is_one_of!(self, IdentName, "this") { + bump!(self); + return Ok(true); + } + + if (is!(self, '{') || is!(self, '[')) && self.parse_binding_pat_or_ident(false).is_ok() { + return Ok(true); + } + + Ok(false) + } + + /// `tsParseTypeMemberSemicolon` + fn parse_ts_type_member_semicolon(&mut self) -> PResult<()> { + debug_assert!(self.input.syntax().typescript()); + + if !eat!(self, ',') { + expect!(self, ';'); + } + + Ok(()) + } + + /// `tsParseSignatureMember` + fn parse_ts_signature_member( + &mut self, + kind: SignatureParsingMode, + ) -> PResult, TsConstructSignatureDecl<'a>>> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + + if kind == SignatureParsingMode::TSConstructSignatureDeclaration { + expect!(self, "new"); + } + + // ----- inlined self.tsFillSignature(tt.colon, node); + let type_params = self.try_parse_ts_type_params(false, true)?; + expect!(self, '('); + let params = self.parse_ts_binding_list_for_signature()?; + let type_ann = if is!(self, ':') { + Some(self.parse_ts_type_or_type_predicate_ann(&tok!(':'))?) + } else { + None + }; + // ----- + + self.parse_ts_type_member_semicolon()?; + + match kind { + SignatureParsingMode::TSCallSignatureDeclaration => { + Ok(Either::Left(TsCallSignatureDecl { + span: span!(self, start), + params, + type_ann, + type_params, + })) + } + SignatureParsingMode::TSConstructSignatureDeclaration => { + Ok(Either::Right(TsConstructSignatureDecl { + span: span!(self, start), + params, + type_ann, + type_params, + })) + } + } + } + + /// `tsIsUnambiguouslyIndexSignature` + fn is_ts_unambiguously_index_signature(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + // Note: babel's comment is wrong + assert_and_bump!(self, '['); // Skip '[' + + // ',' is for error recovery + Ok(eat!(self, IdentRef) && is_one_of!(self, ':', ',')) + } + + /// `tsTryParseIndexSignature` + pub(crate) fn try_parse_ts_index_signature( + &mut self, + index_signature_start: BytePos, + readonly: bool, + is_static: bool, + ) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Default::default()); + } + + if !(is!(self, '[') && self.ts_look_ahead(|p| p.is_ts_unambiguously_index_signature())?) { + return Ok(None); + } + + expect!(self, '['); + + let ident_start = cur_pos!(self); + let mut id = self.parse_ident_name().map(BindingIdent::from)?; + let type_ann_start = cur_pos!(self); + + if eat!(self, ',') { + self.emit_err(id.span, SyntaxError::TS1096); + } else { + expect!(self, ':'); + } + + let type_ann = self.parse_ts_type_ann(/* eat_colon */ false, type_ann_start)?; + id.span = span!(self, ident_start); + id.type_ann = Some(type_ann); + + expect!(self, ']'); + let mut params = Vec::new_in(self.alloc); + params.push(TsFnParam::Ident(self.ast(id))); + + let ty = self.try_parse_ts_type_ann()?; + let type_ann = ty; + + self.parse_ts_type_member_semicolon()?; + Ok(Some(TsIndexSignature { + span: span!(self, index_signature_start), + readonly, + is_static, + params, + type_ann, + })) + } + + /// `parsePropertyName` in babel. + /// + /// Returns `(computed, key)`. + fn parse_ts_property_name(&mut self) -> PResult<(bool, Expr<'a>)> { + let (computed, key) = if eat!(self, '[') { + let key = self.parse_assignment_expr()?; + expect!(self, ']'); + (true, key) + } else { + let ctx = Context { + in_property_name: true, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + // We check if it's valid for it to be a private name when we push it. + let key = match *cur!(p, true) { + Token::Num { .. } | Token::Str { .. } => p.parse_new_expr(), + _ => p.parse_maybe_private_name().map(|e| match e { + Either::Left(e) => { + p.emit_err(e.span(), SyntaxError::PrivateNameInInterface); + Expr::PrivateName(p.ast(e)) + } + Either::Right(e) => Expr::Ident(p.ast(e.into())), + }), + }; + + key.map(|key| (false, key)) + })? + }; + + Ok((computed, key)) + } + + /// `tsParsePropertyOrMethodSignature` + fn parse_ts_property_or_method_signature( + &mut self, + start: BytePos, + readonly: bool, + ) -> PResult, TsMethodSignature<'a>>> { + debug_assert!(self.input.syntax().typescript()); + + let (computed, key) = self.parse_ts_property_name()?; + + let optional = eat!(self, '?'); + + if is_one_of!(self, '(', '<') { + if readonly { + syntax_error!(self, SyntaxError::ReadOnlyMethod) + } + + let type_params = self.try_parse_ts_type_params(false, true)?; + expect!(self, '('); + let params = self.parse_ts_binding_list_for_signature()?; + let type_ann = if is!(self, ':') { + self.parse_ts_type_or_type_predicate_ann(&tok!(':')) + .map(Some)? + } else { + None + }; + // ----- + + self.parse_ts_type_member_semicolon()?; + Ok(Either::Right(TsMethodSignature { + span: span!(self, start), + computed, + key, + optional, + type_params, + params, + type_ann, + })) + } else { + let type_ann = self.try_parse_ts_type_ann()?; + + self.parse_ts_type_member_semicolon()?; + Ok(Either::Left(TsPropertySignature { + span: span!(self, start), + computed, + readonly, + key, + optional, + type_ann, + })) + } + } + + /// `tsParseTypeMember` + fn parse_ts_type_member(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + if is_one_of!(self, '(', '<') { + return self + .parse_ts_signature_member(SignatureParsingMode::TSCallSignatureDeclaration) + .map(|e| match e { + Either::Left(e) => TsTypeElement::TsCallSignatureDecl(self.ast(e)), + Either::Right(e) => TsTypeElement::TsConstructSignatureDecl(self.ast(e)), + }); + } + if is!(self, "new") && self.ts_look_ahead(|p| p.is_ts_start_of_construct_signature())? { + return self + .parse_ts_signature_member(SignatureParsingMode::TSConstructSignatureDeclaration) + .map(|e| match e { + Either::Left(e) => TsTypeElement::TsCallSignatureDecl(self.ast(e)), + Either::Right(e) => TsTypeElement::TsConstructSignatureDecl(self.ast(e)), + }); + } + // Instead of fullStart, we create a node here. + let start = cur_pos!(self); + let readonly = self.parse_ts_modifier(&["readonly"], false)?.is_some(); + + let idx = self.try_parse_ts_index_signature(start, readonly, false)?; + if let Some(idx) = idx { + return Ok(TsTypeElement::TsIndexSignature(self.ast(idx))); + } + + if let Some(v) = self.try_parse_ts(|p| { + let start = p.input.cur_pos(); + + if readonly { + syntax_error!(p, SyntaxError::GetterSetterCannotBeReadonly) + } + + let is_get = if eat!(p, "get") { + true + } else { + expect!(p, "set"); + false + }; + + let (computed, key) = p.parse_ts_property_name()?; + + if is_get { + expect!(p, '('); + expect!(p, ')'); + let type_ann = p.try_parse_ts_type_ann()?; + + p.parse_ts_type_member_semicolon()?; + + Ok(Some(TsTypeElement::TsGetterSignature(p.ast( + TsGetterSignature { + span: span!(p, start), + key, + computed, + type_ann, + }, + )))) + } else { + expect!(p, '('); + let params = p.parse_ts_binding_list_for_signature()?; + if params.is_empty() { + syntax_error!(p, SyntaxError::SetterParamRequired) + } + let param = params.into_iter().next().unwrap(); + + p.parse_ts_type_member_semicolon()?; + + Ok(Some(TsTypeElement::TsSetterSignature(p.ast( + TsSetterSignature { + span: span!(p, start), + key, + computed, + param, + }, + )))) + } + }) { + return Ok(v); + } + + self.parse_ts_property_or_method_signature(start, readonly) + .map(|e| match e { + Either::Left(e) => TsTypeElement::TsPropertySignature(self.ast(e)), + Either::Right(e) => TsTypeElement::TsMethodSignature(self.ast(e)), + }) + } + + /// `tsIsStartOfConstructSignature` + fn is_ts_start_of_construct_signature(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + bump!(self); + + Ok(is!(self, '(') || is!(self, '<')) + } + + /// `tsParseTypeLiteral` + fn parse_ts_type_lit(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + let members = self.parse_ts_object_type_members()?; + Ok(TsTypeLit { + span: span!(self, start), + members, + }) + } + + /// `tsParseObjectTypeMembers` + fn parse_ts_object_type_members(&mut self) -> PResult>> { + debug_assert!(self.input.syntax().typescript()); + + expect!(self, '{'); + let members = + self.parse_ts_list(ParsingContext::TypeMembers, |p| p.parse_ts_type_member())?; + expect!(self, '}'); + Ok(members) + } + + /// `tsIsStartOfMappedType` + fn is_ts_start_of_mapped_type(&mut self) -> PResult { + debug_assert!(self.input.syntax().typescript()); + + bump!(self); + if eat!(self, '+') || eat!(self, '-') { + return Ok(is!(self, "readonly")); + } + if is!(self, "readonly") { + bump!(self); + } + if !is!(self, '[') { + return Ok(false); + } + bump!(self); + if !is!(self, IdentRef) { + return Ok(false); + } + bump!(self); + + Ok(is!(self, "in")) + } + + /// `tsParseMappedTypeParameter` + fn parse_ts_mapped_type_param(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + let name = self.parse_ident_name()?; + let constraint = Some(self.expect_then_parse_ts_type(&tok!("in"), "in")?); + + Ok(TsTypeParam { + span: span!(self, start), + name: name.into(), + is_in: false, + is_out: false, + is_const: false, + constraint, + default: None, + }) + } + + /// `tsParseMappedType` + fn parse_ts_mapped_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + expect!(self, '{'); + let mut readonly = None; + if is_one_of!(self, '+', '-') { + readonly = Some(if is!(self, '+') { + TruePlusMinus::Plus + } else { + TruePlusMinus::Minus + }); + bump!(self); + expect!(self, "readonly") + } else if eat!(self, "readonly") { + readonly = Some(TruePlusMinus::True); + } + + expect!(self, '['); + let type_param = self.parse_ts_mapped_type_param()?; + let name_type = if eat!(self, "as") { + Some(self.parse_ts_type()?) + } else { + None + }; + expect!(self, ']'); + + let mut optional = None; + if is_one_of!(self, '+', '-') { + optional = Some(if is!(self, '+') { + TruePlusMinus::Plus + } else { + TruePlusMinus::Minus + }); + bump!(self); // +, - + expect!(self, '?'); + } else if eat!(self, '?') { + optional = Some(TruePlusMinus::True); + } + + let type_ann = self.try_parse_ts_type()?; + expect!(self, ';'); + expect!(self, '}'); + + Ok(TsMappedType { + span: span!(self, start), + readonly, + optional, + type_param, + name_type, + type_ann, + }) + } + + /// `tsParseTupleType` + fn parse_ts_tuple_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + let elems = self.parse_ts_bracketed_list( + ParsingContext::TupleElementTypes, + |p| p.parse_ts_tuple_element_type(), + /* bracket */ true, + /* skipFirstToken */ false, + )?; + + // Validate the elementTypes to ensure: + // No mandatory elements may follow optional elements + // If there's a rest element, it must be at the end of the tuple + + let mut seen_optional_element = false; + + for elem in elems.iter() { + match &elem.ty { + TsType::TsRestType(..) => {} + TsType::TsOptionalType(..) => { + seen_optional_element = true; + } + _ if seen_optional_element => { + syntax_error!( + self, + span!(self, start), + SyntaxError::TsRequiredAfterOptional + ) + } + _ => {} + } + } + + Ok(TsTupleType { + span: span!(self, start), + elem_types: elems, + }) + } + + fn try_parse_ts_tuple_element_name(&mut self) -> Option> { + if !cfg!(feature = "typescript") { + return Default::default(); + } + + self.try_parse_ts(|p| { + let start = cur_pos!(p); + + let rest = if eat!(p, "...") { + Some(p.input.prev_span()) + } else { + None + }; + + let mut ident = p.parse_ident_name().map(Ident::from)?; + if eat!(p, '?') { + ident.optional = true; + ident.span = ident.span.with_hi(p.input.prev_span().hi); + } + expect!(p, ':'); + + Ok(Some(if let Some(dot3_token) = rest { + Pat::Rest(p.ast(RestPat { + span: span!(p, start), + dot3_token, + arg: Pat::Ident(p.ast(ident.into())), + type_ann: None, + })) + } else { + Pat::Ident(p.ast(ident.into())) + })) + }) + } + + /// `tsParseTupleElementType` + fn parse_ts_tuple_element_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + // parses `...TsType[]` + let start = cur_pos!(self); + + let label = self.try_parse_ts_tuple_element_name(); + + if eat!(self, "...") { + let type_ann = self.parse_ts_type()?; + return Ok(TsTupleElement { + span: span!(self, start), + label, + ty: TsType::TsRestType(self.ast(TsRestType { + span: span!(self, start), + type_ann, + })), + }); + } + + let ty = self.parse_ts_type()?; + // parses `TsType?` + if eat!(self, '?') { + let type_ann = ty; + return Ok(TsTupleElement { + span: span!(self, start), + label, + ty: TsType::TsOptionalType(self.ast(TsOptionalType { + span: span!(self, start), + type_ann, + })), + }); + } + + Ok(TsTupleElement { + span: span!(self, start), + label, + ty, + }) + } + + /// `tsParseParenthesizedType` + fn parse_ts_parenthesized_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + trace_cur!(self, parse_ts_parenthesized_type); + + let start = cur_pos!(self); + expect!(self, '('); + let type_ann = self.parse_ts_type()?; + expect!(self, ')'); + Ok(TsParenthesizedType { + span: span!(self, start), + type_ann, + }) + } + + /// `tsParseFunctionOrConstructorType` + fn parse_ts_fn_or_constructor_type( + &mut self, + is_fn_type: bool, + ) -> PResult> { + trace_cur!(self, parse_ts_fn_or_constructor_type); + + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + let is_abstract = if !is_fn_type { + eat!(self, "abstract") + } else { + false + }; + if !is_fn_type { + expect!(self, "new"); + } + + // ----- inlined `self.tsFillSignature(tt.arrow, node)` + let type_params = self.try_parse_ts_type_params(false, true)?; + expect!(self, '('); + let params = self.parse_ts_binding_list_for_signature()?; + let type_ann = self.parse_ts_type_or_type_predicate_ann(&tok!("=>"))?; + // ----- end + + Ok(if is_fn_type { + TsFnOrConstructorType::TsFnType(self.ast(TsFnType { + span: span!(self, start), + type_params, + params, + type_ann, + })) + } else { + TsFnOrConstructorType::TsConstructorType(self.ast(TsConstructorType { + span: span!(self, start), + type_params, + params, + type_ann, + is_abstract, + })) + }) + } + + /// `tsParseLiteralTypeNode` + fn parse_ts_lit_type_node(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + + let lit = if is!(self, '`') { + let tpl = self.parse_ts_tpl_lit_type()?; + + TsLit::Tpl(self.ast(tpl)) + } else { + match self.parse_lit()? { + Lit::BigInt(n) => TsLit::BigInt(n), + Lit::Bool(n) => TsLit::Bool(n), + Lit::Num(n) => TsLit::Number(n), + Lit::Str(n) => TsLit::Str(n), + _ => unreachable!(), + } + }; + + Ok(TsLitType { + span: span!(self, start), + lit, + }) + } + + /// `tsParseTemplateLiteralType` + fn parse_ts_tpl_lit_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + + assert_and_bump!(self, '`'); + + let (types, quasis) = self.parse_ts_tpl_type_elements()?; + + expect!(self, '`'); + + Ok(TsTplLitType { + span: span!(self, start), + types, + quasis, + }) + } + + fn parse_ts_tpl_type_elements( + &mut self, + ) -> PResult<(Vec<'a, TsType<'a>>, Vec<'a, TplElement>)> { + if !cfg!(feature = "typescript") { + return Ok((Vec::new_in(self.alloc), Vec::new_in(self.alloc))); + } + + trace_cur!(self, parse_tpl_elements); + + let mut types = Vec::new_in(self.alloc); + + let cur_elem = self.parse_tpl_element(false)?; + let mut is_tail = cur_elem.tail; + let mut quasis = Vec::new_in(self.alloc); + quasis.push(cur_elem); + + while !is_tail { + expect!(self, "${"); + types.push(self.parse_ts_type()?); + expect!(self, '}'); + let elem = self.parse_tpl_element(false)?; + is_tail = elem.tail; + quasis.push(elem); + } + + Ok((types, quasis)) + } + + /// `tsParseBindingListForSignature` + /// + /// Eats ')` at the end but does not eat `(` at start. + fn parse_ts_binding_list_for_signature(&mut self) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Vec::new_in(self.alloc)); + } + + debug_assert!(self.input.syntax().typescript()); + + let params = self.parse_formal_params()?; + let mut list = Vec::new_in(self.alloc); + + for param in params { + let item = match param.pat { + Pat::Ident(pat) => TsFnParam::Ident(pat), + Pat::Array(pat) => TsFnParam::Array(pat), + Pat::Object(pat) => TsFnParam::Object(pat), + Pat::Rest(pat) => TsFnParam::Rest(pat), + _ => unexpected!( + self, + "an identifier, [ for an array pattern, { for an object patter or ... for a \ + rest pattern" + ), + }; + list.push(item); + } + expect!(self, ')'); + Ok(list) + } + + /// `tsTryParseTypeOrTypePredicateAnnotation` + /// + /// Used for parsing return types. + fn try_parse_ts_type_or_type_predicate_ann( + &mut self, + ) -> PResult>>> { + if !cfg!(feature = "typescript") { + return Ok(None); + } + + if is!(self, ':') { + self.parse_ts_type_or_type_predicate_ann(&tok!(':')) + .map(Some) + } else { + Ok(None) + } + } + + /// `tsTryParseTypeAnnotation` + #[cfg_attr(feature = "tracing-spans", tracing::instrument(skip_all))] + pub(crate) fn try_parse_ts_type_ann(&mut self) -> PResult>>> { + if !cfg!(feature = "typescript") { + return Ok(None); + } + + if is!(self, ':') { + let pos = cur_pos!(self); + return self.parse_ts_type_ann(/* eat_colon */ true, pos).map(Some); + } + + Ok(None) + } + + /// `tsTryParseType` + fn try_parse_ts_type(&mut self) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(None); + } + + self.eat_then_parse_ts_type(&tok!(':')) + } + + /// `tsTryParseTypeParameters` + pub(crate) fn try_parse_ts_type_params( + &mut self, + permit_in_out: bool, + permit_const: bool, + ) -> PResult>>> { + if !cfg!(feature = "typescript") { + return Ok(None); + } + + if is!(self, '<') { + return self + .parse_ts_type_params(permit_in_out, permit_const) + .map(Some); + } + Ok(None) + } + + /// `tsParseNonArrayType` + fn parse_ts_non_array_type(&mut self) -> PResult> { + if !cfg!(feature = "typescript") { + unreachable!() + } + trace_cur!(self, parse_ts_non_array_type); + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + + match *cur!(self, true) { + Token::Word(Word::Ident(..)) + | tok!("void") + | tok!("yield") + | tok!("null") + | tok!("await") + | tok!("break") => { + if is!(self, "asserts") && peeked_is!(self, "this") { + bump!(self); + let this_keyword = self.parse_ts_this_type_node()?; + return self + .parse_ts_this_type_predicate(start, true, this_keyword) + .map(|t| self.ast(t)) + .map(TsType::from); + } + + let kind = if is!(self, "void") { + Some(TsKeywordTypeKind::TsVoidKeyword) + } else if is!(self, "null") { + Some(TsKeywordTypeKind::TsNullKeyword) + } else if is!(self, "any") { + Some(TsKeywordTypeKind::TsAnyKeyword) + } else if is!(self, "boolean") { + Some(TsKeywordTypeKind::TsBooleanKeyword) + } else if is!(self, "bigint") { + Some(TsKeywordTypeKind::TsBigIntKeyword) + } else if is!(self, "never") { + Some(TsKeywordTypeKind::TsNeverKeyword) + } else if is!(self, "number") { + Some(TsKeywordTypeKind::TsNumberKeyword) + } else if is!(self, "object") { + Some(TsKeywordTypeKind::TsObjectKeyword) + } else if is!(self, "string") { + Some(TsKeywordTypeKind::TsStringKeyword) + } else if is!(self, "symbol") { + Some(TsKeywordTypeKind::TsSymbolKeyword) + } else if is!(self, "unknown") { + Some(TsKeywordTypeKind::TsUnknownKeyword) + } else if is!(self, "undefined") { + Some(TsKeywordTypeKind::TsUndefinedKeyword) + } else if is!(self, "intrinsic") { + Some(TsKeywordTypeKind::TsIntrinsicKeyword) + } else { + None + }; + + let peeked_is_dot = peeked_is!(self, '.'); + + match kind { + Some(kind) if !peeked_is_dot => { + bump!(self); + return Ok(TsType::TsKeywordType(self.ast(TsKeywordType { + span: span!(self, start), + kind, + }))); + } + _ => { + return self + .parse_ts_type_ref() + .map(|t| self.ast(t)) + .map(TsType::from); + } + } + } + Token::BigInt { .. } + | Token::Str { .. } + | Token::Num { .. } + | tok!("true") + | tok!("false") + | tok!('`') => { + return self + .parse_ts_lit_type_node() + .map(|t| self.ast(t)) + .map(TsType::from); + } + tok!('-') => { + let start = cur_pos!(self); + + bump!(self); + + if !matches!(*cur!(self, true), Token::Num { .. } | Token::BigInt { .. }) { + unexpected!(self, "numeric literal or bigint literal") + } + + let lit = self.parse_lit()?; + let lit = match lit { + Lit::Num(num) => { + let num = num.into_inner(); + let mut new_raw = String::from("-"); + + match num.raw { + Some(raw) => { + new_raw.push_str(&raw); + } + _ => { + write!(new_raw, "{}", num.value).unwrap(); + } + }; + + TsLit::Number(self.ast(Number { + span: num.span, + value: -num.value, + raw: Some(new_raw.into()), + })) + } + Lit::BigInt(big_int) => { + let big_int = big_int.into_inner(); + let mut new_raw = String::from("-"); + + let value = big_int.value.into_inner(); + match big_int.raw { + Some(raw) => { + new_raw.push_str(&raw); + } + _ => { + write!(new_raw, "{}", value).unwrap(); + } + }; + + TsLit::BigInt(self.ast(BigInt { + span: big_int.span, + value: self.ast(-value), + raw: Some(new_raw.into()), + })) + } + _ => unreachable!(), + }; + + return Ok(TsType::TsLitType(self.ast(TsLitType { + span: span!(self, start), + lit, + }))); + } + + tok!("import") => { + return self + .parse_ts_import_type() + .map(|t| self.ast(t)) + .map(TsType::from); + } + + tok!("this") => { + let start = cur_pos!(self); + let this_keyword = self.parse_ts_this_type_node()?; + if !self.input.had_line_break_before_cur() && is!(self, "is") { + return self + .parse_ts_this_type_predicate(start, false, this_keyword) + .map(|t| self.ast(t)) + .map(TsType::from); + } else { + return Ok(TsType::TsThisType(self.ast(this_keyword))); + } + } + tok!("typeof") => { + return self + .parse_ts_type_query() + .map(|t| self.ast(t)) + .map(TsType::from); + } + + tok!('{') => { + return if self.ts_look_ahead(|p| p.is_ts_start_of_mapped_type())? { + self.parse_ts_mapped_type() + .map(|t| self.ast(t)) + .map(TsType::from) + } else { + self.parse_ts_type_lit() + .map(|t| self.ast(t)) + .map(TsType::from) + }; + } + tok!('[') => { + return self + .parse_ts_tuple_type() + .map(|t| self.ast(t)) + .map(TsType::from); + } + tok!('(') => { + return self + .parse_ts_parenthesized_type() + .map(|t| self.ast(t)) + .map(TsType::from); + } + _ => {} + } + // switch (self.state.type) { + // } + + unexpected!( + self, + "an identifier, void, yield, null, await, break, a string literal, a numeric literal, \ + true, false, `, -, import, this, typeof, {, [, (" + ) + } + + /// `tsParseArrayTypeOrHigher` + fn parse_ts_array_type_or_higher(&mut self, readonly: bool) -> PResult> { + trace_cur!(self, parse_ts_array_type_or_higher); + debug_assert!(self.input.syntax().typescript()); + + let mut ty = self.parse_ts_non_array_type()?; + + while !self.input.had_line_break_before_cur() && eat!(self, '[') { + if eat!(self, ']') { + ty = TsType::TsArrayType(self.ast(TsArrayType { + span: span!(self, ty.span_lo()), + elem_type: ty, + })); + } else { + let index_type = self.parse_ts_type()?; + expect!(self, ']'); + ty = TsType::TsIndexedAccessType(self.ast(TsIndexedAccessType { + span: span!(self, ty.span_lo()), + readonly, + obj_type: ty, + index_type, + })); + } + } + + Ok(ty) + } + + /// `tsParseTypeOperator` + fn parse_ts_type_operator(&mut self, op: TsTypeOperatorOp) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + match op { + TsTypeOperatorOp::Unique => expect!(self, "unique"), + TsTypeOperatorOp::KeyOf => expect!(self, "keyof"), + TsTypeOperatorOp::ReadOnly => expect!(self, "readonly"), + } + + let type_ann = self.parse_ts_type_operator_or_higher()?; + Ok(TsTypeOperator { + span: span!(self, start), + op, + type_ann, + }) + } + + /// `tsParseInferType` + fn parse_ts_infer_type(&mut self) -> PResult> { + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + expect!(self, "infer"); + let type_param_name = self.parse_ident_name()?; + let constraint = self.try_parse_ts(|p| { + expect!(p, "extends"); + let constraint = p.parse_ts_non_conditional_type(); + if p.ctx().disallow_conditional_types || !is!(p, '?') { + constraint.map(Some) + } else { + Ok(None) + } + }); + let type_param = TsTypeParam { + span: type_param_name.span(), + name: type_param_name.into(), + is_in: false, + is_out: false, + is_const: false, + constraint, + default: None, + }; + Ok(TsInferType { + span: span!(self, start), + type_param, + }) + } + + /// `tsParseTypeOperatorOrHigher` + fn parse_ts_type_operator_or_higher(&mut self) -> PResult> { + trace_cur!(self, parse_ts_type_operator_or_higher); + debug_assert!(self.input.syntax().typescript()); + + let operator = if is!(self, "keyof") { + Some(TsTypeOperatorOp::KeyOf) + } else if is!(self, "unique") { + Some(TsTypeOperatorOp::Unique) + } else if is!(self, "readonly") { + Some(TsTypeOperatorOp::ReadOnly) + } else { + None + }; + + match operator { + Some(operator) => self + .parse_ts_type_operator(operator) + .map(|t| self.ast(t)) + .map(TsType::from), + None => { + trace_cur!(self, parse_ts_type_operator_or_higher__not_operator); + + if is!(self, "infer") { + self.parse_ts_infer_type() + .map(|t| self.ast(t)) + .map(TsType::from) + } else { + let readonly = self.parse_ts_modifier(&["readonly"], false)?.is_some(); + self.parse_ts_array_type_or_higher(readonly) + } + } + } + } + + /// `tsParseExpressionStatement` + pub(crate) fn parse_ts_expr_stmt( + &mut self, + decorators: Vec<'a, Decorator<'a>>, + expr: Ident, + ) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Default::default()); + } + + let start = expr.span_lo(); + + match &*expr.sym { + "declare" => { + let decl = self.try_parse_ts_declare(start, decorators)?; + if let Some(decl) = decl { + Ok(Some(make_decl_declare(decl))) + } else { + Ok(None) + } + } + "global" => { + // `global { }` (with no `declare`) may appear inside an ambient module + // declaration. + // Would like to use tsParseAmbientExternalModuleDeclaration here, but already + // ran past "global". + if is!(self, '{') { + let global = true; + let id = TsModuleName::Ident(self.ast(expr)); + let body = self + .parse_ts_module_block() + .map(|t| self.ast(t)) + .map(TsNamespaceBody::from) + .map(Some)?; + Ok(Some(Decl::TsModule(self.ast(TsModuleDecl { + span: span!(self, start), + global, + declare: false, + id, + body, + })))) + } else { + Ok(None) + } + } + _ => self.parse_ts_decl(start, decorators, expr.sym, /* next */ false), + } + } + + /// `tsTryParseDeclare` + pub(crate) fn try_parse_ts_declare( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + ) -> PResult>> { + if !self.syntax().typescript() { + return Ok(None); + } + + if self.ctx().in_declare + && matches!( + self.syntax(), + Syntax::Typescript(TsSyntax { dts: false, .. }) + ) + { + let span_of_declare = span!(self, start); + self.emit_err(span_of_declare, SyntaxError::TS1038); + } + + let declare_start = start; + let ctx = Context { + in_declare: true, + ..self.ctx() + }; + + self.with_ctx(ctx).parse_with(|p| { + if is!(p, "function") { + return p + .parse_fn_decl(decorators) + .map(|decl| match decl { + Decl::Fn(f) => { + let f = f.into_inner(); + Decl::Fn(p.ast(FnDecl { + ident: f.ident, + declare: true, + function: p.ast(Function { + span: Span { + lo: declare_start, + hi: f.function.span.hi, + }, + ..f.function.into_inner() + }), + })) + } + _ => decl, + }) + .map(Some); + } + + if is!(p, "class") { + return p + .parse_class_decl(start, start, decorators, false) + .map(|decl| match decl { + Decl::Class(c) => { + let c = c.into_inner(); + Decl::Class(p.ast(ClassDecl { + declare: true, + class: p.ast(Class { + span: Span { + lo: declare_start, + ..c.class.span + }, + ..c.class.into_inner() + }), + ..c + })) + } + _ => decl, + }) + .map(Some); + } + + if is!(p, "const") && peeked_is!(p, "enum") { + assert_and_bump!(p, "const"); + let _ = cur!(p, true); + assert_and_bump!(p, "enum"); + + return p + .parse_ts_enum_decl(start, /* is_const */ true) + .map(|decl| TsEnumDecl { + declare: true, + span: Span { + lo: declare_start, + ..decl.span + }, + ..decl.into_inner() + }) + .map(|t| p.ast(t)) + .map(From::from) + .map(Some); + } + if is_one_of!(p, "const", "var", "let") { + return p + .parse_var_stmt(false) + .map(|decl| VarDecl { + declare: true, + span: Span { + lo: declare_start, + ..decl.span + }, + ..decl.into_inner() + }) + .map(|t| p.ast(t)) + .map(From::from) + .map(Some); + } + + if is!(p, "global") { + return p + .parse_ts_ambient_external_module_decl(start) + .map(Decl::from) + .map(make_decl_declare) + .map(Some); + } else if is!(p, IdentName) { + let value = match *cur!(p, true) { + Token::Word(ref w) => w.clone().into(), + _ => unreachable!(), + }; + return p + .parse_ts_decl(start, decorators, value, /* next */ true) + .map(|v| v.map(make_decl_declare)); + } + + Ok(None) + }) + } + + /// `tsTryParseExportDeclaration` + /// + /// Note: this won't be called unless the keyword is allowed in + /// `shouldParseExportDeclaration`. + pub(crate) fn try_parse_ts_export_decl( + &mut self, + decorators: Vec<'a, Decorator<'a>>, + value: JsWord, + ) -> Option> { + if !cfg!(feature = "typescript") { + return None; + } + + self.try_parse_ts(|p| { + let start = cur_pos!(p); + let opt = p.parse_ts_decl(start, decorators, value, true)?; + Ok(opt) + }) + } + + /// Common to tsTryParseDeclare, tsTryParseExportDeclaration, and + /// tsParseExpressionStatement. + /// + /// `tsParseDeclaration` + fn parse_ts_decl( + &mut self, + start: BytePos, + decorators: Vec<'a, Decorator<'a>>, + value: JsWord, + next: bool, + ) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Default::default()); + } + + match &*value { + "abstract" => { + if next || (is!(self, "class") && !self.input.had_line_break_before_cur()) { + if next { + bump!(self); + } + return Ok(Some(self.parse_class_decl(start, start, decorators, true)?)); + } + } + + "enum" => { + if next || is!(self, IdentRef) { + if next { + bump!(self); + } + return self + .parse_ts_enum_decl(start, /* is_const */ false) + .map(From::from) + .map(Some); + } + } + + "interface" => { + if next || (is!(self, IdentRef)) { + if next { + bump!(self); + } + + return self + .parse_ts_interface_decl(start) + .map(From::from) + .map(Some); + } + } + + "module" if !self.input.had_line_break_before_cur() => { + if next { + bump!(self); + } + + if matches!(*cur!(self, true), Token::Str { .. }) { + return self + .parse_ts_ambient_external_module_decl(start) + .map(From::from) + .map(Some); + } else if next || is!(self, IdentRef) { + return self + .parse_ts_module_or_ns_decl(start) + .map(From::from) + .map(Some); + } + } + + "namespace" => { + if next || is!(self, IdentRef) { + if next { + bump!(self); + } + return self + .parse_ts_module_or_ns_decl(start) + .map(From::from) + .map(Some); + } + } + + "type" => { + if next || (!self.input.had_line_break_before_cur() && is!(self, IdentRef)) { + if next { + bump!(self); + } + return self + .parse_ts_type_alias_decl(start) + .map(From::from) + .map(Some); + } + } + + _ => {} + } + + Ok(None) + } + + /// `tsTryParseGenericAsyncArrowFunction` + pub(crate) fn try_parse_ts_generic_async_arrow_fn( + &mut self, + start: BytePos, + ) -> PResult>> { + if !cfg!(feature = "typescript") { + return Ok(Default::default()); + } + + let res = if is_one_of!(self, '<', JSXTagStart) { + self.try_parse_ts(|p| { + let type_params = p.parse_ts_type_params(false, false)?; + // Don't use overloaded parseFunctionParams which would look for "<" again. + expect!(p, '('); + let params: Vec = Vec::from_iter_in( + p.parse_formal_params()?.into_iter().map(|p| p.pat), + self.alloc, + ); + expect!(p, ')'); + let return_type = p.try_parse_ts_type_or_type_predicate_ann()?; + expect!(p, "=>"); + + Ok(Some((type_params, params, return_type))) + }) + } else { + None + }; + + let (type_params, params, return_type) = match res { + Some(v) => v, + None => return Ok(None), + }; + + let ctx = Context { + in_async: true, + in_generator: false, + ..self.ctx() + }; + self.with_ctx(ctx).parse_with(|p| { + let is_generator = false; + let is_async = true; + let body = p.parse_fn_body(true, false, true, params.is_simple_parameter_list())?; + Ok(Some(ArrowExpr { + span: span!(p, start), + body, + is_async, + is_generator, + type_params: Some(type_params), + params, + return_type, + ctxt: Default::default(), + })) + }) + } + + /// `tsParseTypeArguments` + pub fn parse_ts_type_args(&mut self) -> PResult>> { + trace_cur!(self, parse_ts_type_args); + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); + let params = self.in_type().parse_with(|p| { + // Temporarily remove a JSX parsing context, which makes us scan different + // tokens. + p.ts_in_no_context(|p| { + if is!(p, "<<") { + p.input.cut_lshift(); + } else { + expect!(p, '<'); + } + p.parse_ts_delimited_list(ParsingContext::TypeParametersOrArguments, |p| { + trace_cur!(p, parse_ts_type_args__arg); + + p.parse_ts_type() + }) + }) + })?; + // This reads the next token after the `>` too, so do this in the enclosing + // context. But be sure not to parse a regex in the jsx expression + // ` />`, so set exprAllowed = false + self.input.set_expr_allowed(false); + expect!(self, '>'); + Ok(self.ast(TsTypeParamInstantiation { + span: span!(self, start), + params, + })) + } + + /// `tsParseIntersectionTypeOrHigher` + fn parse_ts_intersection_type_or_higher(&mut self) -> PResult> { + trace_cur!(self, parse_ts_intersection_type_or_higher); + + debug_assert!(self.input.syntax().typescript()); + + self.parse_ts_union_or_intersection_type( + UnionOrIntersection::Intersection, + |p| p.parse_ts_type_operator_or_higher(), + &tok!('&'), + ) + } + + /// `tsParseUnionTypeOrHigher` + fn parse_ts_union_type_or_higher(&mut self) -> PResult> { + trace_cur!(self, parse_ts_union_type_or_higher); + debug_assert!(self.input.syntax().typescript()); + + self.parse_ts_union_or_intersection_type( + UnionOrIntersection::Union, + |p| p.parse_ts_intersection_type_or_higher(), + &tok!('|'), + ) + } + + /// `tsParseUnionOrIntersectionType` + fn parse_ts_union_or_intersection_type( + &mut self, + kind: UnionOrIntersection, + mut parse_constituent_type: F, + operator: &'static Token, + ) -> PResult> + where + F: FnMut(&mut Self) -> PResult>, + { + trace_cur!(self, parse_ts_union_or_intersection_type); + + debug_assert!(self.input.syntax().typescript()); + + let start = cur_pos!(self); // include the leading operator in the start + self.input.eat(operator); + trace_cur!(self, parse_ts_union_or_intersection_type__first_type); + + let ty = parse_constituent_type(self)?; + trace_cur!(self, parse_ts_union_or_intersection_type__after_first); + + if self.input.is(operator) { + let mut types = Vec::new_in(self.alloc); + types.push(ty); + + while self.input.eat(operator) { + trace_cur!(self, parse_ts_union_or_intersection_type__constituent); + + types.push(parse_constituent_type(self)?); + } + + return Ok(TsType::TsUnionOrIntersectionType(self.ast(match kind { + UnionOrIntersection::Union => { + TsUnionOrIntersectionType::TsUnionType(self.ast(TsUnionType { + span: span!(self, start), + types, + })) + } + UnionOrIntersection::Intersection => { + TsUnionOrIntersectionType::TsIntersectionType(self.ast(TsIntersectionType { + span: span!(self, start), + types, + })) + } + }))); + } + + Ok(ty) + } +} + +impl Parser<'_, I> { + /// In no lexer context + fn ts_in_no_context(&mut self, op: F) -> PResult + where + F: FnOnce(&mut Self) -> PResult, + { + debug_assert!(self.input.syntax().typescript()); + + trace_cur!(self, ts_in_no_context__before); + + let cloned = self.input.token_context().clone(); + + self.input + .set_token_context(TokenContexts(smallvec::smallvec![cloned.0[0]])); + let res = op(self); + self.input.set_token_context(cloned); + + trace_cur!(self, ts_in_no_context__after); + + res + } +} + +#[derive(Clone, Copy, PartialEq, Eq)] +enum UnionOrIntersection { + Union, + Intersection, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum ParsingContext { + EnumMembers, + HeritageClauseElement, + TupleElementTypes, + TypeMembers, + TypeParametersOrArguments, +} + +#[derive(Clone, Copy, PartialEq, Eq)] +enum SignatureParsingMode { + TSCallSignatureDeclaration, + TSConstructSignatureDeclaration, +} + +/// Mark as declare +fn make_decl_declare(mut decl: Decl) -> Decl { + match decl { + Decl::Class(ref mut c) => c.declare = true, + Decl::Fn(ref mut f) => f.declare = true, + Decl::Var(ref mut v) => v.declare = true, + Decl::TsInterface(ref mut i) => i.declare = true, + Decl::TsTypeAlias(ref mut a) => a.declare = true, + Decl::TsEnum(ref mut e) => e.declare = true, + Decl::TsModule(ref mut m) => m.declare = true, + Decl::Using(..) => unreachable!("Using is not a valid declaration for `declare` keyword"), + } + + decl +} + +#[cfg(test)] +mod tests { + use swc_allocator::arena::Allocator; + use swc_common::{SyntaxContext, DUMMY_SP}; + use swc_ecma_ast::{op, EsVersion}; + use swc_ecma_visit::assert_eq_ignore_span_arena; + + use super::*; + use crate::{arena::parser::test_parser, lexer::Lexer, token::BinOpToken, Capturing}; + + #[test] + fn issue_708_1() { + let alloc = Allocator::default(); + let actual = test_parser( + &alloc, + "type test = -1;", + Syntax::Typescript(Default::default()), + |p| p.parse_module(), + ); + + let mut body = Vec::new_in(&alloc); + body.push(ModuleItem::Stmt(Stmt::Decl(Box::new_in( + Decl::TsTypeAlias(Box::new_in( + TsTypeAliasDecl { + span: DUMMY_SP, + declare: false, + id: Ident::new_no_ctxt("test".into(), DUMMY_SP), + type_params: None, + type_ann: TsType::TsLitType(Box::new_in( + TsLitType { + span: DUMMY_SP, + lit: TsLit::Number(Box::new_in( + Number { + span: DUMMY_SP, + value: -1.0, + raw: Some("-1".into()), + }, + &alloc, + )), + }, + &alloc, + )), + }, + &alloc, + )), + &alloc, + )))); + let expected = Module { + span: DUMMY_SP, + shebang: None, + body, + }; + + assert_eq_ignore_span_arena!(actual, expected); + } + + #[test] + fn issue_708_2() { + let alloc = Allocator::default(); + let actual = test_parser( + &alloc, + "const t = -1;", + Syntax::Typescript(Default::default()), + |p| p.parse_module(), + ); + + let mut decls = Vec::new_in(&alloc); + decls.push(VarDeclarator { + span: DUMMY_SP, + name: Pat::Ident(Box::new_in( + Ident::new_no_ctxt("t".into(), DUMMY_SP).into(), + &alloc, + )), + init: Some(Expr::Unary(Box::new_in( + UnaryExpr { + span: DUMMY_SP, + op: op!(unary, "-"), + arg: Expr::Lit(Box::new_in( + Lit::Num(Box::new_in( + Number { + span: DUMMY_SP, + value: 1.0, + raw: Some("1".into()), + }, + &alloc, + )), + &alloc, + )), + }, + &alloc, + ))), + definite: false, + }); + + let mut body = Vec::new_in(&alloc); + body.push(ModuleItem::Stmt(Stmt::Decl(Box::new_in( + Decl::Var(Box::new_in( + VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Const, + declare: false, + decls, + ctxt: SyntaxContext::empty(), + }, + &alloc, + )), + &alloc, + )))); + let expected = Module { + span: DUMMY_SP, + shebang: None, + body, + }; + + assert_eq_ignore_span_arena!(actual, expected); + } + + #[test] + fn issue_726() { + crate::with_test_sess( + "type Test = ( + string | number);", + |handler, input| { + let lexer = Lexer::new( + Syntax::Typescript(Default::default()), + EsVersion::Es2019, + input, + None, + ); + let lexer = Capturing::new(lexer); + let allocator = Allocator::default(); + let mut parser = Parser::new_from(&allocator, lexer); + parser + .parse_typescript_module() + .map_err(|e| e.into_diagnostic(handler).emit())?; + let tokens = parser.input().take(); + let tokens = tokens + .into_iter() + .map(|t| t.token) + .collect::>(); + assert_eq!(tokens.len(), 9, "Tokens: {:#?}", tokens); + Ok(()) + }, + ) + .unwrap(); + } + + #[test] + fn issue_751() { + crate::with_test_sess("t ? -(v >>> 1) : v >>> 1", |handler, input| { + let lexer = Lexer::new( + Syntax::Typescript(Default::default()), + EsVersion::Es2019, + input, + None, + ); + let lexer = Capturing::new(lexer); + let allocator = Allocator::default(); + let mut parser = Parser::new_from(&allocator, lexer); + parser + .parse_typescript_module() + .map_err(|e| e.into_diagnostic(handler).emit())?; + let tokens = parser.input().take(); + let token = &tokens[10]; + assert_eq!( + token.token, + Token::BinOp(BinOpToken::ZeroFillRShift), + "Token: {:#?}", + token.token + ); + Ok(()) + }) + .unwrap(); + } +} diff --git a/crates/swc_ecma_parser/src/arena/parser/util.rs b/crates/swc_ecma_parser/src/arena/parser/util.rs new file mode 100644 index 000000000000..cefa09f50309 --- /dev/null +++ b/crates/swc_ecma_parser/src/arena/parser/util.rs @@ -0,0 +1,200 @@ +use std::ops::{Deref, DerefMut}; + +use swc_allocator::arena::Box; +use swc_ecma_ast::arena::{EsReserved, Expr}; + +use super::{PResult, Parser, State}; +use crate::{Context, Syntax, Tokens}; + +impl<'w, 'a: 'w, I: Tokens> Parser<'a, I> { + /// Original context is restored when returned guard is dropped. + pub(super) fn with_ctx(&'w mut self, ctx: Context) -> WithCtx<'w, 'a, I> { + let orig_ctx = self.ctx(); + self.set_ctx(ctx); + WithCtx { + orig_ctx, + inner: self, + } + } + + /// Original state is restored when returned guard is dropped. + pub(super) fn with_state(&'w mut self, state: State) -> WithState<'w, 'a, I> { + let orig_state = std::mem::replace(&mut self.state, state); + WithState { + orig_state, + inner: self, + } + } + + pub(super) fn set_ctx(&mut self, ctx: Context) { + self.input.set_ctx(ctx); + } + + pub(super) fn strict_mode(&'w mut self) -> WithCtx<'w, 'a, I> { + let ctx = Context { + strict: true, + ..self.ctx() + }; + self.with_ctx(ctx) + } + + /// Original context is restored when returned guard is dropped. + pub(super) fn in_type(&'w mut self) -> WithCtx<'w, 'a, I> { + let ctx = Context { + in_type: true, + ..self.ctx() + }; + self.with_ctx(ctx) + } + + /// Original context is restored when returned guard is dropped. + pub(super) fn include_in_expr(&'w mut self, include_in_expr: bool) -> WithCtx<'w, 'a, I> { + let ctx = Context { + include_in_expr, + ..self.ctx() + }; + self.with_ctx(ctx) + } + + /// Parse with given closure + #[inline(always)] + pub(super) fn parse_with(&mut self, f: F) -> PResult + where + F: FnOnce(&mut Self) -> PResult, + { + f(self) + } + + pub(super) fn syntax(&self) -> Syntax { + self.input.syntax() + } +} + +pub struct WithState<'w, 'a: 'w, I: Tokens> { + inner: &'w mut Parser<'a, I>, + orig_state: State, +} +impl<'w, 'a: 'w, I: Tokens> Deref for WithState<'w, 'a, I> { + type Target = Parser<'a, I>; + + fn deref(&self) -> &Parser<'a, I> { + self.inner + } +} +impl<'w, 'a: 'w, I: Tokens> DerefMut for WithState<'w, 'a, I> { + fn deref_mut(&mut self) -> &mut Parser<'a, I> { + self.inner + } +} +impl Drop for WithState<'_, '_, I> { + fn drop(&mut self) { + std::mem::swap(&mut self.inner.state, &mut self.orig_state); + } +} + +pub struct WithCtx<'w, 'a: 'w, I: Tokens> { + inner: &'w mut Parser<'a, I>, + orig_ctx: Context, +} +impl<'w, 'a: 'w, I: Tokens> Deref for WithCtx<'w, 'a, I> { + type Target = Parser<'a, I>; + + fn deref(&self) -> &Parser<'a, I> { + self.inner + } +} +impl<'w, 'a: 'w, I: Tokens> DerefMut for WithCtx<'w, 'a, I> { + fn deref_mut(&mut self) -> &mut Parser<'a, I> { + self.inner + } +} + +impl Drop for WithCtx<'_, '_, I> { + fn drop(&mut self) { + self.inner.set_ctx(self.orig_ctx); + } +} + +pub(super) trait ExprExt<'a> { + fn as_expr(&self) -> &Expr<'a>; + + /// "IsValidSimpleAssignmentTarget" from spec. + fn is_valid_simple_assignment_target(&self, strict: bool) -> bool { + match self.as_expr() { + Expr::Ident(ident) => { + if strict && ident.is_reserved_in_strict_bind() { + return false; + } + true + } + + Expr::This(..) + | Expr::Lit(..) + | Expr::Array(..) + | Expr::Object(..) + | Expr::Fn(..) + | Expr::Class(..) + | Expr::Tpl(..) + | Expr::TaggedTpl(..) => false, + Expr::Paren(paren_expr) => paren_expr.expr.is_valid_simple_assignment_target(strict), + + Expr::Member(member_expr) => match &member_expr.obj { + Expr::Member(..) => member_expr.obj.is_valid_simple_assignment_target(strict), + Expr::OptChain(..) => false, + _ => true, + }, + + Expr::SuperProp(..) => true, + + Expr::New(..) | Expr::Call(..) => false, + // TODO: Spec only mentions `new.target` + Expr::MetaProp(..) => false, + + Expr::Update(..) => false, + + Expr::Unary(..) | Expr::Await(..) => false, + + Expr::Bin(..) => false, + + Expr::Cond(..) => false, + + Expr::Yield(..) | Expr::Arrow(..) | Expr::Assign(..) => false, + + Expr::Seq(..) => false, + + Expr::OptChain(..) => false, + + // MemberExpression is valid assignment target + Expr::PrivateName(..) => false, + + // jsx + Expr::JSXMember(..) + | Expr::JSXNamespacedName(..) + | Expr::JSXEmpty(..) + | Expr::JSXElement(..) + | Expr::JSXFragment(..) => false, + + // typescript + Expr::TsNonNull(e) => e.expr.is_valid_simple_assignment_target(strict), + Expr::TsTypeAssertion(e) => e.expr.is_valid_simple_assignment_target(strict), + Expr::TsAs(e) => e.expr.is_valid_simple_assignment_target(strict), + Expr::TsInstantiation(e) => e.expr.is_valid_simple_assignment_target(strict), + Expr::TsSatisfies(e) => e.expr.is_valid_simple_assignment_target(strict), + + Expr::TsConstAssertion(..) => false, + + Expr::Invalid(..) => false, + } + } +} + +impl<'a> ExprExt<'a> for Box<'a, Expr<'a>> { + fn as_expr(&self) -> &Expr<'a> { + self + } +} +impl<'a> ExprExt<'a> for Expr<'a> { + fn as_expr(&self) -> &Expr<'a> { + self + } +} diff --git a/crates/swc_ecma_parser/src/lib.rs b/crates/swc_ecma_parser/src/lib.rs index e2ed67dbff1f..ab48c7b6d682 100644 --- a/crates/swc_ecma_parser/src/lib.rs +++ b/crates/swc_ecma_parser/src/lib.rs @@ -141,6 +141,7 @@ pub type JscTarget = EsVersion; mod macros; #[macro_use] pub mod token; +pub mod arena; pub mod error; pub mod lexer; mod parser; diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index ce65aaa9439e..57d98374ffad 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -28,6 +28,7 @@ serde = { workspace = true, features = ["derive"] } smallvec = { workspace = true } tracing = { workspace = true } +swc_allocator = { version = "2.0.0", path = "../swc_allocator" } swc_atoms = { version = "3.0.0", path = "../swc_atoms" } swc_common = { version = "5.0.0", path = "../swc_common" } swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } @@ -54,3 +55,6 @@ name = "deps" [[bench]] harness = false name = "parallel" +[[bench]] +harness = false +name = "arena_compare" diff --git a/crates/swc_ecma_transforms_base/benches/arena_compare.rs b/crates/swc_ecma_transforms_base/benches/arena_compare.rs new file mode 100644 index 000000000000..e7c88d73de0e --- /dev/null +++ b/crates/swc_ecma_transforms_base/benches/arena_compare.rs @@ -0,0 +1,51 @@ +extern crate swc_malloc; + +use criterion::{criterion_group, criterion_main, Criterion}; +use swc_allocator::arena::{Allocator, Box}; +use swc_common::FileName; +use swc_ecma_parser::{StringInput, Syntax, TsSyntax}; + +static SOURCE: &str = include_str!("../../swc_ecma_parser/benches/files/cal.com.tsx"); + +fn bench_cases(b: &mut Criterion) { + let syntax = Syntax::Typescript(TsSyntax { + tsx: true, + ..Default::default() + }); + let _ = ::testing::run_test(false, |cm, _| { + let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into()); + b.bench_function("es/hygiene/origin", |b| { + use swc_ecma_ast::Pass; + let mut parser = swc_ecma_parser::Parser::new(syntax, StringInput::from(&*fm), None); + let mut module = + swc_ecma_ast::Program::Module(parser.parse_module().map_err(|_| ()).unwrap()); + b.iter(|| { + swc_ecma_transforms_base::hygiene::hygiene().process(&mut module); + }); + }); + + b.bench_function("es/hygiene/arena", |b| { + use swc_ecma_ast::arena::Pass; + let allocator = Allocator::default(); + let mut parser = swc_ecma_parser::arena::Parser::new( + &allocator, + syntax, + StringInput::from(&*fm), + None, + ); + let mut module = swc_ecma_ast::arena::Program::Module(Box::new_in( + parser.parse_module().map_err(|_| ()).unwrap(), + &allocator, + )); + + b.iter(|| { + swc_ecma_transforms_base::arena::hygiene::hygiene(&allocator).process(&mut module); + }); + }); + + Ok(()) + }); +} + +criterion_group!(benches, bench_cases); +criterion_main!(benches); diff --git a/crates/swc_ecma_transforms_base/src/arena/fixer.rs b/crates/swc_ecma_transforms_base/src/arena/fixer.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/swc_ecma_transforms_base/src/arena/hygiene.rs b/crates/swc_ecma_transforms_base/src/arena/hygiene.rs new file mode 100644 index 000000000000..d3554c06cad6 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/hygiene.rs @@ -0,0 +1,103 @@ +use rustc_hash::FxHashSet; +use swc_allocator::arena::Allocator; +use swc_atoms::Atom; +use swc_common::Mark; +use swc_ecma_ast::arena::*; +use swc_ecma_utils::stack_size::maybe_grow_default; +use swc_ecma_visit::{ + arena::{visit_mut_pass, VisitMut, VisitMutWith}, + noop_visit_mut_type_arena, +}; + +pub use super::rename::rename; +use super::rename::{renamer, Renamer}; + +#[derive(Debug, Clone, Default)] +pub struct Config { + /// If true, the `hygiene` pass will preserve class names. + pub keep_class_names: bool, + + /// If true, the bug of safari 10 is avoided. + #[deprecated = "This field is no longer required to work around bugs in Safari 10."] + pub safari_10: bool, + + /// The marks derived from this marks will treated as `specified by user` + /// and other marks will be treated as `generated by swc`. + pub top_level_mark: Mark, + + /// Mangle even if vars are visible to `eval` or `with`. + pub ignore_eval: bool, + + /// Used for preventing mangler from renaming variables to reserved names. + pub preserved_symbols: FxHashSet, +} + +/// See [hygiene_with_config] for doc. Creates a `hygiene` pass with default +/// value of [Config]. +pub fn hygiene(alloc: &Allocator) -> impl Pass<'_> + VisitMut<'_> { + hygiene_with_config(alloc, Default::default()) +} + +/// The pass actually modifies the identifiers in the way that different +/// identifier (with respect to span hygiene) becomes different identifier. +/// (e.g. `a1` for `a#6`, `a2` for `a#23`) +/// +/// # Implementation details +/// +/// This document exists For curious people and potential contributors. +/// +/// `hygiene` consists of three phases. +/// +/// ## First phase +/// +/// At first phase, we mark (using [swc_common::Mark]) nodes which can be +/// considered as a `scope`. e.g. [Function], [BlockStmt], [ArrowExpr] +/// +/// ## Second phase +/// +/// At second phase, we analyzes the file and determine identifiers to rename. +/// +/// Note that we store scoping information for each node, using the fact that +/// [SyntaxContext] of all `scope` nodes are unique, thanks to the first phase. +/// +/// +/// ## Third phase +/// +/// At third phase, we rename all identifiers in the queue. +pub fn hygiene_with_config(alloc: &Allocator, config: Config) -> impl Pass<'_> + VisitMut<'_> { + ( + renamer(alloc, config, HygieneRenamer), + visit_mut_pass(HygieneRemover), + ) +} + +struct HygieneRenamer; + +impl Renamer for HygieneRenamer { + const MANGLE: bool = false; + const RESET_N: bool = true; + + fn new_name_for(&self, orig: &Id, n: &mut usize) -> swc_atoms::JsWord { + let res = if *n == 0 { + orig.0.clone() + } else { + format!("{}{}", orig.0, n).into() + }; + *n += 1; + res + } +} + +struct HygieneRemover; + +impl VisitMut<'_> for HygieneRemover { + noop_visit_mut_type_arena!(); + + fn visit_mut_expr(&mut self, n: &mut Expr) { + maybe_grow_default(|| n.visit_mut_children_with(self)); + } + + fn visit_mut_ident(&mut self, i: &mut Ident) { + i.ctxt = Default::default(); + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/mod.rs b/crates/swc_ecma_transforms_base/src/arena/mod.rs new file mode 100644 index 000000000000..007b12cb4330 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/mod.rs @@ -0,0 +1,4 @@ +pub mod fixer; +pub mod hygiene; +pub mod rename; +pub mod resolver; diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/mod.rs b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/mod.rs new file mode 100644 index 000000000000..45b2ab32e6c5 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/mod.rs @@ -0,0 +1,458 @@ +use swc_common::Mark; +use swc_ecma_ast::arena::*; +use swc_ecma_utils::stack_size::maybe_grow_default; +use swc_ecma_visit::{ + arena::{Visit, VisitWith}, + noop_visit_type_arena, +}; + +use self::scope::{Scope, ScopeKind}; + +mod reverse_map; +pub(super) mod scope; + +#[derive(Debug, Default)] +pub(super) struct Analyzer { + /// If `eval` exists for the current scope, we only rename synthesized + /// identifiers. + pub has_eval: bool, + /// The [Mark] which is parent of user-specified identifiers. + pub top_level_mark: Mark, + + pub is_pat_decl: bool, + pub var_belong_to_fn_scope: bool, + pub in_catch_params: bool, + pub scope: Scope, + /// If we try add variables declared by `var` to the block scope, + /// variables will be added to `hoisted_vars` and merged to latest + /// function scope in the end. + pub hoisted_vars: Vec, +} + +impl Analyzer { + fn add_decl(&mut self, id: Id, belong_to_fn_scope: bool) { + if belong_to_fn_scope { + match self.scope.kind { + ScopeKind::Fn => { + self.scope.add_decl(&id, self.has_eval, self.top_level_mark); + } + ScopeKind::Block => self.hoisted_vars.push(id), + } + } else { + self.scope.add_decl(&id, self.has_eval, self.top_level_mark); + } + } + + fn reserve_decl(&mut self, len: usize, belong_to_fn_scope: bool) { + if belong_to_fn_scope { + match self.scope.kind { + ScopeKind::Fn => { + self.scope.reserve_decl(len); + } + ScopeKind::Block => { + self.hoisted_vars.reserve(len); + } + } + } else { + self.scope.reserve_decl(len); + } + } + + fn add_usage(&mut self, id: Id) { + self.scope.add_usage(id); + } + + fn reserve_usage(&mut self, len: usize) { + self.scope.reserve_usage(len); + } + + fn with_scope(&mut self, kind: ScopeKind, op: F) + where + F: FnOnce(&mut Analyzer), + { + { + let mut v = Analyzer { + has_eval: self.has_eval, + top_level_mark: self.top_level_mark, + + is_pat_decl: self.is_pat_decl, + var_belong_to_fn_scope: false, + in_catch_params: false, + scope: Scope { + kind, + ..Default::default() + }, + hoisted_vars: Default::default(), + }; + + op(&mut v); + if !v.hoisted_vars.is_empty() { + debug_assert!(matches!(v.scope.kind, ScopeKind::Block)); + self.reserve_usage(v.hoisted_vars.len()); + v.hoisted_vars.clone().into_iter().for_each(|id| { + // For variables declared in block scope using `var` and `function`, + // We should create a fake usage in the block to prevent conflicted + // renaming. + v.add_usage(id); + }); + match self.scope.kind { + ScopeKind::Fn => { + self.reserve_decl(v.hoisted_vars.len(), true); + v.hoisted_vars + .into_iter() + .for_each(|id| self.add_decl(id, true)); + } + ScopeKind::Block => { + self.hoisted_vars.extend(v.hoisted_vars); + } + } + } + self.scope.children.push(v.scope); + } + } + + fn with_fn_scope(&mut self, op: F) + where + F: FnOnce(&mut Analyzer), + { + self.with_scope(ScopeKind::Fn, op) + } + + fn visit_fn_body_within_same_scope(&mut self, body: &Option) { + if let Some(body) = &body { + body.visit_children_with(self); + } + } + + fn visit_for_body_within_same_scope(&mut self, body: &Stmt) { + match body { + Stmt::Block(s) => s.visit_children_with(self), + _ => body.visit_with(self), + } + } +} + +impl Visit<'_> for Analyzer { + noop_visit_type_arena!(); + + fn visit_arrow_expr(&mut self, e: &ArrowExpr) { + self.with_fn_scope(|v| { + let old = v.is_pat_decl; + v.is_pat_decl = true; + e.params.visit_with(v); + v.is_pat_decl = false; + e.body.visit_with(v); + v.is_pat_decl = old; + }); + } + + fn visit_assign_target(&mut self, n: &AssignTarget) { + let old = self.is_pat_decl; + + self.is_pat_decl = false; + n.visit_children_with(self); + + self.is_pat_decl = old; + } + + fn visit_binding_ident(&mut self, i: &BindingIdent) { + if self.is_pat_decl { + self.add_decl(i.to_id(), self.var_belong_to_fn_scope) + } else { + self.add_usage(i.to_id()) + } + } + + fn visit_block_stmt(&mut self, n: &BlockStmt) { + self.with_scope(ScopeKind::Block, |v| n.visit_children_with(v)) + } + + fn visit_block_stmt_or_expr(&mut self, n: &BlockStmtOrExpr) { + match n { + // This avoid crating extra block scope for arrow function + BlockStmtOrExpr::BlockStmt(n) => n.visit_children_with(self), + BlockStmtOrExpr::Expr(n) => n.visit_with(self), + } + } + + fn visit_catch_clause(&mut self, n: &CatchClause) { + self.with_scope(ScopeKind::Block, |v| { + let old = v.is_pat_decl; + let old_in_catch_params = v.in_catch_params; + + v.is_pat_decl = false; + n.body.visit_children_with(v); + + v.is_pat_decl = true; + v.in_catch_params = true; + n.param.visit_with(v); + + v.is_pat_decl = old; + v.in_catch_params = old_in_catch_params; + }) + } + + fn visit_class_decl(&mut self, c: &ClassDecl) { + self.add_decl(c.ident.to_id(), false); + + c.class.visit_with(self); + } + + fn visit_class_expr(&mut self, c: &ClassExpr) { + self.with_fn_scope(|v| { + if let Some(id) = &c.ident { + v.add_decl(id.to_id(), false); + } + + c.class.visit_with(v); + }) + } + + fn visit_class_method(&mut self, f: &ClassMethod) { + f.key.visit_with(self); + + self.with_fn_scope(|v| { + f.function.decorators.visit_with(v); + f.function.params.visit_with(v); + v.visit_fn_body_within_same_scope(&f.function.body); + }) + } + + fn visit_constructor(&mut self, f: &Constructor) { + self.with_fn_scope(|v| { + f.key.visit_with(v); + f.params.visit_with(v); + v.visit_fn_body_within_same_scope(&f.body); + }) + } + + fn visit_default_decl(&mut self, d: &DefaultDecl) { + match d { + DefaultDecl::Class(c) => { + if let Some(id) = &c.ident { + self.add_decl(id.to_id(), false); + } + + self.with_fn_scope(|v| { + c.class.visit_with(v); + }) + } + DefaultDecl::Fn(f) => { + if let Some(id) = &f.ident { + self.add_decl(id.to_id(), true); + } + + f.visit_with(self); + } + DefaultDecl::TsInterfaceDecl(_) => {} + } + } + + fn visit_export_named_specifier(&mut self, n: &ExportNamedSpecifier) { + match &n.orig { + ModuleExportName::Ident(orig) => { + self.add_usage(orig.to_id()); + } + ModuleExportName::Str(..) => {} + }; + } + + fn visit_expr(&mut self, e: &Expr) { + let old_is_pat_decl = self.is_pat_decl; + + self.is_pat_decl = false; + maybe_grow_default(|| e.visit_children_with(self)); + + if let Expr::Ident(i) = e { + self.add_usage(i.to_id()); + } + + self.is_pat_decl = old_is_pat_decl; + } + + fn visit_fn_decl(&mut self, f: &FnDecl) { + self.add_decl(f.ident.to_id(), true); + + // https://github.com/swc-project/swc/issues/6819 + // + // We need to check for assign pattern because safari has a bug. + // https://github.com/swc-project/swc/issues/9015 + let has_rest = f + .function + .params + .iter() + .any(|p| p.pat.is_rest() || p.pat.is_assign()); + if has_rest { + self.add_usage(f.ident.to_id()); + } + + self.with_fn_scope(|v| { + if has_rest { + v.add_usage(f.ident.to_id()); + } + + f.function.decorators.visit_with(v); + f.function.params.visit_with(v); + // WARN: Option::visit_mut_children_wth + // is not same with BlockStmt::visit_mut_children_wth + v.visit_fn_body_within_same_scope(&f.function.body); + }) + } + + fn visit_fn_expr(&mut self, f: &FnExpr) { + if let Some(id) = &f.ident { + self.with_fn_scope(|v| { + v.add_decl(id.to_id(), true); + v.with_fn_scope(|v| { + // https://github.com/swc-project/swc/issues/6819 + // + // We need to check for assign pattern because safari has a bug. + // https://github.com/swc-project/swc/issues/9015 + if f.function + .params + .iter() + .any(|p| p.pat.is_rest() || p.pat.is_assign()) + { + v.add_usage(id.to_id()); + } + + f.function.decorators.visit_with(v); + f.function.params.visit_with(v); + v.visit_fn_body_within_same_scope(&f.function.body); + }); + }) + } else { + f.function.visit_with(self) + } + } + + fn visit_for_in_stmt(&mut self, n: &ForInStmt) { + self.with_scope(ScopeKind::Block, |v| { + n.left.visit_with(v); + n.right.visit_with(v); + + v.with_scope(ScopeKind::Block, |v| { + v.visit_for_body_within_same_scope(&n.body); + }) + }); + } + + fn visit_for_of_stmt(&mut self, n: &ForOfStmt) { + self.with_scope(ScopeKind::Block, |v| { + n.left.visit_with(v); + n.right.visit_with(v); + + v.with_scope(ScopeKind::Block, |v| { + v.visit_for_body_within_same_scope(&n.body); + }) + }); + } + + fn visit_for_stmt(&mut self, n: &ForStmt) { + self.with_scope(ScopeKind::Block, |v| { + n.init.visit_with(v); + n.test.visit_with(v); + n.update.visit_with(v); + + v.with_scope(ScopeKind::Block, |v| { + v.visit_for_body_within_same_scope(&n.body); + }) + }); + } + + // ensure param and function body always in same scope + fn visit_function(&mut self, f: &Function) { + self.with_fn_scope(|v| { + f.decorators.visit_with(v); + f.params.visit_with(v); + v.visit_fn_body_within_same_scope(&f.body); + }) + } + + fn visit_import_default_specifier(&mut self, n: &ImportDefaultSpecifier) { + self.add_decl(n.local.to_id(), true); + } + + fn visit_import_named_specifier(&mut self, n: &ImportNamedSpecifier) { + self.add_decl(n.local.to_id(), true); + } + + fn visit_import_star_as_specifier(&mut self, n: &ImportStarAsSpecifier) { + self.add_decl(n.local.to_id(), true); + } + + fn visit_member_expr(&mut self, e: &MemberExpr) { + e.obj.visit_with(self); + + if let MemberProp::Computed(c) = &e.prop { + c.visit_with(self); + } + } + + fn visit_method_prop(&mut self, f: &MethodProp) { + f.key.visit_with(self); + + f.function.visit_with(self) + } + + fn visit_named_export(&mut self, n: &NamedExport) { + if n.src.is_some() { + return; + } + + n.visit_children_with(self); + } + + fn visit_param(&mut self, e: &Param) { + let old = self.is_pat_decl; + let old_need_hoisted = self.var_belong_to_fn_scope; + + // Params belong to function scope. + // Params in catch clause belong to block scope + self.var_belong_to_fn_scope = !self.in_catch_params; + self.is_pat_decl = false; + e.decorators.visit_with(self); + + self.is_pat_decl = true; + e.pat.visit_with(self); + + self.is_pat_decl = old; + self.var_belong_to_fn_scope = old_need_hoisted + } + + fn visit_prop(&mut self, p: &Prop) { + p.visit_children_with(self); + + if let Prop::Shorthand(i) = p { + self.add_usage(i.to_id()) + } + } + + fn visit_static_block(&mut self, n: &StaticBlock) { + self.with_fn_scope(|v| n.body.visit_children_with(v)) + } + + fn visit_super_prop_expr(&mut self, e: &SuperPropExpr) { + if let SuperProp::Computed(c) = &e.prop { + c.visit_with(self); + } + } + + fn visit_var_decl(&mut self, n: &VarDecl) { + let old_need_hoisted = self.var_belong_to_fn_scope; + self.var_belong_to_fn_scope = n.kind == VarDeclKind::Var; + n.visit_children_with(self); + self.var_belong_to_fn_scope = old_need_hoisted; + } + + fn visit_var_declarator(&mut self, v: &VarDeclarator) { + let old = self.is_pat_decl; + self.is_pat_decl = true; + v.name.visit_with(self); + + self.is_pat_decl = false; + v.init.visit_with(self); + + self.is_pat_decl = old; + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/reverse_map.rs b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/reverse_map.rs new file mode 100644 index 000000000000..c76254338a62 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/reverse_map.rs @@ -0,0 +1,47 @@ +use rustc_hash::FxHashMap; +use swc_atoms::Atom; +use swc_ecma_ast::Id; + +#[derive(Debug, Default)] +pub(crate) struct ReverseMap<'a> { + prev: Option<&'a ReverseMap<'a>>, + + inner: FxHashMap>, +} + +impl ReverseMap<'_> { + pub fn push_entry(&mut self, key: Atom, id: Id) { + self.inner.entry(key).or_default().push(id); + } + + fn iter(&self) -> Iter { + Iter { cur: Some(self) } + } + + pub fn get<'a>(&'a self, key: &'a Atom) -> impl Iterator + 'a { + self.iter() + .filter_map(|v| v.inner.get(key)) + .flat_map(|v| v.iter()) + } + + pub fn next(&self) -> ReverseMap { + ReverseMap { + prev: Some(self), + ..Default::default() + } + } +} + +pub(crate) struct Iter<'a> { + cur: Option<&'a ReverseMap<'a>>, +} + +impl<'a> Iterator for Iter<'a> { + type Item = &'a ReverseMap<'a>; + + fn next(&mut self) -> Option { + let cur = self.cur.take()?; + self.cur = cur.prev; + Some(cur) + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/scope.rs b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/scope.rs new file mode 100644 index 000000000000..1a336822b676 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/analyzer/scope.rs @@ -0,0 +1,321 @@ +#![allow(clippy::too_many_arguments)] + +use std::{ + fmt::{Display, Formatter}, + mem::{transmute_copy, ManuallyDrop}, +}; + +#[cfg(feature = "concurrent-renamer")] +use rayon::prelude::*; +use rustc_hash::FxHashSet; +use swc_atoms::{atom, Atom}; +use swc_common::{collections::AHashMap, util::take::Take, Mark, SyntaxContext}; +use swc_ecma_ast::arena::*; +use tracing::debug; + +use super::reverse_map::ReverseMap; +use crate::arena::rename::{RenameMap, Renamer}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) enum ScopeKind { + Fn, + Block, +} + +impl Default for ScopeKind { + fn default() -> Self { + Self::Fn + } +} + +#[derive(Debug, Default)] +pub(crate) struct Scope { + pub(super) kind: ScopeKind, + pub(super) data: ScopeData, + + pub(super) children: Vec, +} + +#[derive(Debug, Default)] +pub(super) struct ScopeData { + /// All identifiers used by this scope or children. + /// + /// This is add-only. + /// + /// If the add-only contraint is violated, it is very likely to be a bug, + /// because we merge every items in children to current scope. + all: FxHashSet, + + queue: Vec, +} + +impl Scope { + pub(super) fn add_decl(&mut self, id: &Id, has_eval: bool, top_level_mark: Mark) { + if id.0 == atom!("arguments") { + return; + } + + self.data.all.insert(id.clone()); + + if !self.data.queue.contains(id) { + if has_eval && id.1.outer().is_descendant_of(top_level_mark) { + return; + } + + self.data.queue.push(id.clone()); + } + } + + pub(crate) fn reserve_decl(&mut self, len: usize) { + self.data.all.reserve(len); + + self.data.queue.reserve(len); + } + + pub(super) fn add_usage(&mut self, id: Id) { + if id.0 == atom!("arguments") { + return; + } + + self.data.all.insert(id); + } + + pub(crate) fn reserve_usage(&mut self, len: usize) { + self.data.all.reserve(len); + } + + /// Copy `children.data.all` to `self.data.all`. + pub(crate) fn prepare_renaming(&mut self) { + self.children.iter_mut().for_each(|child| { + child.prepare_renaming(); + + self.data.all.extend(child.data.all.iter().cloned()); + }); + } + + pub(crate) fn rename_in_normal_mode( + &mut self, + renamer: &R, + to: &mut RenameMap, + previous: &RenameMap, + reverse: &mut ReverseMap, + preserved: &FxHashSet, + preserved_symbols: &FxHashSet, + ) where + R: Renamer, + { + let queue = self.data.queue.take(); + + // let mut cloned_reverse = reverse.clone(); + + self.rename_one_scope_in_normal_mode( + renamer, + to, + previous, + reverse, + queue, + preserved, + preserved_symbols, + ); + + for child in &mut self.children { + child.rename_in_normal_mode( + renamer, + to, + &Default::default(), + reverse, + preserved, + preserved_symbols, + ); + } + } + + fn rename_one_scope_in_normal_mode( + &self, + renamer: &R, + to: &mut RenameMap, + previous: &RenameMap, + reverse: &mut ReverseMap, + queue: Vec, + preserved: &FxHashSet, + preserved_symbols: &FxHashSet, + ) where + R: Renamer, + { + let mut n = 0; + + for id in queue { + if preserved.contains(&id) + || to.get(&id).is_some() + || previous.get(&id).is_some() + || id.0 == "eval" + { + continue; + } + + if R::RESET_N { + n = 0; + } + + loop { + let sym = renamer.new_name_for(&id, &mut n); + + if preserved_symbols.contains(&sym) { + continue; + } + + if self.can_rename(&id, &sym, reverse) { + if cfg!(debug_assertions) { + debug!("Renaming `{}{:?}` to `{}`", id.0, id.1, sym); + } + + reverse.push_entry(sym.clone(), id.clone()); + to.insert(id, sym); + + break; + } + } + } + } + + fn can_rename(&self, id: &Id, symbol: &Atom, reverse: &ReverseMap) -> bool { + // We can optimize this + // We only need to check the current scope and parents (ignoring `a` generated + // for unrelated scopes) + for left in reverse.get(symbol) { + if left.1 == id.1 && *left.0 == id.0 { + continue; + } + + if self.data.all.contains(left) { + return false; + } + } + + true + } + + #[cfg_attr(not(feature = "concurrent-renamer"), allow(unused))] + pub(crate) fn rename_in_mangle_mode( + &mut self, + renamer: &R, + to: &mut RenameMap, + previous: &RenameMap, + reverse: &ReverseMap, + preserved: &FxHashSet, + preserved_symbols: &FxHashSet, + parallel: bool, + ) where + R: Renamer, + { + let queue = self.data.queue.take(); + + let mut cloned_reverse = reverse.next(); + + self.rename_one_scope_in_mangle_mode( + renamer, + to, + previous, + &mut cloned_reverse, + queue, + preserved, + preserved_symbols, + ); + + #[cfg(feature = "concurrent-renamer")] + if parallel { + #[cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"))))] + let iter = self.children.par_iter_mut(); + #[cfg(target_arch = "wasm32")] + let iter = self.children.iter_mut(); + + let iter = iter + .map(|child| { + use std::collections::HashMap; + + let mut new_map = HashMap::default(); + child.rename_in_mangle_mode( + renamer, + &mut new_map, + to, + &cloned_reverse, + preserved, + preserved_symbols, + parallel, + ); + new_map + }) + .collect::>(); + + for (k, v) in iter.into_iter().flatten() { + to.entry(k).or_insert(v); + } + return; + } + + for child in &mut self.children { + child.rename_in_mangle_mode( + renamer, + to, + &Default::default(), + &cloned_reverse, + preserved, + preserved_symbols, + parallel, + ); + } + } + + fn rename_one_scope_in_mangle_mode( + &self, + renamer: &R, + to: &mut RenameMap, + previous: &RenameMap, + reverse: &mut ReverseMap, + queue: Vec, + preserved: &FxHashSet, + preserved_symbols: &FxHashSet, + ) where + R: Renamer, + { + let mut n = 0; + + for id in queue { + if preserved.contains(&id) + || to.get(&id).is_some() + || previous.get(&id).is_some() + || id.0 == "eval" + { + continue; + } + + loop { + let sym = renamer.new_name_for(&id, &mut n); + + // TODO: Use base54::decode + if preserved_symbols.contains(&sym) { + continue; + } + + if self.can_rename(&id, &sym, reverse) { + #[cfg(debug_assertions)] + { + debug!("mangle: `{}{:?}` -> {}", id.0, id.1, sym); + } + + reverse.push_entry(sym.clone(), id.clone()); + to.insert(id.clone(), sym); + // self.data.decls.remove(&id); + // self.data.usages.remove(&id); + + break; + } + } + } + } + + pub fn rename_cost(&self) -> usize { + let children = &self.children; + self.data.queue.len() + children.iter().map(|v| v.rename_cost()).sum::() + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/collector.rs b/crates/swc_ecma_transforms_base/src/arena/rename/collector.rs new file mode 100644 index 000000000000..cdadc40b50c8 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/collector.rs @@ -0,0 +1,219 @@ +use std::hash::Hash; + +use rustc_hash::FxHashSet; +use swc_common::{Mark, SyntaxContext}; +use swc_ecma_ast::arena::*; +use swc_ecma_utils::{arena::ident::IdentLike, stack_size::maybe_grow_default}; +use swc_ecma_visit::{ + arena::{Visit, VisitWith}, + noop_visit_type_arena, visit_obj_and_computed_arena, +}; + +pub(super) struct IdCollector { + pub ids: FxHashSet, +} + +impl Visit<'_> for IdCollector { + noop_visit_type_arena!(); + + visit_obj_and_computed_arena!(); + + fn visit_export_default_specifier(&mut self, _: &ExportDefaultSpecifier) {} + + fn visit_export_named_specifier(&mut self, _: &ExportNamedSpecifier) {} + + fn visit_export_namespace_specifier(&mut self, _: &ExportNamespaceSpecifier) {} + + fn visit_bin_expr(&mut self, n: &BinExpr) { + maybe_grow_default(|| n.visit_children_with(self)); + } + + fn visit_ident(&mut self, id: &Ident) { + if id.ctxt != SyntaxContext::empty() { + self.ids.insert(id.to_id()); + } + } + + fn visit_named_export(&mut self, e: &NamedExport) { + if e.src.is_some() { + return; + } + + e.visit_children_with(self); + } + + fn visit_prop_name(&mut self, p: &PropName) { + if let PropName::Computed(n) = p { + n.visit_with(self); + } + } +} + +pub(super) struct CustomBindingCollector +where + I: IdentLike + Eq + Hash + Send + Sync, +{ + bindings: FxHashSet, + preserved: FxHashSet, + is_pat_decl: bool, + + /// [None] if there's no `eval`. + pub top_level_for_eval: Option, +} + +impl CustomBindingCollector +where + I: IdentLike + Eq + Hash + Send + Sync, +{ + fn add(&mut self, i: &Ident) { + if let Some(top_level_ctxt) = self.top_level_for_eval { + if i.ctxt == top_level_ctxt { + self.preserved.insert(I::from_ident(i)); + return; + } + } + + self.bindings.insert(I::from_ident(i)); + } +} + +impl Visit<'_> for CustomBindingCollector +where + I: IdentLike + Eq + Hash + Send + Sync, +{ + noop_visit_type_arena!(); + + fn visit_arrow_expr(&mut self, n: &ArrowExpr) { + let old = self.is_pat_decl; + + for p in &n.params { + self.is_pat_decl = true; + p.visit_with(self); + } + + n.body.visit_with(self); + self.is_pat_decl = old; + } + + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp) { + node.value.visit_with(self); + + if self.is_pat_decl { + self.add(&Ident::from(&node.key)); + } + } + + fn visit_binding_ident(&mut self, n: &BindingIdent) { + n.visit_children_with(self); + + if self.is_pat_decl { + self.add(&Ident::from(n)) + } + } + + fn visit_catch_clause(&mut self, node: &CatchClause) { + let old = self.is_pat_decl; + self.is_pat_decl = true; + node.param.visit_with(self); + + self.is_pat_decl = false; + node.body.visit_with(self); + self.is_pat_decl = old; + } + + fn visit_class_decl(&mut self, node: &ClassDecl) { + node.visit_children_with(self); + + self.add(&node.ident); + } + + fn visit_class_expr(&mut self, node: &ClassExpr) { + node.visit_children_with(self); + + if let Some(id) = &node.ident { + self.add(id); + } + } + + fn visit_expr(&mut self, node: &Expr) { + let old = self.is_pat_decl; + self.is_pat_decl = false; + node.visit_children_with(self); + self.is_pat_decl = old; + } + + fn visit_bin_expr(&mut self, node: &BinExpr) { + maybe_grow_default(|| node.visit_children_with(self)); + } + + fn visit_fn_decl(&mut self, node: &FnDecl) { + node.visit_children_with(self); + + self.add(&node.ident); + } + + fn visit_fn_expr(&mut self, node: &FnExpr) { + node.visit_children_with(self); + + if let Some(id) = &node.ident { + self.add(id); + } + } + + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + self.add(&node.local); + } + + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier) { + self.add(&node.local); + } + + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + self.add(&node.local); + } + + fn visit_param(&mut self, node: &Param) { + let old = self.is_pat_decl; + self.is_pat_decl = true; + node.visit_children_with(self); + self.is_pat_decl = old; + } + + fn visit_ts_param_prop(&mut self, p: &TsParamProp) { + let old = self.is_pat_decl; + + self.is_pat_decl = true; + p.visit_children_with(self); + + self.is_pat_decl = old; + } + + fn visit_var_declarator(&mut self, node: &VarDeclarator) { + let old = self.is_pat_decl; + self.is_pat_decl = true; + node.name.visit_with(self); + + self.is_pat_decl = false; + node.init.visit_with(self); + self.is_pat_decl = old; + } +} + +/// Returns `(bindings, preserved)`. +pub(super) fn collect_decls<'a, I, N>( + n: &N, + top_level_mark_for_eval: Option, +) -> (FxHashSet, FxHashSet) +where + I: IdentLike + Eq + Hash + Send + Sync, + N: VisitWith<'a, CustomBindingCollector>, +{ + let mut v = CustomBindingCollector { + bindings: Default::default(), + preserved: Default::default(), + is_pat_decl: false, + top_level_for_eval: top_level_mark_for_eval.map(|m| SyntaxContext::empty().apply_mark(m)), + }; + n.visit_with(&mut v); + (v.bindings, v.preserved) +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/eval.rs b/crates/swc_ecma_transforms_base/src/arena/rename/eval.rs new file mode 100644 index 000000000000..c3a82f82a52b --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/eval.rs @@ -0,0 +1,72 @@ +use swc_ecma_ast::arena::*; +use swc_ecma_utils::stack_size::maybe_grow_default; +use swc_ecma_visit::{ + arena::{Visit, VisitWith}, + noop_visit_type_arena, visit_obj_and_computed, visit_obj_and_computed_arena, +}; + +pub(crate) fn contains_eval<'a, N>(node: &N, include_with: bool) -> bool +where + N: VisitWith<'a, EvalFinder>, +{ + let mut v = EvalFinder { + found: false, + include_with, + }; + + node.visit_with(&mut v); + v.found +} + +pub(crate) struct EvalFinder { + found: bool, + include_with: bool, +} + +impl Visit<'_> for EvalFinder { + noop_visit_type_arena!(); + + visit_obj_and_computed_arena!(); + + fn visit_callee(&mut self, c: &Callee) { + c.visit_children_with(self); + + if let Callee::Expr(e) = c { + if e.is_ident_ref_to("eval") { + self.found = true + } + } + } + + fn visit_export_default_specifier(&mut self, _: &ExportDefaultSpecifier) {} + + fn visit_export_named_specifier(&mut self, _: &ExportNamedSpecifier) {} + + fn visit_export_namespace_specifier(&mut self, _: &ExportNamespaceSpecifier) {} + + fn visit_expr(&mut self, n: &Expr) { + maybe_grow_default(|| n.visit_children_with(self)); + } + + fn visit_named_export(&mut self, e: &NamedExport) { + if e.src.is_some() { + return; + } + + e.visit_children_with(self); + } + + fn visit_prop_name(&mut self, p: &PropName) { + if let PropName::Computed(n) = p { + n.visit_with(self); + } + } + + fn visit_with_stmt(&mut self, s: &WithStmt) { + if self.include_with { + self.found = true; + } else { + s.visit_children_with(self); + } + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/mod.rs b/crates/swc_ecma_transforms_base/src/arena/rename/mod.rs new file mode 100644 index 000000000000..a723de86bae5 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/mod.rs @@ -0,0 +1,470 @@ +#![allow(unused_imports)] + +use std::{borrow::Cow, collections::hash_map::Entry}; + +use rustc_hash::{FxHashMap, FxHashSet}; +use swc_allocator::arena::Allocator; +use swc_atoms::Atom; +use swc_common::collections::AHashMap; +use swc_ecma_ast::arena::*; +use swc_ecma_utils::stack_size::maybe_grow_default; +use swc_ecma_visit::{ + arena::{visit_mut_pass, Fold, VisitMut, VisitMutWith, VisitWith}, + noop_visit_mut_type, noop_visit_mut_type_arena, +}; + +#[cfg(feature = "concurrent-renamer")] +use self::renamer_concurrent::{Send, Sync}; +#[cfg(not(feature = "concurrent-renamer"))] +use self::renamer_single::{Send, Sync}; +use self::{ + analyzer::Analyzer, + collector::{collect_decls, CustomBindingCollector, IdCollector}, + eval::contains_eval, + ops::Operator, +}; +use super::hygiene::Config; + +mod analyzer; +mod collector; +mod eval; +mod ops; + +pub trait Renamer: Send + Sync { + /// Should reset `n` to 0 for each identifier? + const RESET_N: bool; + + /// It should be true if you expect lots of collisions + const MANGLE: bool; + + fn preserved_ids_for_module(&mut self, _: &Module) -> FxHashSet { + Default::default() + } + + fn preserved_ids_for_script(&mut self, _: &Script) -> FxHashSet { + Default::default() + } + + fn get_cached(&self) -> Option> { + None + } + + fn store_cache(&mut self, _update: &RenameMap) {} + + /// Should increment `n`. + fn new_name_for(&self, orig: &Id, n: &mut usize) -> Atom; +} + +pub type RenameMap = FxHashMap; + +pub fn rename<'a>(alloc: &'a Allocator, map: &'a RenameMap) -> impl Pass<'a> + VisitMut<'a> { + rename_with_config(alloc, map, Default::default()) +} + +pub fn rename_with_config<'this, 'a: 'this>( + alloc: &'a Allocator, + map: &'this RenameMap, + config: Config, +) -> impl Pass<'a> + VisitMut<'a> + 'this { + visit_mut_pass(Operator { + alloc, + rename: map, + config, + extra: Default::default(), + }) +} + +pub fn remap<'a>( + alloc: &'a Allocator, + map: &'a FxHashMap, + config: Config, +) -> impl Pass<'a> + VisitMut<'a> { + visit_mut_pass(Operator { + alloc, + rename: map, + config, + extra: Default::default(), + }) +} + +pub fn renamer(alloc: &Allocator, config: Config, renamer: R) -> impl Pass<'_> + VisitMut<'_> +where + R: Renamer, +{ + visit_mut_pass(RenamePass { + alloc, + config, + renamer, + preserved: Default::default(), + unresolved: Default::default(), + previous_cache: Default::default(), + total_map: None, + }) +} + +#[derive(Debug)] +struct RenamePass<'a, R> +where + R: Renamer, +{ + alloc: &'a Allocator, + config: Config, + renamer: R, + + preserved: FxHashSet, + unresolved: FxHashSet, + + previous_cache: RenameMap, + + /// Used to store cache. + /// + /// [Some] if the [`Renamer::get_cached`] returns [Some]. + total_map: Option, +} + +impl<'a, R> RenamePass<'a, R> +where + R: Renamer, +{ + fn get_unresolved(&self, n: &N, has_eval: bool) -> FxHashSet + where + N: VisitWith<'a, IdCollector> + VisitWith<'a, CustomBindingCollector>, + { + let usages = { + let mut v = IdCollector { + ids: Default::default(), + }; + n.visit_with(&mut v); + v.ids + }; + let (decls, preserved) = collect_decls( + n, + if has_eval { + Some(self.config.top_level_mark) + } else { + None + }, + ); + usages + .into_iter() + .filter(|used_id| !decls.contains(used_id)) + .map(|v| v.0) + .chain(preserved.into_iter().map(|v| v.0)) + .collect() + } + + fn get_map(&mut self, node: &N, skip_one: bool, top_level: bool, has_eval: bool) -> RenameMap + where + N: VisitWith<'a, IdCollector> + VisitWith<'a, CustomBindingCollector>, + N: VisitWith<'a, Analyzer>, + { + let mut scope = { + let mut v = Analyzer { + has_eval, + top_level_mark: self.config.top_level_mark, + + ..Default::default() + }; + if skip_one { + node.visit_children_with(&mut v); + } else { + node.visit_with(&mut v); + } + v.scope + }; + scope.prepare_renaming(); + + let mut map = RenameMap::default(); + + let mut unresolved = if !top_level { + let mut unresolved = self.unresolved.clone(); + unresolved.extend(self.get_unresolved(node, has_eval)); + Cow::Owned(unresolved) + } else { + Cow::Borrowed(&self.unresolved) + }; + + if !self.preserved.is_empty() { + unresolved + .to_mut() + .extend(self.preserved.iter().map(|v| v.0.clone())); + } + + if !self.config.preserved_symbols.is_empty() { + unresolved + .to_mut() + .extend(self.config.preserved_symbols.iter().cloned()); + } + + if R::MANGLE { + let cost = scope.rename_cost(); + scope.rename_in_mangle_mode( + &self.renamer, + &mut map, + &self.previous_cache, + &Default::default(), + &self.preserved, + &unresolved, + cost > 1024, + ); + } else { + scope.rename_in_normal_mode( + &self.renamer, + &mut map, + &self.previous_cache, + &mut Default::default(), + &self.preserved, + &unresolved, + ); + } + + if let Some(total_map) = &mut self.total_map { + total_map.reserve(map.len()); + + for (k, v) in &map { + match total_map.entry(k.clone()) { + Entry::Occupied(old) => { + unreachable!( + "{} is already renamed to {}, but it's renamed as {}", + k.0, + old.get(), + v + ); + } + Entry::Vacant(e) => { + e.insert(v.clone()); + } + } + } + } + + map + } + + fn load_cache(&mut self) { + if let Some(cache) = self.renamer.get_cached() { + self.previous_cache = cache.into_owned(); + self.total_map = Some(Default::default()); + } + } +} + +/// Mark a node as a unit of minification. +/// +/// This is +macro_rules! unit { + ($name:ident, $T:ty) => { + /// Only called if `eval` exists + fn $name(&mut self, n: &mut $T) { + if !self.config.ignore_eval && contains_eval(n, true) { + n.visit_mut_children_with(self); + } else { + let map = self.get_map(n, false, false, false); + + if !map.is_empty() { + n.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + } + } + }; + ($name:ident, $T:ty, true) => { + /// Only called if `eval` exists + fn $name(&mut self, n: &mut $T) { + if !self.config.ignore_eval && contains_eval(n, true) { + n.visit_mut_children_with(self); + } else { + let map = self.get_map(n, true, false, false); + + if !map.is_empty() { + n.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + } + } + }; +} + +impl<'a, R> VisitMut<'a> for RenamePass<'a, R> +where + R: Renamer, +{ + noop_visit_mut_type_arena!(); + + unit!(visit_mut_arrow_expr, ArrowExpr<'a>); + + unit!(visit_mut_setter_prop, SetterProp<'a>); + + unit!(visit_mut_getter_prop, GetterProp<'a>); + + unit!(visit_mut_constructor, Constructor<'a>); + + unit!(visit_mut_fn_expr, FnExpr<'a>); + + unit!(visit_mut_method_prop, MethodProp<'a>); + + unit!(visit_mut_class_method, ClassMethod<'a>); + + unit!(visit_mut_private_method, PrivateMethod<'a>); + + fn visit_mut_fn_decl(&mut self, n: &mut FnDecl<'a>) { + if !self.config.ignore_eval && contains_eval(n, true) { + n.visit_mut_children_with(self); + } else { + let id = n.ident.to_id(); + let inserted = self.preserved.insert(id.clone()); + let map = self.get_map(n, true, false, false); + + if inserted { + self.preserved.remove(&id); + } + + if !map.is_empty() { + n.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + } + } + + fn visit_mut_class_decl(&mut self, n: &mut ClassDecl<'a>) { + if !self.config.ignore_eval && contains_eval(n, true) { + n.visit_mut_children_with(self); + } else { + let id = n.ident.to_id(); + let inserted = self.preserved.insert(id.clone()); + let map = self.get_map(n, true, false, false); + + if inserted { + self.preserved.remove(&id); + } + + if !map.is_empty() { + n.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + } + } + + fn visit_mut_default_decl(&mut self, n: &mut DefaultDecl<'a>) { + match n { + DefaultDecl::Class(n) => { + n.visit_mut_children_with(self); + } + DefaultDecl::Fn(n) => { + n.visit_mut_children_with(self); + } + DefaultDecl::TsInterfaceDecl(n) => { + n.visit_mut_children_with(self); + } + } + } + + fn visit_mut_expr(&mut self, n: &mut Expr<'a>) { + maybe_grow_default(|| n.visit_mut_children_with(self)); + } + + fn visit_mut_module(&mut self, m: &mut Module<'a>) { + self.load_cache(); + + self.preserved = self.renamer.preserved_ids_for_module(m); + + let has_eval = !self.config.ignore_eval && contains_eval(m, true); + + self.unresolved = self.get_unresolved(m, has_eval); + + let map = self.get_map(m, false, true, has_eval); + + // If we have eval, we cannot rename a whole program at once. + // + // Still, we can, and should rename some identifiers, if the containing scope + // (function-like nodes) does not have eval. This `eval` check includes + // `eval` in children. + // + // We calculate the top level map first, rename children, and then rename the + // top level. + // + // + // Order: + // + // 1. Top level map calculation + // 2. Per-unit map calculation + // 3. Per-unit renaming + // 4. Top level renaming + // + // This is because the top level map may contain a mapping which conflicts + // with a map from one of the children. + // + // See https://github.com/swc-project/swc/pull/7615 + if has_eval { + m.visit_mut_children_with(self); + } + + if !map.is_empty() { + m.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + + if let Some(total_map) = &self.total_map { + self.renamer.store_cache(total_map); + } + } + + fn visit_mut_script(&mut self, m: &mut Script<'a>) { + self.load_cache(); + + self.preserved = self.renamer.preserved_ids_for_script(m); + + let has_eval = !self.config.ignore_eval && contains_eval(m, true); + + self.unresolved = self.get_unresolved(m, has_eval); + + let map = self.get_map(m, false, true, has_eval); + + if has_eval { + m.visit_mut_children_with(self); + } + + if !map.is_empty() { + m.visit_mut_with(&mut rename_with_config( + self.alloc, + &map, + self.config.clone(), + )); + } + + if let Some(total_map) = &self.total_map { + self.renamer.store_cache(total_map); + } + } +} + +#[cfg(feature = "concurrent-renamer")] +mod renamer_concurrent { + pub use std::marker::{Send, Sync}; +} + +#[cfg(not(feature = "concurrent-renamer"))] +mod renamer_single { + /// Dummy trait because swc_common is in single thread mode. + pub trait Send {} + /// Dummy trait because swc_common is in single thread mode. + pub trait Sync {} + + impl Send for T where T: ?Sized {} + impl Sync for T where T: ?Sized {} +} diff --git a/crates/swc_ecma_transforms_base/src/arena/rename/ops.rs b/crates/swc_ecma_transforms_base/src/arena/rename/ops.rs new file mode 100644 index 000000000000..6278b03137f6 --- /dev/null +++ b/crates/swc_ecma_transforms_base/src/arena/rename/ops.rs @@ -0,0 +1,741 @@ +use rustc_hash::FxHashMap; +use swc_allocator::{ + arena::{Allocator, Box, CloneIn, Vec as SwcVec}, + vec, +}; +use swc_common::{arena::Take, util::move_map::MoveMap, Spanned, SyntaxContext, DUMMY_SP}; +use swc_ecma_ast::arena::*; +use swc_ecma_utils::{ident::IdentLike, stack_size::maybe_grow_default}; +use swc_ecma_visit::{ + arena::{VisitMut, VisitMutWith}, + noop_visit_mut_type_arena, +}; + +use super::RenameMap; +use crate::arena::hygiene::Config; + +pub(super) struct Operator<'this, 'a: 'this, I> +where + I: IdentLike, +{ + pub alloc: &'a Allocator, + pub rename: &'this FxHashMap, + pub config: Config, + + pub extra: Vec>, +} + +impl<'this, 'a: 'this, I> Operator<'this, 'a, I> +where + I: IdentLike, +{ + fn keep_class_name( + &mut self, + ident: &mut Ident, + class: &mut Class<'a>, + ) -> Option> { + if !self.config.keep_class_names { + return None; + } + + let mut orig_name = ident.clone_in(self.alloc); + orig_name.ctxt = SyntaxContext::empty(); + + { + // Remove span hygiene of the class. + let mut rename = RenameMap::default(); + + rename.insert(ident.to_id(), orig_name.sym.clone_in(self.alloc)); + + let mut operator = Operator { + alloc: self.alloc, + rename: &rename, + config: self.config.clone(), + extra: Default::default(), + }; + + class.visit_mut_with(&mut operator); + } + + let _ = self.rename_ident(ident); + class.visit_mut_with(self); + + let class_expr = ClassExpr { + ident: Some(orig_name), + class: Box::new_in(class.take(self.alloc), self.alloc), + }; + + Some(class_expr) + } +} + +// impl<'a, I> Parallel for Operator<'a, I> +// where +// I: IdentLike, +// { +// fn create(&self) -> Self { +// Self { +// alloc: self.alloc, +// rename: self.rename, +// config: self.config.clone_in(self.alloc), +// extra: Default::default(), +// } +// } + +// fn merge(&mut self, other: Self) { +// self.extra.extend(other.extra); +// } + +// fn after_module_items(&mut self, stmts: &mut Vec) { +// stmts.append(&mut self.extra); +// } +// } + +// impl<'a, I> ParExplode for Operator<'a, I> +// where +// I: IdentLike, +// { +// fn after_one_stmt(&mut self, _: &mut Vec) {} + +// fn after_one_module_item(&mut self, stmts: &mut Vec) { +// stmts.append(&mut self.extra); +// } +// } + +impl<'this, 'a: 'this, I> VisitMut<'a> for Operator<'this, 'a, I> +where + I: IdentLike, +{ + noop_visit_mut_type_arena!(); + + /// Preserve key of properties. + fn visit_mut_assign_pat_prop(&mut self, p: &mut AssignPatProp<'a>) { + if let Some(value) = &mut p.value { + value.visit_mut_children_with(self); + } + } + + fn visit_mut_class_expr(&mut self, n: &mut ClassExpr<'a>) { + if let Some(ident) = &mut n.ident { + if let Some(expr) = self.keep_class_name(ident, &mut n.class) { + *n = expr; + return; + } + } + + n.ident.visit_mut_with(self); + + n.class.visit_mut_with(self); + } + + fn visit_mut_decl(&mut self, decl: &mut Decl<'a>) { + match decl { + Decl::Class(cls) if self.config.keep_class_names => { + let span = cls.class.span; + + let mut cls_inner = cls.as_mut().take(self.alloc); + let ident = &mut cls_inner.ident; + let class = &mut cls_inner.class; + let expr = self.keep_class_name(ident, class); + + let _ = std::mem::replace(cls.as_mut(), cls_inner); + if let Some(expr) = expr { + let var = VarDeclarator { + span, + name: Pat::Ident(Box::new_in( + cls.ident.clone_in(self.alloc).into(), + self.alloc, + )), + init: Some(Expr::Class(Box::new_in(expr, self.alloc))), + definite: false, + }; + *decl = Decl::Var(Box::new_in( + VarDecl { + span, + kind: VarDeclKind::Let, + decls: vec![in self.alloc; var], + ctxt: SyntaxContext::default(), + declare: false, + }, + self.alloc, + )); + return; + } + + return; + } + _ => {} + } + + decl.visit_mut_children_with(self); + } + + fn visit_mut_export_named_specifier(&mut self, s: &mut ExportNamedSpecifier<'a>) { + if s.exported.is_some() { + s.orig.visit_mut_with(self); + return; + } + + let exported = s.orig.clone_in(self.alloc); + + if let ModuleExportName::Ident(orig) = &mut s.orig { + if self.rename_ident(orig).is_ok() { + match &exported { + ModuleExportName::Ident(exported) => { + if orig.sym == exported.sym { + return; + } + } + ModuleExportName::Str(_) => {} + } + + s.exported = Some(exported); + } + } + } + + fn visit_mut_expr(&mut self, n: &mut Expr<'a>) { + maybe_grow_default(|| n.visit_mut_children_with(self)) + } + + // fn visit_mut_expr_or_spreads(&mut self, n: &mut Vec) { + // self.maybe_par(cpu_count() * 100, n, |v, n| { + // n.visit_mut_with(v); + // }) + // } + + // fn visit_mut_exprs(&mut self, n: &mut Vec>) { + // self.maybe_par(cpu_count() * 100, n, |v, n| { + // n.visit_mut_with(v); + // }) + // } + + fn visit_mut_ident(&mut self, ident: &mut Ident) { + match self.rename_ident(ident) { + Ok(i) | Err(i) => i, + } + } + + fn visit_mut_import_named_specifier(&mut self, s: &mut ImportNamedSpecifier<'a>) { + if s.imported.is_some() { + s.local.visit_mut_with(self); + return; + } + + let imported = s.local.clone_in(self.alloc); + let local = self.rename_ident(&mut s.local); + + if local.is_ok() { + if s.local.sym == imported.sym { + return; + } + + s.imported = Some(ModuleExportName::Ident(Box::new_in(imported, self.alloc))); + } + } + + /// Preserve key of properties. + fn visit_mut_key_value_pat_prop(&mut self, p: &mut KeyValuePatProp<'a>) { + p.key.visit_mut_with(self); + p.value.visit_mut_with(self); + } + + fn visit_mut_key_value_prop(&mut self, p: &mut KeyValueProp<'a>) { + p.key.visit_mut_with(self); + p.value.visit_mut_with(self); + } + + fn visit_mut_member_expr(&mut self, expr: &mut MemberExpr<'a>) { + expr.span.visit_mut_with(self); + expr.obj.visit_mut_with(self); + + if let MemberProp::Computed(c) = &mut expr.prop { + c.visit_mut_with(self) + } + } + + fn visit_mut_module_item(&mut self, item: &mut ModuleItem<'a>) { + let span = item.span(); + + macro_rules! export { + ($orig:expr, $ident:expr) => { + self.extra + .push(ModuleItem::ModuleDecl(ModuleDecl::ExportNamed( + Box::new_in( + NamedExport { + span, + specifiers: vec![in self.alloc; ExportSpecifier::Named(Box::new_in(ExportNamedSpecifier { + span: DUMMY_SP, + orig: $ident, + exported: Some($orig), + is_type_only: false, + }, self.alloc))], + src: None, + type_only: false, + with: None, + }, + self.alloc, + ), + ))); + }; + } + + match item { + ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(export_decl)) + if export_decl.decl.is_class() => + { + let ExportDecl { span, decl } = export_decl.as_mut(); + let ClassDecl { + ident, + class, + declare, + } = decl.as_mut_class().unwrap().as_mut(); + let mut ident = ident.take(self.alloc); + let mut class = class.take(self.alloc); + + class.visit_mut_with(self); + let orig_ident = ident.clone_in(self.alloc); + match self.rename_ident(&mut ident) { + Ok(..) => { + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span: *span, + decl: Decl::Class(Box::new_in( + ClassDecl { + ident: ident.clone_in(self.alloc), + class: class.take(self.alloc), + declare: *declare, + }, + self.alloc, + )), + }, + self.alloc, + ))); + export!( + ModuleExportName::Ident(Box::new_in(orig_ident, self.alloc)), + ModuleExportName::Ident(Box::new_in( + ident.take(self.alloc), + self.alloc + )) + ); + } + Err(..) => { + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span: *span, + decl: Decl::Class(Box::new_in( + ClassDecl { + ident: ident.take(self.alloc), + class: class.take(self.alloc), + declare: *declare, + }, + self.alloc, + )), + }, + self.alloc, + ))) + } + } + } + ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(export_decl)) + if export_decl.decl.is_fn_decl() => + { + let ExportDecl { span, decl } = export_decl.as_mut(); + let FnDecl { + ident, + function, + declare, + } = decl.as_mut_fn_decl().unwrap().as_mut(); + let mut ident = ident.take(self.alloc); + let mut function = function.take(self.alloc); + + function.visit_mut_with(self); + let orig_ident = ident.clone_in(self.alloc); + match self.rename_ident(&mut ident) { + Ok(..) => { + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span: *span, + decl: Decl::Fn(Box::new_in( + FnDecl { + ident: ident.clone_in(self.alloc), + function, + declare: *declare, + }, + self.alloc, + )), + }, + self.alloc, + ))); + export!( + ModuleExportName::Ident(Box::new_in(orig_ident, self.alloc)), + ModuleExportName::Ident(Box::new_in(ident, self.alloc)) + ); + } + Err(..) => { + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span: *span, + decl: Decl::Fn(Box::new_in( + FnDecl { + ident, + function, + declare: *declare, + }, + self.alloc, + )), + }, + self.alloc, + ))) + } + } + } + ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(export_decl)) + if export_decl.decl.is_var() => + { + let var = export_decl.as_mut().decl.as_mut_var().unwrap(); + let decls = var.decls.take(self.alloc); + + let mut renamed = SwcVec::new_in(self.alloc); + let decls = decls.move_map(|mut decl| { + decl.name.visit_mut_with(&mut VarFolder { + orig: self, + renamed: &mut renamed, + }); + decl.init.visit_mut_with(self); + decl + }); + + if renamed.is_empty() { + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span, + decl: Decl::Var(Box::new_in( + VarDecl { + decls, + ..var.as_mut().take(self.alloc) + }, + self.alloc, + )), + }, + self.alloc, + ))); + + return; + } + *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(Box::new_in( + ExportDecl { + span, + decl: Decl::Var(Box::new_in( + VarDecl { + decls, + ..var.as_mut().take(self.alloc) + }, + self.alloc, + )), + }, + self.alloc, + ))); + self.extra + .push(ModuleItem::ModuleDecl(ModuleDecl::ExportNamed( + Box::new_in( + NamedExport { + span, + specifiers: renamed, + src: None, + type_only: false, + with: None, + }, + self.alloc, + ), + ))); + } + _ => { + item.visit_mut_children_with(self); + } + } + } + + // fn visit_mut_module_items(&mut self, nodes: &mut Vec) { + // use std::mem::take; + + // #[cfg(feature = "concurrent")] + // if nodes.len() >= 8 * cpu_count() { + // ::swc_common::GLOBALS.with(|globals| { + // use rayon::prelude::*; + + // let (visitor, new_nodes) = take(nodes) + // .into_par_iter() + // .map(|mut node| { + // ::swc_common::GLOBALS.set(globals, || { + // let mut visitor = Parallel::create(&*self); + // node.visit_mut_with(&mut visitor); + + // let mut nodes = Vec::with_capacity(4); + + // ParExplode::after_one_module_item(&mut visitor, &mut + // nodes); + + // nodes.push(node); + + // (visitor, nodes) + // }) + // }) + // .reduce( + // || (Parallel::create(&*self), Vec::new()), + // |mut a, b| { + // Parallel::merge(&mut a.0, b.0); + + // a.1.extend(b.1); + + // a + // }, + // ); + + // Parallel::merge(self, visitor); + + // { + // self.after_module_items(nodes); + // } + + // *nodes = new_nodes; + // }); + + // return; + // } + + // let mut buf = Vec::with_capacity(nodes.len()); + + // for mut node in take(nodes) { + // let mut visitor = Parallel::create(&*self); + // node.visit_mut_with(&mut visitor); + // buf.push(node); + // visitor.after_one_module_item(&mut buf); + // } + + // self.after_module_items(&mut buf); + + // *nodes = buf; + // } + + fn visit_mut_named_export(&mut self, e: &mut NamedExport<'a>) { + if e.src.is_some() { + return; + } + + e.visit_mut_children_with(self); + } + + fn visit_mut_object_pat_prop(&mut self, n: &mut ObjectPatProp<'a>) { + n.visit_mut_children_with(self); + + if let ObjectPatProp::Assign(p) = n { + let mut renamed = Ident::from(&p.key); + if self.rename_ident(&mut renamed).is_ok() { + if renamed.sym == p.key.sym { + return; + } + + *n = ObjectPatProp::KeyValue(Box::new_in( + KeyValuePatProp { + key: PropName::Ident(Box::new_in( + p.key.take(self.alloc).into(), + self.alloc, + )), + value: match p.value.take() { + Some(default_expr) => Pat::Assign(Box::new_in( + AssignPat { + span: p.span, + left: Pat::Ident(Box::new_in(renamed.into(), self.alloc)), + right: default_expr, + }, + self.alloc, + )), + None => Pat::Ident(Box::new_in(renamed.into(), self.alloc)), + }, + }, + self.alloc, + )); + } + } + } + + // fn visit_mut_opt_vec_expr_or_spreads(&mut self, n: &mut + // Vec>) { self.maybe_par(cpu_count() * 100, n, |v, + // n| { n.visit_mut_with(v); + // }) + // } + + fn visit_mut_prop(&mut self, prop: &mut Prop<'a>) { + match prop { + Prop::Shorthand(i) => { + let mut renamed = i.clone_in(self.alloc); + if self.rename_ident(&mut renamed).is_ok() { + if renamed.sym == i.sym { + return; + } + + *prop = Prop::KeyValue(Box::new_in( + KeyValueProp { + key: PropName::Ident(Box::new_in( + IdentName { + // clear mark + span: i.span, + sym: i.sym.clone_in(self.alloc), + }, + self.alloc, + )), + value: renamed.into(), + }, + self.alloc, + )) + } + } + _ => prop.visit_mut_children_with(self), + } + } + + fn visit_mut_prop_name(&mut self, n: &mut PropName<'a>) { + if let PropName::Computed(c) = n { + c.visit_mut_with(self) + } + } + + // fn visit_mut_prop_or_spreads(&mut self, n: &mut Vec<'a, PropOrSpread<'a>>) { + // self.maybe_par(cpu_count() * 100, n, |v, n| { + // n.visit_mut_with(v); + // }) + // } + + // fn visit_mut_stmts(&mut self, nodes: &mut Vec) { + // use std::mem::take; + + // #[cfg(feature = "concurrent")] + // if nodes.len() >= 100 * cpu_count() { + // ::swc_common::GLOBALS.with(|globals| { + // use rayon::prelude::*; + + // let (visitor, new_nodes) = take(nodes) + // .into_par_iter() + // .map(|mut node| { + // ::swc_common::GLOBALS.set(globals, || { + // let mut visitor = Parallel::create(&*self); + // node.visit_mut_with(&mut visitor); + + // let mut nodes = Vec::with_capacity(4); + + // ParExplode::after_one_stmt(&mut visitor, &mut nodes); + + // nodes.push(node); + + // (visitor, nodes) + // }) + // }) + // .reduce( + // || (Parallel::create(&*self), Vec::new()), + // |mut a, b| { + // Parallel::merge(&mut a.0, b.0); + + // a.1.extend(b.1); + + // a + // }, + // ); + + // Parallel::merge(self, visitor); + + // { + // self.after_stmts(nodes); + // } + + // *nodes = new_nodes; + // }); + + // return; + // } + + // let mut buf = Vec::with_capacity(nodes.len()); + + // for mut node in take(nodes) { + // let mut visitor = Parallel::create(&*self); + // node.visit_mut_with(&mut visitor); + // buf.push(node); + // visitor.after_one_stmt(&mut buf); + // } + + // self.after_stmts(&mut buf); + + // *nodes = buf; + // } + + fn visit_mut_super_prop_expr(&mut self, expr: &mut SuperPropExpr<'a>) { + expr.span.visit_mut_with(self); + if let SuperProp::Computed(c) = &mut expr.prop { + c.visit_mut_with(self); + } + } + + // fn visit_mut_var_declarators(&mut self, n: &mut Vec) { + // self.maybe_par(cpu_count() * 100, n, |v, n| { + // n.visit_mut_with(v); + // }) + // } +} + +struct VarFolder<'this: 'map, 'map, 'a: 'this, I> +where + I: IdentLike, +{ + orig: &'this Operator<'this, 'a, I>, + renamed: &'map mut SwcVec<'a, ExportSpecifier<'a>>, +} + +impl<'this: 'map, 'map, 'a: 'this, I> VisitMut<'a> for VarFolder<'this, 'map, 'a, I> +where + I: IdentLike, +{ + noop_visit_mut_type_arena!(); + + #[inline] + fn visit_mut_expr(&mut self, _: &mut Expr) {} + + #[inline] + fn visit_mut_simple_assign_target(&mut self, _: &mut SimpleAssignTarget) {} + + fn visit_mut_ident(&mut self, i: &mut Ident) { + let orig = i.clone(); + if self.orig.rename_ident(i).is_ok() { + self.renamed.push(ExportSpecifier::Named(Box::new_in( + ExportNamedSpecifier { + span: i.span, + exported: Some(ModuleExportName::Ident(Box::new_in(orig, self.orig.alloc))), + orig: ModuleExportName::Ident(Box::new_in(i.clone(), self.orig.alloc)), + is_type_only: false, + }, + self.orig.alloc, + ))); + } + } +} + +impl Operator<'_, '_, I> +where + I: IdentLike, +{ + /// Returns `Ok(renamed_ident)` if ident should be renamed. + fn rename_ident(&self, ident: &mut Ident) -> Result<(), ()> { + if let Some(new_id) = self.rename.get(&ident.to_id()) { + let (new_sym, new_ctxt) = new_id.to_id(); + + if new_sym == ident.sym { + return Err(()); + } + + ident.ctxt = new_ctxt; + ident.sym = new_sym; + return Ok(()); + } + + Err(()) + } +} diff --git a/crates/swc_ecma_transforms_base/src/arena/resolver.rs b/crates/swc_ecma_transforms_base/src/arena/resolver.rs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/swc_ecma_transforms_base/src/lib.rs b/crates/swc_ecma_transforms_base/src/lib.rs index 67048e5baca1..c2acb1bdb1d5 100644 --- a/crates/swc_ecma_transforms_base/src/lib.rs +++ b/crates/swc_ecma_transforms_base/src/lib.rs @@ -8,6 +8,7 @@ pub mod ext; pub mod fixer; #[macro_use] pub mod hygiene; +pub mod arena; pub mod assumptions; pub mod feature; pub mod helpers; diff --git a/crates/swc_ecma_utils/src/arena/ident.rs b/crates/swc_ecma_utils/src/arena/ident.rs new file mode 100644 index 000000000000..6159f0f52cd3 --- /dev/null +++ b/crates/swc_ecma_utils/src/arena/ident.rs @@ -0,0 +1,77 @@ +use swc_atoms::JsWord; +use swc_common::SyntaxContext; +use swc_ecma_ast::arena::{BindingIdent, Id, Ident}; + +pub trait IdentLike { + fn from_ident(i: &Ident) -> Self; + fn to_id(&self) -> Id; + fn into_id(self) -> Id; +} + +impl IdentLike for JsWord { + fn from_ident(i: &Ident) -> Self { + i.sym.clone() + } + + fn to_id(&self) -> Id { + (self.clone(), Default::default()) + } + + fn into_id(self) -> Id { + (self, Default::default()) + } +} + +impl IdentLike for BindingIdent<'_> { + fn from_ident(i: &Ident) -> Self { + i.clone().into() + } + + fn to_id(&self) -> Id { + (self.sym.clone(), self.ctxt) + } + + fn into_id(self) -> Id { + self.id.into_id() + } +} + +impl IdentLike for (JsWord, SyntaxContext) { + #[inline] + fn from_ident(i: &Ident) -> Self { + (i.sym.clone(), i.ctxt) + } + + #[inline] + fn to_id(&self) -> Id { + (self.0.clone(), self.1) + } + + #[inline] + fn into_id(self) -> Id { + self + } +} + +impl IdentLike for Ident { + #[inline] + fn from_ident(i: &Ident) -> Self { + Ident::new(i.sym.clone(), i.span, i.ctxt) + } + + #[inline] + fn to_id(&self) -> Id { + (self.sym.clone(), self.ctxt) + } + + #[inline] + fn into_id(self) -> Id { + (self.sym, self.ctxt) + } +} + +#[deprecated = "Use i.to_id() instead"] +#[inline(always)] +pub fn id(i: &Ident) -> Id { + (i.sym.clone(), i.ctxt) +} diff --git a/crates/swc_ecma_utils/src/arena/mod.rs b/crates/swc_ecma_utils/src/arena/mod.rs new file mode 100644 index 000000000000..f905cfd80d0d --- /dev/null +++ b/crates/swc_ecma_utils/src/arena/mod.rs @@ -0,0 +1 @@ +pub mod ident; diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 6141bae98916..329605a1fbef 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -56,6 +56,7 @@ mod node_ignore_span; pub mod number; pub mod stack_size; pub use node_ignore_span::NodeIgnoringSpan; +pub mod arena; // TODO: remove pub struct ThisVisitor { diff --git a/crates/swc_ecma_visit/Cargo.toml b/crates/swc_ecma_visit/Cargo.toml index 61b4c08b0b40..82fef99bc14d 100644 --- a/crates/swc_ecma_visit/Cargo.toml +++ b/crates/swc_ecma_visit/Cargo.toml @@ -27,7 +27,8 @@ num-bigint = { workspace = true, features = ["serde"] } serde = { workspace = true, optional = true, features = ["derive"] } tracing = { workspace = true } -swc_atoms = { version = "3.0.0", path = "../swc_atoms" } -swc_common = { version = "5.0.0", path = "../swc_common" } -swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } -swc_visit = { version = "2.0.0", path = "../swc_visit" } +swc_allocator = { version = "2.0.0", path = "../swc_allocator" } +swc_atoms = { version = "3.0.0", path = "../swc_atoms" } +swc_common = { version = "5.0.0", path = "../swc_common" } +swc_ecma_ast = { version = "5.0.0", path = "../swc_ecma_ast" } +swc_visit = { version = "2.0.0", path = "../swc_visit" } diff --git a/crates/swc_ecma_visit/src/arena/generated.rs b/crates/swc_ecma_visit/src/arena/generated.rs new file mode 100644 index 000000000000..4f1ef2361682 --- /dev/null +++ b/crates/swc_ecma_visit/src/arena/generated.rs @@ -0,0 +1,147802 @@ +#![doc = r" This file is generated by `tools/generate-code`. DO NOT MODIFY."] +#![allow(unused_variables)] +#![allow(clippy::all)] +pub use ::swc_visit::All; +use swc_allocator::arena::{Box, Vec}; +use swc_ecma_ast::arena::*; +#[doc = r" A visitor trait for traversing the AST."] +pub trait Visit<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_accessibility(&mut self, node: &Accessibility) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_array_lit(&mut self, node: &ArrayLit<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_array_pat(&mut self, node: &ArrayPat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_arrow_expr(&mut self, node: &ArrowExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_assign_expr(&mut self, node: &AssignExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_assign_op(&mut self, node: &AssignOp) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_assign_pat(&mut self, node: &AssignPat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_assign_prop(&mut self, node: &AssignProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_assign_target(&mut self, node: &AssignTarget<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_assign_target_pat(&mut self, node: &AssignTargetPat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_atom(&mut self, node: &swc_atoms::Atom) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_auto_accessor(&mut self, node: &AutoAccessor<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_await_expr(&mut self, node: &AwaitExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_big_int(&mut self, node: &BigInt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_big_int_value(&mut self, node: &BigIntValue) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_bin_expr(&mut self, node: &BinExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_binary_op(&mut self, node: &BinaryOp) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_binding_ident(&mut self, node: &BindingIdent<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_block_stmt(&mut self, node: &BlockStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_block_stmt_or_expr(&mut self, node: &BlockStmtOrExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_bool(&mut self, node: &Bool) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_break_stmt(&mut self, node: &BreakStmt) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_call_expr(&mut self, node: &CallExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_callee(&mut self, node: &Callee<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_catch_clause(&mut self, node: &CatchClause<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_class(&mut self, node: &Class<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_class_decl(&mut self, node: &ClassDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_class_expr(&mut self, node: &ClassExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_class_member(&mut self, node: &ClassMember<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_class_members(&mut self, node: &[ClassMember<'a>]) { + <[ClassMember<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_class_method(&mut self, node: &ClassMethod<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_class_prop(&mut self, node: &ClassProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_computed_prop_name(&mut self, node: &ComputedPropName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_cond_expr(&mut self, node: &CondExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_constructor(&mut self, node: &Constructor<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_continue_stmt(&mut self, node: &ContinueStmt) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_debugger_stmt(&mut self, node: &DebuggerStmt) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_decl(&mut self, node: &Decl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_decorator(&mut self, node: &Decorator<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::visit_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_decorators(&mut self, node: &[Decorator<'a>]) { + <[Decorator<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_default_decl(&mut self, node: &DefaultDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_do_while_stmt(&mut self, node: &DoWhileStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_empty_stmt(&mut self, node: &EmptyStmt) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_export_all(&mut self, node: &ExportAll<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_export_decl(&mut self, node: &ExportDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_export_default_specifier(&mut self, node: &ExportDefaultSpecifier) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_export_named_specifier(&mut self, node: &ExportNamedSpecifier<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_export_namespace_specifier(&mut self, node: &ExportNamespaceSpecifier<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_export_specifier(&mut self, node: &ExportSpecifier<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_export_specifiers(&mut self, node: &[ExportSpecifier<'a>]) { + <[ExportSpecifier<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_expr(&mut self, node: &Expr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_expr_or_spread(&mut self, node: &ExprOrSpread<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_expr_or_spreads(&mut self, node: &[ExprOrSpread<'a>]) { + <[ExprOrSpread<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_expr_stmt(&mut self, node: &ExprStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_exprs(&mut self, node: &[Expr<'a>]) { + <[Expr<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_fn_decl(&mut self, node: &FnDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_fn_expr(&mut self, node: &FnExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_for_head(&mut self, node: &ForHead<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_for_in_stmt(&mut self, node: &ForInStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_for_of_stmt(&mut self, node: &ForOfStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_for_stmt(&mut self, node: &ForStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_function(&mut self, node: &Function<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_getter_prop(&mut self, node: &GetterProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ident(&mut self, node: &Ident) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ident_name(&mut self, node: &IdentName) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_if_stmt(&mut self, node: &IfStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_import(&mut self, node: &Import) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_import_decl(&mut self, node: &ImportDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_import_phase(&mut self, node: &ImportPhase) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_import_specifier(&mut self, node: &ImportSpecifier<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_import_specifiers(&mut self, node: &[ImportSpecifier<'a>]) { + <[ImportSpecifier<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_import_with(&mut self, node: &ImportWith<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_import_with_item(&mut self, node: &ImportWithItem) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_import_with_items(&mut self, node: &[ImportWithItem]) { + <[ImportWithItem] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_invalid(&mut self, node: &Invalid) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_attr(&mut self, node: &JSXAttr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_attr_name(&mut self, node: &JSXAttrName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_attr_or_spread(&mut self, node: &JSXAttrOrSpread<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_attr_or_spreads(&mut self, node: &[JSXAttrOrSpread<'a>]) { + <[JSXAttrOrSpread<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_attr_value(&mut self, node: &JSXAttrValue<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_jsx_closing_element(&mut self, node: &JSXClosingElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_closing_fragment(&mut self, node: &JSXClosingFragment) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_element(&mut self, node: &JSXElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_element_child(&mut self, node: &JSXElementChild<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_element_childs(&mut self, node: &[JSXElementChild<'a>]) { + <[JSXElementChild<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_element_name(&mut self, node: &JSXElementName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_jsx_empty_expr(&mut self, node: &JSXEmptyExpr) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_expr(&mut self, node: &JSXExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_expr_container(&mut self, node: &JSXExprContainer<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_fragment(&mut self, node: &JSXFragment<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_member_expr(&mut self, node: &JSXMemberExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_namespaced_name(&mut self, node: &JSXNamespacedName) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_object(&mut self, node: &JSXObject<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_jsx_opening_element(&mut self, node: &JSXOpeningElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_opening_fragment(&mut self, node: &JSXOpeningFragment) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_spread_child(&mut self, node: &JSXSpreadChild<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_jsx_text(&mut self, node: &JSXText) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_key(&mut self, node: &Key<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_key_value_pat_prop(&mut self, node: &KeyValuePatProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_key_value_prop(&mut self, node: &KeyValueProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_labeled_stmt(&mut self, node: &LabeledStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_lit(&mut self, node: &Lit<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_member_expr(&mut self, node: &MemberExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_member_prop(&mut self, node: &MemberProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_meta_prop_expr(&mut self, node: &MetaPropExpr) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_meta_prop_kind(&mut self, node: &MetaPropKind) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_method_kind(&mut self, node: &MethodKind) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_method_prop(&mut self, node: &MethodProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_module(&mut self, node: &Module<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_module_decl(&mut self, node: &ModuleDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_module_export_name(&mut self, node: &ModuleExportName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_module_item(&mut self, node: &ModuleItem<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_module_items(&mut self, node: &[ModuleItem<'a>]) { + <[ModuleItem<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_named_export(&mut self, node: &NamedExport<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_new_expr(&mut self, node: &NewExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_null(&mut self, node: &Null) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_number(&mut self, node: &Number) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_object_lit(&mut self, node: &ObjectLit<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_object_pat(&mut self, node: &ObjectPat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_object_pat_prop(&mut self, node: &ObjectPatProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_object_pat_props(&mut self, node: &[ObjectPatProp<'a>]) { + <[ObjectPatProp<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_opt_accessibility(&mut self, node: &Option) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_atom(&mut self, node: &Option) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_block_stmt(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_call(&mut self, node: &OptCall<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::visit_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_opt_catch_clause(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_opt_chain_base(&mut self, node: &OptChainBase<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_opt_chain_expr(&mut self, node: &OptChainExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_opt_expr(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_expr_or_spread(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_expr_or_spreads(&mut self, node: &Option>>) { + >> as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ident(&mut self, node: &Option) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_jsx_attr_value(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_jsx_closing_element(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_module_export_name(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > >::visit_children_with`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_object_lit(&mut self, node: &Option>>) { + >> as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_opt_pat(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::visit_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_opt_span(&mut self, node: &Option) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_opt_stmt(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_str(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_opt_true_plus_minus(&mut self, node: &Option) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_entity_name(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_namespace_body(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_opt_ts_type(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > >::visit_children_with`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_type_ann(&mut self, node: &Option>>) { + >> as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_type_param_decl(&mut self, node: &Option>>) { + >> as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_type_param_instantiation( + &mut self, + node: &Option>>, + ) { + >> as VisitWith>::visit_children_with( + node, self, + ) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_var_decl_or_expr(&mut self, node: &Option>) { + > as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_vec_expr_or_spreads(&mut self, node: &[Option>]) { + <[Option>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_vec_pats(&mut self, node: &[Option>]) { + <[Option>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_param(&mut self, node: &Param<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_param_or_ts_param_prop(&mut self, node: &ParamOrTsParamProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_param_or_ts_param_props(&mut self, node: &[ParamOrTsParamProp<'a>]) { + <[ParamOrTsParamProp<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_params(&mut self, node: &[Param<'a>]) { + <[Param<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_paren_expr(&mut self, node: &ParenExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_pat(&mut self, node: &Pat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_pats(&mut self, node: &[Pat<'a>]) { + <[Pat<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_private_method(&mut self, node: &PrivateMethod<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_private_name(&mut self, node: &PrivateName) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_private_prop(&mut self, node: &PrivateProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_program(&mut self, node: &Program<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_prop(&mut self, node: &Prop<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_prop_name(&mut self, node: &PropName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_prop_or_spread(&mut self, node: &PropOrSpread<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_prop_or_spreads(&mut self, node: &[PropOrSpread<'a>]) { + <[PropOrSpread<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_regex(&mut self, node: &Regex) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_rest_pat(&mut self, node: &RestPat<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_return_stmt(&mut self, node: &ReturnStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_script(&mut self, node: &Script<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_seq_expr(&mut self, node: &SeqExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_setter_prop(&mut self, node: &SetterProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_simple_assign_target(&mut self, node: &SimpleAssignTarget<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_span(&mut self, node: &swc_common::Span) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_spread_element(&mut self, node: &SpreadElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_static_block(&mut self, node: &StaticBlock<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_stmt(&mut self, node: &Stmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_stmts(&mut self, node: &[Stmt<'a>]) { + <[Stmt<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_str(&mut self, node: &Str) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_super(&mut self, node: &Super) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_super_prop(&mut self, node: &SuperProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_super_prop_expr(&mut self, node: &SuperPropExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_switch_case(&mut self, node: &SwitchCase<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_switch_cases(&mut self, node: &[SwitchCase<'a>]) { + <[SwitchCase<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_switch_stmt(&mut self, node: &SwitchStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_syntax_context(&mut self, node: &swc_common::SyntaxContext) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_tagged_tpl(&mut self, node: &TaggedTpl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_this_expr(&mut self, node: &ThisExpr) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_throw_stmt(&mut self, node: &ThrowStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_tpl(&mut self, node: &Tpl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_tpl_element(&mut self, node: &TplElement) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_tpl_elements(&mut self, node: &[TplElement]) { + <[TplElement] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_true_plus_minus(&mut self, node: &TruePlusMinus) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_try_stmt(&mut self, node: &TryStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_array_type(&mut self, node: &TsArrayType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_as_expr(&mut self, node: &TsAsExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_call_signature_decl(&mut self, node: &TsCallSignatureDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_conditional_type(&mut self, node: &TsConditionalType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_const_assertion(&mut self, node: &TsConstAssertion<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_construct_signature_decl(&mut self, node: &TsConstructSignatureDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_constructor_type(&mut self, node: &TsConstructorType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_entity_name(&mut self, node: &TsEntityName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_enum_decl(&mut self, node: &TsEnumDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_enum_member(&mut self, node: &TsEnumMember<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_enum_member_id(&mut self, node: &TsEnumMemberId<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_enum_members(&mut self, node: &[TsEnumMember<'a>]) { + <[TsEnumMember<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_export_assignment(&mut self, node: &TsExportAssignment<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_expr_with_type_args(&mut self, node: &TsExprWithTypeArgs<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > >::visit_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_expr_with_type_argss(&mut self, node: &[TsExprWithTypeArgs<'a>]) { + <[TsExprWithTypeArgs<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_external_module_ref(&mut self, node: &TsExternalModuleRef) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::visit_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_fn_or_constructor_type(&mut self, node: &TsFnOrConstructorType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_fn_param(&mut self, node: &TsFnParam<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::visit_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_fn_params(&mut self, node: &[TsFnParam<'a>]) { + <[TsFnParam<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_fn_type(&mut self, node: &TsFnType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_getter_signature(&mut self, node: &TsGetterSignature<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_import_equals_decl(&mut self, node: &TsImportEqualsDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_import_type(&mut self, node: &TsImportType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_index_signature(&mut self, node: &TsIndexSignature<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_indexed_access_type(&mut self, node: &TsIndexedAccessType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_infer_type(&mut self, node: &TsInferType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_instantiation(&mut self, node: &TsInstantiation<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_interface_body(&mut self, node: &TsInterfaceBody<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_interface_decl(&mut self, node: &TsInterfaceDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_intersection_type(&mut self, node: &TsIntersectionType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_keyword_type(&mut self, node: &TsKeywordType) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_keyword_type_kind(&mut self, node: &TsKeywordTypeKind) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_lit(&mut self, node: &TsLit<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_lit_type(&mut self, node: &TsLitType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_mapped_type(&mut self, node: &TsMappedType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_method_signature(&mut self, node: &TsMethodSignature<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_module_block(&mut self, node: &TsModuleBlock<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_module_decl(&mut self, node: &TsModuleDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_module_name(&mut self, node: &TsModuleName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_module_ref(&mut self, node: &TsModuleRef<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_namespace_body(&mut self, node: &TsNamespaceBody<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_namespace_decl(&mut self, node: &TsNamespaceDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_namespace_export_decl(&mut self, node: &TsNamespaceExportDecl) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_non_null_expr(&mut self, node: &TsNonNullExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_optional_type(&mut self, node: &TsOptionalType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_param_prop(&mut self, node: &TsParamProp<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_param_prop_param(&mut self, node: &TsParamPropParam<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_parenthesized_type(&mut self, node: &TsParenthesizedType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_property_signature(&mut self, node: &TsPropertySignature<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_qualified_name(&mut self, node: &TsQualifiedName<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_rest_type(&mut self, node: &TsRestType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_satisfies_expr(&mut self, node: &TsSatisfiesExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_setter_signature(&mut self, node: &TsSetterSignature<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_this_type(&mut self, node: &TsThisType) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_this_type_or_ident(&mut self, node: &TsThisTypeOrIdent<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_tpl_lit_type(&mut self, node: &TsTplLitType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_tuple_element(&mut self, node: &TsTupleElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_tuple_elements(&mut self, node: &[TsTupleElement<'a>]) { + <[TsTupleElement<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_tuple_type(&mut self, node: &TsTupleType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type(&mut self, node: &TsType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_alias_decl(&mut self, node: &TsTypeAliasDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_ann(&mut self, node: &TsTypeAnn<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_assertion(&mut self, node: &TsTypeAssertion<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_element(&mut self, node: &TsTypeElement<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_elements(&mut self, node: &[TsTypeElement<'a>]) { + <[TsTypeElement<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_lit(&mut self, node: &TsTypeLit<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_operator(&mut self, node: &TsTypeOperator<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_type_operator_op(&mut self, node: &TsTypeOperatorOp) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_type_param(&mut self, node: &TsTypeParam<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_param_decl(&mut self, node: &TsTypeParamDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_param_instantiation(&mut self, node: &TsTypeParamInstantiation<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_params(&mut self, node: &[TsTypeParam<'a>]) { + <[TsTypeParam<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_predicate(&mut self, node: &TsTypePredicate<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_type_query(&mut self, node: &TsTypeQuery<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_type_query_expr(&mut self, node: &TsTypeQueryExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_ref(&mut self, node: &TsTypeRef<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::visit_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_types(&mut self, node: &[TsType<'a>]) { + <[TsType<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_union_or_intersection_type(&mut self, node: &TsUnionOrIntersectionType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ts_union_type(&mut self, node: &TsUnionType<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_unary_expr(&mut self, node: &UnaryExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_unary_op(&mut self, node: &UnaryOp) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::visit_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_update_expr(&mut self, node: &UpdateExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_update_op(&mut self, node: &UpdateOp) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_using_decl(&mut self, node: &UsingDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_var_decl(&mut self, node: &VarDecl<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::visit_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_var_decl_kind(&mut self, node: &VarDeclKind) { + >::visit_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_var_decl_or_expr(&mut self, node: &VarDeclOrExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::visit_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_var_declarator(&mut self, node: &VarDeclarator<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::visit_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_var_declarators(&mut self, node: &[VarDeclarator<'a>]) { + <[VarDeclarator<'a>] as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_while_stmt(&mut self, node: &WhileStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_with_stmt(&mut self, node: &WithStmt<'a>) { + as VisitWith>::visit_children_with(node, self) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::visit_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_yield_expr(&mut self, node: &YieldExpr<'a>) { + as VisitWith>::visit_children_with(node, self) + } +} +impl<'a, V> Visit<'a> for &mut V +where + V: ?Sized + Visit<'a>, +{ + #[inline] + fn visit_accessibility(&mut self, node: &Accessibility) { + ::visit_accessibility(&mut **self, node) + } + + #[inline] + fn visit_array_lit(&mut self, node: &ArrayLit<'a>) { + ::visit_array_lit(&mut **self, node) + } + + #[inline] + fn visit_array_pat(&mut self, node: &ArrayPat<'a>) { + ::visit_array_pat(&mut **self, node) + } + + #[inline] + fn visit_arrow_expr(&mut self, node: &ArrowExpr<'a>) { + ::visit_arrow_expr(&mut **self, node) + } + + #[inline] + fn visit_assign_expr(&mut self, node: &AssignExpr<'a>) { + ::visit_assign_expr(&mut **self, node) + } + + #[inline] + fn visit_assign_op(&mut self, node: &AssignOp) { + ::visit_assign_op(&mut **self, node) + } + + #[inline] + fn visit_assign_pat(&mut self, node: &AssignPat<'a>) { + ::visit_assign_pat(&mut **self, node) + } + + #[inline] + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp<'a>) { + ::visit_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_assign_prop(&mut self, node: &AssignProp<'a>) { + ::visit_assign_prop(&mut **self, node) + } + + #[inline] + fn visit_assign_target(&mut self, node: &AssignTarget<'a>) { + ::visit_assign_target(&mut **self, node) + } + + #[inline] + fn visit_assign_target_pat(&mut self, node: &AssignTargetPat<'a>) { + ::visit_assign_target_pat(&mut **self, node) + } + + #[inline] + fn visit_atom(&mut self, node: &swc_atoms::Atom) { + ::visit_atom(&mut **self, node) + } + + #[inline] + fn visit_auto_accessor(&mut self, node: &AutoAccessor<'a>) { + ::visit_auto_accessor(&mut **self, node) + } + + #[inline] + fn visit_await_expr(&mut self, node: &AwaitExpr<'a>) { + ::visit_await_expr(&mut **self, node) + } + + #[inline] + fn visit_big_int(&mut self, node: &BigInt<'a>) { + ::visit_big_int(&mut **self, node) + } + + #[inline] + fn visit_big_int_value(&mut self, node: &BigIntValue) { + ::visit_big_int_value(&mut **self, node) + } + + #[inline] + fn visit_bin_expr(&mut self, node: &BinExpr<'a>) { + ::visit_bin_expr(&mut **self, node) + } + + #[inline] + fn visit_binary_op(&mut self, node: &BinaryOp) { + ::visit_binary_op(&mut **self, node) + } + + #[inline] + fn visit_binding_ident(&mut self, node: &BindingIdent<'a>) { + ::visit_binding_ident(&mut **self, node) + } + + #[inline] + fn visit_block_stmt(&mut self, node: &BlockStmt<'a>) { + ::visit_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_block_stmt_or_expr(&mut self, node: &BlockStmtOrExpr<'a>) { + ::visit_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn visit_bool(&mut self, node: &Bool) { + ::visit_bool(&mut **self, node) + } + + #[inline] + fn visit_break_stmt(&mut self, node: &BreakStmt) { + ::visit_break_stmt(&mut **self, node) + } + + #[inline] + fn visit_call_expr(&mut self, node: &CallExpr<'a>) { + ::visit_call_expr(&mut **self, node) + } + + #[inline] + fn visit_callee(&mut self, node: &Callee<'a>) { + ::visit_callee(&mut **self, node) + } + + #[inline] + fn visit_catch_clause(&mut self, node: &CatchClause<'a>) { + ::visit_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_class(&mut self, node: &Class<'a>) { + ::visit_class(&mut **self, node) + } + + #[inline] + fn visit_class_decl(&mut self, node: &ClassDecl<'a>) { + ::visit_class_decl(&mut **self, node) + } + + #[inline] + fn visit_class_expr(&mut self, node: &ClassExpr<'a>) { + ::visit_class_expr(&mut **self, node) + } + + #[inline] + fn visit_class_member(&mut self, node: &ClassMember<'a>) { + ::visit_class_member(&mut **self, node) + } + + #[inline] + fn visit_class_members(&mut self, node: &[ClassMember<'a>]) { + ::visit_class_members(&mut **self, node) + } + + #[inline] + fn visit_class_method(&mut self, node: &ClassMethod<'a>) { + ::visit_class_method(&mut **self, node) + } + + #[inline] + fn visit_class_prop(&mut self, node: &ClassProp<'a>) { + ::visit_class_prop(&mut **self, node) + } + + #[inline] + fn visit_computed_prop_name(&mut self, node: &ComputedPropName<'a>) { + ::visit_computed_prop_name(&mut **self, node) + } + + #[inline] + fn visit_cond_expr(&mut self, node: &CondExpr<'a>) { + ::visit_cond_expr(&mut **self, node) + } + + #[inline] + fn visit_constructor(&mut self, node: &Constructor<'a>) { + ::visit_constructor(&mut **self, node) + } + + #[inline] + fn visit_continue_stmt(&mut self, node: &ContinueStmt) { + ::visit_continue_stmt(&mut **self, node) + } + + #[inline] + fn visit_debugger_stmt(&mut self, node: &DebuggerStmt) { + ::visit_debugger_stmt(&mut **self, node) + } + + #[inline] + fn visit_decl(&mut self, node: &Decl<'a>) { + ::visit_decl(&mut **self, node) + } + + #[inline] + fn visit_decorator(&mut self, node: &Decorator<'a>) { + ::visit_decorator(&mut **self, node) + } + + #[inline] + fn visit_decorators(&mut self, node: &[Decorator<'a>]) { + ::visit_decorators(&mut **self, node) + } + + #[inline] + fn visit_default_decl(&mut self, node: &DefaultDecl<'a>) { + ::visit_default_decl(&mut **self, node) + } + + #[inline] + fn visit_do_while_stmt(&mut self, node: &DoWhileStmt<'a>) { + ::visit_do_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_empty_stmt(&mut self, node: &EmptyStmt) { + ::visit_empty_stmt(&mut **self, node) + } + + #[inline] + fn visit_export_all(&mut self, node: &ExportAll<'a>) { + ::visit_export_all(&mut **self, node) + } + + #[inline] + fn visit_export_decl(&mut self, node: &ExportDecl<'a>) { + ::visit_export_decl(&mut **self, node) + } + + #[inline] + fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl<'a>) { + ::visit_export_default_decl(&mut **self, node) + } + + #[inline] + fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr<'a>) { + ::visit_export_default_expr(&mut **self, node) + } + + #[inline] + fn visit_export_default_specifier(&mut self, node: &ExportDefaultSpecifier) { + ::visit_export_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_named_specifier(&mut self, node: &ExportNamedSpecifier<'a>) { + ::visit_export_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_namespace_specifier(&mut self, node: &ExportNamespaceSpecifier<'a>) { + ::visit_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_specifier(&mut self, node: &ExportSpecifier<'a>) { + ::visit_export_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_specifiers(&mut self, node: &[ExportSpecifier<'a>]) { + ::visit_export_specifiers(&mut **self, node) + } + + #[inline] + fn visit_expr(&mut self, node: &Expr<'a>) { + ::visit_expr(&mut **self, node) + } + + #[inline] + fn visit_expr_or_spread(&mut self, node: &ExprOrSpread<'a>) { + ::visit_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_expr_or_spreads(&mut self, node: &[ExprOrSpread<'a>]) { + ::visit_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_expr_stmt(&mut self, node: &ExprStmt<'a>) { + ::visit_expr_stmt(&mut **self, node) + } + + #[inline] + fn visit_exprs(&mut self, node: &[Expr<'a>]) { + ::visit_exprs(&mut **self, node) + } + + #[inline] + fn visit_fn_decl(&mut self, node: &FnDecl<'a>) { + ::visit_fn_decl(&mut **self, node) + } + + #[inline] + fn visit_fn_expr(&mut self, node: &FnExpr<'a>) { + ::visit_fn_expr(&mut **self, node) + } + + #[inline] + fn visit_for_head(&mut self, node: &ForHead<'a>) { + ::visit_for_head(&mut **self, node) + } + + #[inline] + fn visit_for_in_stmt(&mut self, node: &ForInStmt<'a>) { + ::visit_for_in_stmt(&mut **self, node) + } + + #[inline] + fn visit_for_of_stmt(&mut self, node: &ForOfStmt<'a>) { + ::visit_for_of_stmt(&mut **self, node) + } + + #[inline] + fn visit_for_stmt(&mut self, node: &ForStmt<'a>) { + ::visit_for_stmt(&mut **self, node) + } + + #[inline] + fn visit_function(&mut self, node: &Function<'a>) { + ::visit_function(&mut **self, node) + } + + #[inline] + fn visit_getter_prop(&mut self, node: &GetterProp<'a>) { + ::visit_getter_prop(&mut **self, node) + } + + #[inline] + fn visit_ident(&mut self, node: &Ident) { + ::visit_ident(&mut **self, node) + } + + #[inline] + fn visit_ident_name(&mut self, node: &IdentName) { + ::visit_ident_name(&mut **self, node) + } + + #[inline] + fn visit_if_stmt(&mut self, node: &IfStmt<'a>) { + ::visit_if_stmt(&mut **self, node) + } + + #[inline] + fn visit_import(&mut self, node: &Import) { + ::visit_import(&mut **self, node) + } + + #[inline] + fn visit_import_decl(&mut self, node: &ImportDecl<'a>) { + ::visit_import_decl(&mut **self, node) + } + + #[inline] + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + ::visit_import_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier<'a>) { + ::visit_import_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_phase(&mut self, node: &ImportPhase) { + ::visit_import_phase(&mut **self, node) + } + + #[inline] + fn visit_import_specifier(&mut self, node: &ImportSpecifier<'a>) { + ::visit_import_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_specifiers(&mut self, node: &[ImportSpecifier<'a>]) { + ::visit_import_specifiers(&mut **self, node) + } + + #[inline] + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + ::visit_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_with(&mut self, node: &ImportWith<'a>) { + ::visit_import_with(&mut **self, node) + } + + #[inline] + fn visit_import_with_item(&mut self, node: &ImportWithItem) { + ::visit_import_with_item(&mut **self, node) + } + + #[inline] + fn visit_import_with_items(&mut self, node: &[ImportWithItem]) { + ::visit_import_with_items(&mut **self, node) + } + + #[inline] + fn visit_invalid(&mut self, node: &Invalid) { + ::visit_invalid(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr(&mut self, node: &JSXAttr<'a>) { + ::visit_jsx_attr(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_name(&mut self, node: &JSXAttrName<'a>) { + ::visit_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_or_spread(&mut self, node: &JSXAttrOrSpread<'a>) { + ::visit_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_or_spreads(&mut self, node: &[JSXAttrOrSpread<'a>]) { + ::visit_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_value(&mut self, node: &JSXAttrValue<'a>) { + ::visit_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_jsx_closing_element(&mut self, node: &JSXClosingElement<'a>) { + ::visit_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_closing_fragment(&mut self, node: &JSXClosingFragment) { + ::visit_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_element(&mut self, node: &JSXElement<'a>) { + ::visit_jsx_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_child(&mut self, node: &JSXElementChild<'a>) { + ::visit_jsx_element_child(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_childs(&mut self, node: &[JSXElementChild<'a>]) { + ::visit_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_name(&mut self, node: &JSXElementName<'a>) { + ::visit_jsx_element_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_empty_expr(&mut self, node: &JSXEmptyExpr) { + ::visit_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_expr(&mut self, node: &JSXExpr<'a>) { + ::visit_jsx_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_expr_container(&mut self, node: &JSXExprContainer<'a>) { + ::visit_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn visit_jsx_fragment(&mut self, node: &JSXFragment<'a>) { + ::visit_jsx_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_member_expr(&mut self, node: &JSXMemberExpr<'a>) { + ::visit_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_namespaced_name(&mut self, node: &JSXNamespacedName) { + ::visit_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_object(&mut self, node: &JSXObject<'a>) { + ::visit_jsx_object(&mut **self, node) + } + + #[inline] + fn visit_jsx_opening_element(&mut self, node: &JSXOpeningElement<'a>) { + ::visit_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_opening_fragment(&mut self, node: &JSXOpeningFragment) { + ::visit_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_spread_child(&mut self, node: &JSXSpreadChild<'a>) { + ::visit_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn visit_jsx_text(&mut self, node: &JSXText) { + ::visit_jsx_text(&mut **self, node) + } + + #[inline] + fn visit_key(&mut self, node: &Key<'a>) { + ::visit_key(&mut **self, node) + } + + #[inline] + fn visit_key_value_pat_prop(&mut self, node: &KeyValuePatProp<'a>) { + ::visit_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_key_value_prop(&mut self, node: &KeyValueProp<'a>) { + ::visit_key_value_prop(&mut **self, node) + } + + #[inline] + fn visit_labeled_stmt(&mut self, node: &LabeledStmt<'a>) { + ::visit_labeled_stmt(&mut **self, node) + } + + #[inline] + fn visit_lit(&mut self, node: &Lit<'a>) { + ::visit_lit(&mut **self, node) + } + + #[inline] + fn visit_member_expr(&mut self, node: &MemberExpr<'a>) { + ::visit_member_expr(&mut **self, node) + } + + #[inline] + fn visit_member_prop(&mut self, node: &MemberProp<'a>) { + ::visit_member_prop(&mut **self, node) + } + + #[inline] + fn visit_meta_prop_expr(&mut self, node: &MetaPropExpr) { + ::visit_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_meta_prop_kind(&mut self, node: &MetaPropKind) { + ::visit_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn visit_method_kind(&mut self, node: &MethodKind) { + ::visit_method_kind(&mut **self, node) + } + + #[inline] + fn visit_method_prop(&mut self, node: &MethodProp<'a>) { + ::visit_method_prop(&mut **self, node) + } + + #[inline] + fn visit_module(&mut self, node: &Module<'a>) { + ::visit_module(&mut **self, node) + } + + #[inline] + fn visit_module_decl(&mut self, node: &ModuleDecl<'a>) { + ::visit_module_decl(&mut **self, node) + } + + #[inline] + fn visit_module_export_name(&mut self, node: &ModuleExportName<'a>) { + ::visit_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_module_item(&mut self, node: &ModuleItem<'a>) { + ::visit_module_item(&mut **self, node) + } + + #[inline] + fn visit_module_items(&mut self, node: &[ModuleItem<'a>]) { + ::visit_module_items(&mut **self, node) + } + + #[inline] + fn visit_named_export(&mut self, node: &NamedExport<'a>) { + ::visit_named_export(&mut **self, node) + } + + #[inline] + fn visit_new_expr(&mut self, node: &NewExpr<'a>) { + ::visit_new_expr(&mut **self, node) + } + + #[inline] + fn visit_null(&mut self, node: &Null) { + ::visit_null(&mut **self, node) + } + + #[inline] + fn visit_number(&mut self, node: &Number) { + ::visit_number(&mut **self, node) + } + + #[inline] + fn visit_object_lit(&mut self, node: &ObjectLit<'a>) { + ::visit_object_lit(&mut **self, node) + } + + #[inline] + fn visit_object_pat(&mut self, node: &ObjectPat<'a>) { + ::visit_object_pat(&mut **self, node) + } + + #[inline] + fn visit_object_pat_prop(&mut self, node: &ObjectPatProp<'a>) { + ::visit_object_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_object_pat_props(&mut self, node: &[ObjectPatProp<'a>]) { + ::visit_object_pat_props(&mut **self, node) + } + + #[inline] + fn visit_opt_accessibility(&mut self, node: &Option) { + ::visit_opt_accessibility(&mut **self, node) + } + + #[inline] + fn visit_opt_atom(&mut self, node: &Option) { + ::visit_opt_atom(&mut **self, node) + } + + #[inline] + fn visit_opt_block_stmt(&mut self, node: &Option>) { + ::visit_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_opt_call(&mut self, node: &OptCall<'a>) { + ::visit_opt_call(&mut **self, node) + } + + #[inline] + fn visit_opt_catch_clause(&mut self, node: &Option>) { + ::visit_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_opt_chain_base(&mut self, node: &OptChainBase<'a>) { + ::visit_opt_chain_base(&mut **self, node) + } + + #[inline] + fn visit_opt_chain_expr(&mut self, node: &OptChainExpr<'a>) { + ::visit_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_expr(&mut self, node: &Option>) { + ::visit_opt_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_expr_or_spread(&mut self, node: &Option>) { + ::visit_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_opt_expr_or_spreads(&mut self, node: &Option>>) { + ::visit_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_opt_ident(&mut self, node: &Option) { + ::visit_opt_ident(&mut **self, node) + } + + #[inline] + fn visit_opt_jsx_attr_value(&mut self, node: &Option>) { + ::visit_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_opt_jsx_closing_element(&mut self, node: &Option>) { + ::visit_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_opt_module_export_name(&mut self, node: &Option>) { + ::visit_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_opt_object_lit(&mut self, node: &Option>>) { + ::visit_opt_object_lit(&mut **self, node) + } + + #[inline] + fn visit_opt_pat(&mut self, node: &Option>) { + ::visit_opt_pat(&mut **self, node) + } + + #[inline] + fn visit_opt_span(&mut self, node: &Option) { + ::visit_opt_span(&mut **self, node) + } + + #[inline] + fn visit_opt_stmt(&mut self, node: &Option>) { + ::visit_opt_stmt(&mut **self, node) + } + + #[inline] + fn visit_opt_str(&mut self, node: &Option>) { + ::visit_opt_str(&mut **self, node) + } + + #[inline] + fn visit_opt_true_plus_minus(&mut self, node: &Option) { + ::visit_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_entity_name(&mut self, node: &Option>) { + ::visit_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_namespace_body(&mut self, node: &Option>) { + ::visit_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type(&mut self, node: &Option>) { + ::visit_opt_ts_type(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_ann(&mut self, node: &Option>>) { + ::visit_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_param_decl(&mut self, node: &Option>>) { + ::visit_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_param_instantiation( + &mut self, + node: &Option>>, + ) { + ::visit_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_opt_var_decl_or_expr(&mut self, node: &Option>) { + ::visit_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_vec_expr_or_spreads(&mut self, node: &[Option>]) { + ::visit_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_opt_vec_pats(&mut self, node: &[Option>]) { + ::visit_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn visit_param(&mut self, node: &Param<'a>) { + ::visit_param(&mut **self, node) + } + + #[inline] + fn visit_param_or_ts_param_prop(&mut self, node: &ParamOrTsParamProp<'a>) { + ::visit_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_param_or_ts_param_props(&mut self, node: &[ParamOrTsParamProp<'a>]) { + ::visit_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn visit_params(&mut self, node: &[Param<'a>]) { + ::visit_params(&mut **self, node) + } + + #[inline] + fn visit_paren_expr(&mut self, node: &ParenExpr<'a>) { + ::visit_paren_expr(&mut **self, node) + } + + #[inline] + fn visit_pat(&mut self, node: &Pat<'a>) { + ::visit_pat(&mut **self, node) + } + + #[inline] + fn visit_pats(&mut self, node: &[Pat<'a>]) { + ::visit_pats(&mut **self, node) + } + + #[inline] + fn visit_private_method(&mut self, node: &PrivateMethod<'a>) { + ::visit_private_method(&mut **self, node) + } + + #[inline] + fn visit_private_name(&mut self, node: &PrivateName) { + ::visit_private_name(&mut **self, node) + } + + #[inline] + fn visit_private_prop(&mut self, node: &PrivateProp<'a>) { + ::visit_private_prop(&mut **self, node) + } + + #[inline] + fn visit_program(&mut self, node: &Program<'a>) { + ::visit_program(&mut **self, node) + } + + #[inline] + fn visit_prop(&mut self, node: &Prop<'a>) { + ::visit_prop(&mut **self, node) + } + + #[inline] + fn visit_prop_name(&mut self, node: &PropName<'a>) { + ::visit_prop_name(&mut **self, node) + } + + #[inline] + fn visit_prop_or_spread(&mut self, node: &PropOrSpread<'a>) { + ::visit_prop_or_spread(&mut **self, node) + } + + #[inline] + fn visit_prop_or_spreads(&mut self, node: &[PropOrSpread<'a>]) { + ::visit_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_regex(&mut self, node: &Regex) { + ::visit_regex(&mut **self, node) + } + + #[inline] + fn visit_rest_pat(&mut self, node: &RestPat<'a>) { + ::visit_rest_pat(&mut **self, node) + } + + #[inline] + fn visit_return_stmt(&mut self, node: &ReturnStmt<'a>) { + ::visit_return_stmt(&mut **self, node) + } + + #[inline] + fn visit_script(&mut self, node: &Script<'a>) { + ::visit_script(&mut **self, node) + } + + #[inline] + fn visit_seq_expr(&mut self, node: &SeqExpr<'a>) { + ::visit_seq_expr(&mut **self, node) + } + + #[inline] + fn visit_setter_prop(&mut self, node: &SetterProp<'a>) { + ::visit_setter_prop(&mut **self, node) + } + + #[inline] + fn visit_simple_assign_target(&mut self, node: &SimpleAssignTarget<'a>) { + ::visit_simple_assign_target(&mut **self, node) + } + + #[inline] + fn visit_span(&mut self, node: &swc_common::Span) { + ::visit_span(&mut **self, node) + } + + #[inline] + fn visit_spread_element(&mut self, node: &SpreadElement<'a>) { + ::visit_spread_element(&mut **self, node) + } + + #[inline] + fn visit_static_block(&mut self, node: &StaticBlock<'a>) { + ::visit_static_block(&mut **self, node) + } + + #[inline] + fn visit_stmt(&mut self, node: &Stmt<'a>) { + ::visit_stmt(&mut **self, node) + } + + #[inline] + fn visit_stmts(&mut self, node: &[Stmt<'a>]) { + ::visit_stmts(&mut **self, node) + } + + #[inline] + fn visit_str(&mut self, node: &Str) { + ::visit_str(&mut **self, node) + } + + #[inline] + fn visit_super(&mut self, node: &Super) { + ::visit_super(&mut **self, node) + } + + #[inline] + fn visit_super_prop(&mut self, node: &SuperProp<'a>) { + ::visit_super_prop(&mut **self, node) + } + + #[inline] + fn visit_super_prop_expr(&mut self, node: &SuperPropExpr<'a>) { + ::visit_super_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_switch_case(&mut self, node: &SwitchCase<'a>) { + ::visit_switch_case(&mut **self, node) + } + + #[inline] + fn visit_switch_cases(&mut self, node: &[SwitchCase<'a>]) { + ::visit_switch_cases(&mut **self, node) + } + + #[inline] + fn visit_switch_stmt(&mut self, node: &SwitchStmt<'a>) { + ::visit_switch_stmt(&mut **self, node) + } + + #[inline] + fn visit_syntax_context(&mut self, node: &swc_common::SyntaxContext) { + ::visit_syntax_context(&mut **self, node) + } + + #[inline] + fn visit_tagged_tpl(&mut self, node: &TaggedTpl<'a>) { + ::visit_tagged_tpl(&mut **self, node) + } + + #[inline] + fn visit_this_expr(&mut self, node: &ThisExpr) { + ::visit_this_expr(&mut **self, node) + } + + #[inline] + fn visit_throw_stmt(&mut self, node: &ThrowStmt<'a>) { + ::visit_throw_stmt(&mut **self, node) + } + + #[inline] + fn visit_tpl(&mut self, node: &Tpl<'a>) { + ::visit_tpl(&mut **self, node) + } + + #[inline] + fn visit_tpl_element(&mut self, node: &TplElement) { + ::visit_tpl_element(&mut **self, node) + } + + #[inline] + fn visit_tpl_elements(&mut self, node: &[TplElement]) { + ::visit_tpl_elements(&mut **self, node) + } + + #[inline] + fn visit_true_plus_minus(&mut self, node: &TruePlusMinus) { + ::visit_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_try_stmt(&mut self, node: &TryStmt<'a>) { + ::visit_try_stmt(&mut **self, node) + } + + #[inline] + fn visit_ts_array_type(&mut self, node: &TsArrayType<'a>) { + ::visit_ts_array_type(&mut **self, node) + } + + #[inline] + fn visit_ts_as_expr(&mut self, node: &TsAsExpr<'a>) { + ::visit_ts_as_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_call_signature_decl(&mut self, node: &TsCallSignatureDecl<'a>) { + ::visit_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_conditional_type(&mut self, node: &TsConditionalType<'a>) { + ::visit_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn visit_ts_const_assertion(&mut self, node: &TsConstAssertion<'a>) { + ::visit_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn visit_ts_construct_signature_decl(&mut self, node: &TsConstructSignatureDecl<'a>) { + ::visit_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_constructor_type(&mut self, node: &TsConstructorType<'a>) { + ::visit_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_ts_entity_name(&mut self, node: &TsEntityName<'a>) { + ::visit_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_decl(&mut self, node: &TsEnumDecl<'a>) { + ::visit_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_member(&mut self, node: &TsEnumMember<'a>) { + ::visit_ts_enum_member(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_member_id(&mut self, node: &TsEnumMemberId<'a>) { + ::visit_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_members(&mut self, node: &[TsEnumMember<'a>]) { + ::visit_ts_enum_members(&mut **self, node) + } + + #[inline] + fn visit_ts_export_assignment(&mut self, node: &TsExportAssignment<'a>) { + ::visit_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn visit_ts_expr_with_type_args(&mut self, node: &TsExprWithTypeArgs<'a>) { + ::visit_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn visit_ts_expr_with_type_argss(&mut self, node: &[TsExprWithTypeArgs<'a>]) { + ::visit_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn visit_ts_external_module_ref(&mut self, node: &TsExternalModuleRef) { + ::visit_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_or_constructor_type(&mut self, node: &TsFnOrConstructorType<'a>) { + ::visit_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_param(&mut self, node: &TsFnParam<'a>) { + ::visit_ts_fn_param(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_params(&mut self, node: &[TsFnParam<'a>]) { + ::visit_ts_fn_params(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_type(&mut self, node: &TsFnType<'a>) { + ::visit_ts_fn_type(&mut **self, node) + } + + #[inline] + fn visit_ts_getter_signature(&mut self, node: &TsGetterSignature<'a>) { + ::visit_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_import_equals_decl(&mut self, node: &TsImportEqualsDecl<'a>) { + ::visit_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_import_type(&mut self, node: &TsImportType<'a>) { + ::visit_ts_import_type(&mut **self, node) + } + + #[inline] + fn visit_ts_index_signature(&mut self, node: &TsIndexSignature<'a>) { + ::visit_ts_index_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_indexed_access_type(&mut self, node: &TsIndexedAccessType<'a>) { + ::visit_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn visit_ts_infer_type(&mut self, node: &TsInferType<'a>) { + ::visit_ts_infer_type(&mut **self, node) + } + + #[inline] + fn visit_ts_instantiation(&mut self, node: &TsInstantiation<'a>) { + ::visit_ts_instantiation(&mut **self, node) + } + + #[inline] + fn visit_ts_interface_body(&mut self, node: &TsInterfaceBody<'a>) { + ::visit_ts_interface_body(&mut **self, node) + } + + #[inline] + fn visit_ts_interface_decl(&mut self, node: &TsInterfaceDecl<'a>) { + ::visit_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_intersection_type(&mut self, node: &TsIntersectionType<'a>) { + ::visit_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_ts_keyword_type(&mut self, node: &TsKeywordType) { + ::visit_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn visit_ts_keyword_type_kind(&mut self, node: &TsKeywordTypeKind) { + ::visit_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn visit_ts_lit(&mut self, node: &TsLit<'a>) { + ::visit_ts_lit(&mut **self, node) + } + + #[inline] + fn visit_ts_lit_type(&mut self, node: &TsLitType<'a>) { + ::visit_ts_lit_type(&mut **self, node) + } + + #[inline] + fn visit_ts_mapped_type(&mut self, node: &TsMappedType<'a>) { + ::visit_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn visit_ts_method_signature(&mut self, node: &TsMethodSignature<'a>) { + ::visit_ts_method_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_module_block(&mut self, node: &TsModuleBlock<'a>) { + ::visit_ts_module_block(&mut **self, node) + } + + #[inline] + fn visit_ts_module_decl(&mut self, node: &TsModuleDecl<'a>) { + ::visit_ts_module_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_module_name(&mut self, node: &TsModuleName<'a>) { + ::visit_ts_module_name(&mut **self, node) + } + + #[inline] + fn visit_ts_module_ref(&mut self, node: &TsModuleRef<'a>) { + ::visit_ts_module_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_body(&mut self, node: &TsNamespaceBody<'a>) { + ::visit_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_decl(&mut self, node: &TsNamespaceDecl<'a>) { + ::visit_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_export_decl(&mut self, node: &TsNamespaceExportDecl) { + ::visit_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_non_null_expr(&mut self, node: &TsNonNullExpr<'a>) { + ::visit_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_optional_type(&mut self, node: &TsOptionalType<'a>) { + ::visit_ts_optional_type(&mut **self, node) + } + + #[inline] + fn visit_ts_param_prop(&mut self, node: &TsParamProp<'a>) { + ::visit_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_ts_param_prop_param(&mut self, node: &TsParamPropParam<'a>) { + ::visit_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn visit_ts_parenthesized_type(&mut self, node: &TsParenthesizedType<'a>) { + ::visit_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn visit_ts_property_signature(&mut self, node: &TsPropertySignature<'a>) { + ::visit_ts_property_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_qualified_name(&mut self, node: &TsQualifiedName<'a>) { + ::visit_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn visit_ts_rest_type(&mut self, node: &TsRestType<'a>) { + ::visit_ts_rest_type(&mut **self, node) + } + + #[inline] + fn visit_ts_satisfies_expr(&mut self, node: &TsSatisfiesExpr<'a>) { + ::visit_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_setter_signature(&mut self, node: &TsSetterSignature<'a>) { + ::visit_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_this_type(&mut self, node: &TsThisType) { + ::visit_ts_this_type(&mut **self, node) + } + + #[inline] + fn visit_ts_this_type_or_ident(&mut self, node: &TsThisTypeOrIdent<'a>) { + ::visit_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn visit_ts_tpl_lit_type(&mut self, node: &TsTplLitType<'a>) { + ::visit_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_element(&mut self, node: &TsTupleElement<'a>) { + ::visit_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_elements(&mut self, node: &[TsTupleElement<'a>]) { + ::visit_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_type(&mut self, node: &TsTupleType<'a>) { + ::visit_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn visit_ts_type(&mut self, node: &TsType<'a>) { + ::visit_ts_type(&mut **self, node) + } + + #[inline] + fn visit_ts_type_alias_decl(&mut self, node: &TsTypeAliasDecl<'a>) { + ::visit_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_type_ann(&mut self, node: &TsTypeAnn<'a>) { + ::visit_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_ts_type_assertion(&mut self, node: &TsTypeAssertion<'a>) { + ::visit_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn visit_ts_type_element(&mut self, node: &TsTypeElement<'a>) { + ::visit_ts_type_element(&mut **self, node) + } + + #[inline] + fn visit_ts_type_elements(&mut self, node: &[TsTypeElement<'a>]) { + ::visit_ts_type_elements(&mut **self, node) + } + + #[inline] + fn visit_ts_type_lit(&mut self, node: &TsTypeLit<'a>) { + ::visit_ts_type_lit(&mut **self, node) + } + + #[inline] + fn visit_ts_type_operator(&mut self, node: &TsTypeOperator<'a>) { + ::visit_ts_type_operator(&mut **self, node) + } + + #[inline] + fn visit_ts_type_operator_op(&mut self, node: &TsTypeOperatorOp) { + ::visit_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param(&mut self, node: &TsTypeParam<'a>) { + ::visit_ts_type_param(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param_decl(&mut self, node: &TsTypeParamDecl<'a>) { + ::visit_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param_instantiation(&mut self, node: &TsTypeParamInstantiation<'a>) { + ::visit_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_ts_type_params(&mut self, node: &[TsTypeParam<'a>]) { + ::visit_ts_type_params(&mut **self, node) + } + + #[inline] + fn visit_ts_type_predicate(&mut self, node: &TsTypePredicate<'a>) { + ::visit_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn visit_ts_type_query(&mut self, node: &TsTypeQuery<'a>) { + ::visit_ts_type_query(&mut **self, node) + } + + #[inline] + fn visit_ts_type_query_expr(&mut self, node: &TsTypeQueryExpr<'a>) { + ::visit_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_type_ref(&mut self, node: &TsTypeRef<'a>) { + ::visit_ts_type_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_types(&mut self, node: &[TsType<'a>]) { + ::visit_ts_types(&mut **self, node) + } + + #[inline] + fn visit_ts_union_or_intersection_type(&mut self, node: &TsUnionOrIntersectionType<'a>) { + ::visit_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_ts_union_type(&mut self, node: &TsUnionType<'a>) { + ::visit_ts_union_type(&mut **self, node) + } + + #[inline] + fn visit_unary_expr(&mut self, node: &UnaryExpr<'a>) { + ::visit_unary_expr(&mut **self, node) + } + + #[inline] + fn visit_unary_op(&mut self, node: &UnaryOp) { + ::visit_unary_op(&mut **self, node) + } + + #[inline] + fn visit_update_expr(&mut self, node: &UpdateExpr<'a>) { + ::visit_update_expr(&mut **self, node) + } + + #[inline] + fn visit_update_op(&mut self, node: &UpdateOp) { + ::visit_update_op(&mut **self, node) + } + + #[inline] + fn visit_using_decl(&mut self, node: &UsingDecl<'a>) { + ::visit_using_decl(&mut **self, node) + } + + #[inline] + fn visit_var_decl(&mut self, node: &VarDecl<'a>) { + ::visit_var_decl(&mut **self, node) + } + + #[inline] + fn visit_var_decl_kind(&mut self, node: &VarDeclKind) { + ::visit_var_decl_kind(&mut **self, node) + } + + #[inline] + fn visit_var_decl_or_expr(&mut self, node: &VarDeclOrExpr<'a>) { + ::visit_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_var_declarator(&mut self, node: &VarDeclarator<'a>) { + ::visit_var_declarator(&mut **self, node) + } + + #[inline] + fn visit_var_declarators(&mut self, node: &[VarDeclarator<'a>]) { + ::visit_var_declarators(&mut **self, node) + } + + #[inline] + fn visit_while_stmt(&mut self, node: &WhileStmt<'a>) { + ::visit_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_with_stmt(&mut self, node: &WithStmt<'a>) { + ::visit_with_stmt(&mut **self, node) + } + + #[inline] + fn visit_yield_expr(&mut self, node: &YieldExpr<'a>) { + ::visit_yield_expr(&mut **self, node) + } +} +impl<'a, V> Visit<'a> for Box<'a, V> +where + V: ?Sized + Visit<'a>, +{ + #[inline] + fn visit_accessibility(&mut self, node: &Accessibility) { + ::visit_accessibility(&mut **self, node) + } + + #[inline] + fn visit_array_lit(&mut self, node: &ArrayLit<'a>) { + ::visit_array_lit(&mut **self, node) + } + + #[inline] + fn visit_array_pat(&mut self, node: &ArrayPat<'a>) { + ::visit_array_pat(&mut **self, node) + } + + #[inline] + fn visit_arrow_expr(&mut self, node: &ArrowExpr<'a>) { + ::visit_arrow_expr(&mut **self, node) + } + + #[inline] + fn visit_assign_expr(&mut self, node: &AssignExpr<'a>) { + ::visit_assign_expr(&mut **self, node) + } + + #[inline] + fn visit_assign_op(&mut self, node: &AssignOp) { + ::visit_assign_op(&mut **self, node) + } + + #[inline] + fn visit_assign_pat(&mut self, node: &AssignPat<'a>) { + ::visit_assign_pat(&mut **self, node) + } + + #[inline] + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp<'a>) { + ::visit_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_assign_prop(&mut self, node: &AssignProp<'a>) { + ::visit_assign_prop(&mut **self, node) + } + + #[inline] + fn visit_assign_target(&mut self, node: &AssignTarget<'a>) { + ::visit_assign_target(&mut **self, node) + } + + #[inline] + fn visit_assign_target_pat(&mut self, node: &AssignTargetPat<'a>) { + ::visit_assign_target_pat(&mut **self, node) + } + + #[inline] + fn visit_atom(&mut self, node: &swc_atoms::Atom) { + ::visit_atom(&mut **self, node) + } + + #[inline] + fn visit_auto_accessor(&mut self, node: &AutoAccessor<'a>) { + ::visit_auto_accessor(&mut **self, node) + } + + #[inline] + fn visit_await_expr(&mut self, node: &AwaitExpr<'a>) { + ::visit_await_expr(&mut **self, node) + } + + #[inline] + fn visit_big_int(&mut self, node: &BigInt<'a>) { + ::visit_big_int(&mut **self, node) + } + + #[inline] + fn visit_big_int_value(&mut self, node: &BigIntValue) { + ::visit_big_int_value(&mut **self, node) + } + + #[inline] + fn visit_bin_expr(&mut self, node: &BinExpr<'a>) { + ::visit_bin_expr(&mut **self, node) + } + + #[inline] + fn visit_binary_op(&mut self, node: &BinaryOp) { + ::visit_binary_op(&mut **self, node) + } + + #[inline] + fn visit_binding_ident(&mut self, node: &BindingIdent<'a>) { + ::visit_binding_ident(&mut **self, node) + } + + #[inline] + fn visit_block_stmt(&mut self, node: &BlockStmt<'a>) { + ::visit_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_block_stmt_or_expr(&mut self, node: &BlockStmtOrExpr<'a>) { + ::visit_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn visit_bool(&mut self, node: &Bool) { + ::visit_bool(&mut **self, node) + } + + #[inline] + fn visit_break_stmt(&mut self, node: &BreakStmt) { + ::visit_break_stmt(&mut **self, node) + } + + #[inline] + fn visit_call_expr(&mut self, node: &CallExpr<'a>) { + ::visit_call_expr(&mut **self, node) + } + + #[inline] + fn visit_callee(&mut self, node: &Callee<'a>) { + ::visit_callee(&mut **self, node) + } + + #[inline] + fn visit_catch_clause(&mut self, node: &CatchClause<'a>) { + ::visit_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_class(&mut self, node: &Class<'a>) { + ::visit_class(&mut **self, node) + } + + #[inline] + fn visit_class_decl(&mut self, node: &ClassDecl<'a>) { + ::visit_class_decl(&mut **self, node) + } + + #[inline] + fn visit_class_expr(&mut self, node: &ClassExpr<'a>) { + ::visit_class_expr(&mut **self, node) + } + + #[inline] + fn visit_class_member(&mut self, node: &ClassMember<'a>) { + ::visit_class_member(&mut **self, node) + } + + #[inline] + fn visit_class_members(&mut self, node: &[ClassMember<'a>]) { + ::visit_class_members(&mut **self, node) + } + + #[inline] + fn visit_class_method(&mut self, node: &ClassMethod<'a>) { + ::visit_class_method(&mut **self, node) + } + + #[inline] + fn visit_class_prop(&mut self, node: &ClassProp<'a>) { + ::visit_class_prop(&mut **self, node) + } + + #[inline] + fn visit_computed_prop_name(&mut self, node: &ComputedPropName<'a>) { + ::visit_computed_prop_name(&mut **self, node) + } + + #[inline] + fn visit_cond_expr(&mut self, node: &CondExpr<'a>) { + ::visit_cond_expr(&mut **self, node) + } + + #[inline] + fn visit_constructor(&mut self, node: &Constructor<'a>) { + ::visit_constructor(&mut **self, node) + } + + #[inline] + fn visit_continue_stmt(&mut self, node: &ContinueStmt) { + ::visit_continue_stmt(&mut **self, node) + } + + #[inline] + fn visit_debugger_stmt(&mut self, node: &DebuggerStmt) { + ::visit_debugger_stmt(&mut **self, node) + } + + #[inline] + fn visit_decl(&mut self, node: &Decl<'a>) { + ::visit_decl(&mut **self, node) + } + + #[inline] + fn visit_decorator(&mut self, node: &Decorator<'a>) { + ::visit_decorator(&mut **self, node) + } + + #[inline] + fn visit_decorators(&mut self, node: &[Decorator<'a>]) { + ::visit_decorators(&mut **self, node) + } + + #[inline] + fn visit_default_decl(&mut self, node: &DefaultDecl<'a>) { + ::visit_default_decl(&mut **self, node) + } + + #[inline] + fn visit_do_while_stmt(&mut self, node: &DoWhileStmt<'a>) { + ::visit_do_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_empty_stmt(&mut self, node: &EmptyStmt) { + ::visit_empty_stmt(&mut **self, node) + } + + #[inline] + fn visit_export_all(&mut self, node: &ExportAll<'a>) { + ::visit_export_all(&mut **self, node) + } + + #[inline] + fn visit_export_decl(&mut self, node: &ExportDecl<'a>) { + ::visit_export_decl(&mut **self, node) + } + + #[inline] + fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl<'a>) { + ::visit_export_default_decl(&mut **self, node) + } + + #[inline] + fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr<'a>) { + ::visit_export_default_expr(&mut **self, node) + } + + #[inline] + fn visit_export_default_specifier(&mut self, node: &ExportDefaultSpecifier) { + ::visit_export_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_named_specifier(&mut self, node: &ExportNamedSpecifier<'a>) { + ::visit_export_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_namespace_specifier(&mut self, node: &ExportNamespaceSpecifier<'a>) { + ::visit_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_specifier(&mut self, node: &ExportSpecifier<'a>) { + ::visit_export_specifier(&mut **self, node) + } + + #[inline] + fn visit_export_specifiers(&mut self, node: &[ExportSpecifier<'a>]) { + ::visit_export_specifiers(&mut **self, node) + } + + #[inline] + fn visit_expr(&mut self, node: &Expr<'a>) { + ::visit_expr(&mut **self, node) + } + + #[inline] + fn visit_expr_or_spread(&mut self, node: &ExprOrSpread<'a>) { + ::visit_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_expr_or_spreads(&mut self, node: &[ExprOrSpread<'a>]) { + ::visit_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_expr_stmt(&mut self, node: &ExprStmt<'a>) { + ::visit_expr_stmt(&mut **self, node) + } + + #[inline] + fn visit_exprs(&mut self, node: &[Expr<'a>]) { + ::visit_exprs(&mut **self, node) + } + + #[inline] + fn visit_fn_decl(&mut self, node: &FnDecl<'a>) { + ::visit_fn_decl(&mut **self, node) + } + + #[inline] + fn visit_fn_expr(&mut self, node: &FnExpr<'a>) { + ::visit_fn_expr(&mut **self, node) + } + + #[inline] + fn visit_for_head(&mut self, node: &ForHead<'a>) { + ::visit_for_head(&mut **self, node) + } + + #[inline] + fn visit_for_in_stmt(&mut self, node: &ForInStmt<'a>) { + ::visit_for_in_stmt(&mut **self, node) + } + + #[inline] + fn visit_for_of_stmt(&mut self, node: &ForOfStmt<'a>) { + ::visit_for_of_stmt(&mut **self, node) + } + + #[inline] + fn visit_for_stmt(&mut self, node: &ForStmt<'a>) { + ::visit_for_stmt(&mut **self, node) + } + + #[inline] + fn visit_function(&mut self, node: &Function<'a>) { + ::visit_function(&mut **self, node) + } + + #[inline] + fn visit_getter_prop(&mut self, node: &GetterProp<'a>) { + ::visit_getter_prop(&mut **self, node) + } + + #[inline] + fn visit_ident(&mut self, node: &Ident) { + ::visit_ident(&mut **self, node) + } + + #[inline] + fn visit_ident_name(&mut self, node: &IdentName) { + ::visit_ident_name(&mut **self, node) + } + + #[inline] + fn visit_if_stmt(&mut self, node: &IfStmt<'a>) { + ::visit_if_stmt(&mut **self, node) + } + + #[inline] + fn visit_import(&mut self, node: &Import) { + ::visit_import(&mut **self, node) + } + + #[inline] + fn visit_import_decl(&mut self, node: &ImportDecl<'a>) { + ::visit_import_decl(&mut **self, node) + } + + #[inline] + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + ::visit_import_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier<'a>) { + ::visit_import_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_phase(&mut self, node: &ImportPhase) { + ::visit_import_phase(&mut **self, node) + } + + #[inline] + fn visit_import_specifier(&mut self, node: &ImportSpecifier<'a>) { + ::visit_import_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_specifiers(&mut self, node: &[ImportSpecifier<'a>]) { + ::visit_import_specifiers(&mut **self, node) + } + + #[inline] + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + ::visit_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn visit_import_with(&mut self, node: &ImportWith<'a>) { + ::visit_import_with(&mut **self, node) + } + + #[inline] + fn visit_import_with_item(&mut self, node: &ImportWithItem) { + ::visit_import_with_item(&mut **self, node) + } + + #[inline] + fn visit_import_with_items(&mut self, node: &[ImportWithItem]) { + ::visit_import_with_items(&mut **self, node) + } + + #[inline] + fn visit_invalid(&mut self, node: &Invalid) { + ::visit_invalid(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr(&mut self, node: &JSXAttr<'a>) { + ::visit_jsx_attr(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_name(&mut self, node: &JSXAttrName<'a>) { + ::visit_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_or_spread(&mut self, node: &JSXAttrOrSpread<'a>) { + ::visit_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_or_spreads(&mut self, node: &[JSXAttrOrSpread<'a>]) { + ::visit_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_jsx_attr_value(&mut self, node: &JSXAttrValue<'a>) { + ::visit_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_jsx_closing_element(&mut self, node: &JSXClosingElement<'a>) { + ::visit_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_closing_fragment(&mut self, node: &JSXClosingFragment) { + ::visit_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_element(&mut self, node: &JSXElement<'a>) { + ::visit_jsx_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_child(&mut self, node: &JSXElementChild<'a>) { + ::visit_jsx_element_child(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_childs(&mut self, node: &[JSXElementChild<'a>]) { + ::visit_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn visit_jsx_element_name(&mut self, node: &JSXElementName<'a>) { + ::visit_jsx_element_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_empty_expr(&mut self, node: &JSXEmptyExpr) { + ::visit_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_expr(&mut self, node: &JSXExpr<'a>) { + ::visit_jsx_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_expr_container(&mut self, node: &JSXExprContainer<'a>) { + ::visit_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn visit_jsx_fragment(&mut self, node: &JSXFragment<'a>) { + ::visit_jsx_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_member_expr(&mut self, node: &JSXMemberExpr<'a>) { + ::visit_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn visit_jsx_namespaced_name(&mut self, node: &JSXNamespacedName) { + ::visit_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn visit_jsx_object(&mut self, node: &JSXObject<'a>) { + ::visit_jsx_object(&mut **self, node) + } + + #[inline] + fn visit_jsx_opening_element(&mut self, node: &JSXOpeningElement<'a>) { + ::visit_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn visit_jsx_opening_fragment(&mut self, node: &JSXOpeningFragment) { + ::visit_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn visit_jsx_spread_child(&mut self, node: &JSXSpreadChild<'a>) { + ::visit_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn visit_jsx_text(&mut self, node: &JSXText) { + ::visit_jsx_text(&mut **self, node) + } + + #[inline] + fn visit_key(&mut self, node: &Key<'a>) { + ::visit_key(&mut **self, node) + } + + #[inline] + fn visit_key_value_pat_prop(&mut self, node: &KeyValuePatProp<'a>) { + ::visit_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_key_value_prop(&mut self, node: &KeyValueProp<'a>) { + ::visit_key_value_prop(&mut **self, node) + } + + #[inline] + fn visit_labeled_stmt(&mut self, node: &LabeledStmt<'a>) { + ::visit_labeled_stmt(&mut **self, node) + } + + #[inline] + fn visit_lit(&mut self, node: &Lit<'a>) { + ::visit_lit(&mut **self, node) + } + + #[inline] + fn visit_member_expr(&mut self, node: &MemberExpr<'a>) { + ::visit_member_expr(&mut **self, node) + } + + #[inline] + fn visit_member_prop(&mut self, node: &MemberProp<'a>) { + ::visit_member_prop(&mut **self, node) + } + + #[inline] + fn visit_meta_prop_expr(&mut self, node: &MetaPropExpr) { + ::visit_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_meta_prop_kind(&mut self, node: &MetaPropKind) { + ::visit_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn visit_method_kind(&mut self, node: &MethodKind) { + ::visit_method_kind(&mut **self, node) + } + + #[inline] + fn visit_method_prop(&mut self, node: &MethodProp<'a>) { + ::visit_method_prop(&mut **self, node) + } + + #[inline] + fn visit_module(&mut self, node: &Module<'a>) { + ::visit_module(&mut **self, node) + } + + #[inline] + fn visit_module_decl(&mut self, node: &ModuleDecl<'a>) { + ::visit_module_decl(&mut **self, node) + } + + #[inline] + fn visit_module_export_name(&mut self, node: &ModuleExportName<'a>) { + ::visit_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_module_item(&mut self, node: &ModuleItem<'a>) { + ::visit_module_item(&mut **self, node) + } + + #[inline] + fn visit_module_items(&mut self, node: &[ModuleItem<'a>]) { + ::visit_module_items(&mut **self, node) + } + + #[inline] + fn visit_named_export(&mut self, node: &NamedExport<'a>) { + ::visit_named_export(&mut **self, node) + } + + #[inline] + fn visit_new_expr(&mut self, node: &NewExpr<'a>) { + ::visit_new_expr(&mut **self, node) + } + + #[inline] + fn visit_null(&mut self, node: &Null) { + ::visit_null(&mut **self, node) + } + + #[inline] + fn visit_number(&mut self, node: &Number) { + ::visit_number(&mut **self, node) + } + + #[inline] + fn visit_object_lit(&mut self, node: &ObjectLit<'a>) { + ::visit_object_lit(&mut **self, node) + } + + #[inline] + fn visit_object_pat(&mut self, node: &ObjectPat<'a>) { + ::visit_object_pat(&mut **self, node) + } + + #[inline] + fn visit_object_pat_prop(&mut self, node: &ObjectPatProp<'a>) { + ::visit_object_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_object_pat_props(&mut self, node: &[ObjectPatProp<'a>]) { + ::visit_object_pat_props(&mut **self, node) + } + + #[inline] + fn visit_opt_accessibility(&mut self, node: &Option) { + ::visit_opt_accessibility(&mut **self, node) + } + + #[inline] + fn visit_opt_atom(&mut self, node: &Option) { + ::visit_opt_atom(&mut **self, node) + } + + #[inline] + fn visit_opt_block_stmt(&mut self, node: &Option>) { + ::visit_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_opt_call(&mut self, node: &OptCall<'a>) { + ::visit_opt_call(&mut **self, node) + } + + #[inline] + fn visit_opt_catch_clause(&mut self, node: &Option>) { + ::visit_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_opt_chain_base(&mut self, node: &OptChainBase<'a>) { + ::visit_opt_chain_base(&mut **self, node) + } + + #[inline] + fn visit_opt_chain_expr(&mut self, node: &OptChainExpr<'a>) { + ::visit_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_expr(&mut self, node: &Option>) { + ::visit_opt_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_expr_or_spread(&mut self, node: &Option>) { + ::visit_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_opt_expr_or_spreads(&mut self, node: &Option>>) { + ::visit_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_opt_ident(&mut self, node: &Option) { + ::visit_opt_ident(&mut **self, node) + } + + #[inline] + fn visit_opt_jsx_attr_value(&mut self, node: &Option>) { + ::visit_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_opt_jsx_closing_element(&mut self, node: &Option>) { + ::visit_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_opt_module_export_name(&mut self, node: &Option>) { + ::visit_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_opt_object_lit(&mut self, node: &Option>>) { + ::visit_opt_object_lit(&mut **self, node) + } + + #[inline] + fn visit_opt_pat(&mut self, node: &Option>) { + ::visit_opt_pat(&mut **self, node) + } + + #[inline] + fn visit_opt_span(&mut self, node: &Option) { + ::visit_opt_span(&mut **self, node) + } + + #[inline] + fn visit_opt_stmt(&mut self, node: &Option>) { + ::visit_opt_stmt(&mut **self, node) + } + + #[inline] + fn visit_opt_str(&mut self, node: &Option>) { + ::visit_opt_str(&mut **self, node) + } + + #[inline] + fn visit_opt_true_plus_minus(&mut self, node: &Option) { + ::visit_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_entity_name(&mut self, node: &Option>) { + ::visit_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_namespace_body(&mut self, node: &Option>) { + ::visit_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type(&mut self, node: &Option>) { + ::visit_opt_ts_type(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_ann(&mut self, node: &Option>>) { + ::visit_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_param_decl(&mut self, node: &Option>>) { + ::visit_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_opt_ts_type_param_instantiation( + &mut self, + node: &Option>>, + ) { + ::visit_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_opt_var_decl_or_expr(&mut self, node: &Option>) { + ::visit_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_opt_vec_expr_or_spreads(&mut self, node: &[Option>]) { + ::visit_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_opt_vec_pats(&mut self, node: &[Option>]) { + ::visit_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn visit_param(&mut self, node: &Param<'a>) { + ::visit_param(&mut **self, node) + } + + #[inline] + fn visit_param_or_ts_param_prop(&mut self, node: &ParamOrTsParamProp<'a>) { + ::visit_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_param_or_ts_param_props(&mut self, node: &[ParamOrTsParamProp<'a>]) { + ::visit_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn visit_params(&mut self, node: &[Param<'a>]) { + ::visit_params(&mut **self, node) + } + + #[inline] + fn visit_paren_expr(&mut self, node: &ParenExpr<'a>) { + ::visit_paren_expr(&mut **self, node) + } + + #[inline] + fn visit_pat(&mut self, node: &Pat<'a>) { + ::visit_pat(&mut **self, node) + } + + #[inline] + fn visit_pats(&mut self, node: &[Pat<'a>]) { + ::visit_pats(&mut **self, node) + } + + #[inline] + fn visit_private_method(&mut self, node: &PrivateMethod<'a>) { + ::visit_private_method(&mut **self, node) + } + + #[inline] + fn visit_private_name(&mut self, node: &PrivateName) { + ::visit_private_name(&mut **self, node) + } + + #[inline] + fn visit_private_prop(&mut self, node: &PrivateProp<'a>) { + ::visit_private_prop(&mut **self, node) + } + + #[inline] + fn visit_program(&mut self, node: &Program<'a>) { + ::visit_program(&mut **self, node) + } + + #[inline] + fn visit_prop(&mut self, node: &Prop<'a>) { + ::visit_prop(&mut **self, node) + } + + #[inline] + fn visit_prop_name(&mut self, node: &PropName<'a>) { + ::visit_prop_name(&mut **self, node) + } + + #[inline] + fn visit_prop_or_spread(&mut self, node: &PropOrSpread<'a>) { + ::visit_prop_or_spread(&mut **self, node) + } + + #[inline] + fn visit_prop_or_spreads(&mut self, node: &[PropOrSpread<'a>]) { + ::visit_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_regex(&mut self, node: &Regex) { + ::visit_regex(&mut **self, node) + } + + #[inline] + fn visit_rest_pat(&mut self, node: &RestPat<'a>) { + ::visit_rest_pat(&mut **self, node) + } + + #[inline] + fn visit_return_stmt(&mut self, node: &ReturnStmt<'a>) { + ::visit_return_stmt(&mut **self, node) + } + + #[inline] + fn visit_script(&mut self, node: &Script<'a>) { + ::visit_script(&mut **self, node) + } + + #[inline] + fn visit_seq_expr(&mut self, node: &SeqExpr<'a>) { + ::visit_seq_expr(&mut **self, node) + } + + #[inline] + fn visit_setter_prop(&mut self, node: &SetterProp<'a>) { + ::visit_setter_prop(&mut **self, node) + } + + #[inline] + fn visit_simple_assign_target(&mut self, node: &SimpleAssignTarget<'a>) { + ::visit_simple_assign_target(&mut **self, node) + } + + #[inline] + fn visit_span(&mut self, node: &swc_common::Span) { + ::visit_span(&mut **self, node) + } + + #[inline] + fn visit_spread_element(&mut self, node: &SpreadElement<'a>) { + ::visit_spread_element(&mut **self, node) + } + + #[inline] + fn visit_static_block(&mut self, node: &StaticBlock<'a>) { + ::visit_static_block(&mut **self, node) + } + + #[inline] + fn visit_stmt(&mut self, node: &Stmt<'a>) { + ::visit_stmt(&mut **self, node) + } + + #[inline] + fn visit_stmts(&mut self, node: &[Stmt<'a>]) { + ::visit_stmts(&mut **self, node) + } + + #[inline] + fn visit_str(&mut self, node: &Str) { + ::visit_str(&mut **self, node) + } + + #[inline] + fn visit_super(&mut self, node: &Super) { + ::visit_super(&mut **self, node) + } + + #[inline] + fn visit_super_prop(&mut self, node: &SuperProp<'a>) { + ::visit_super_prop(&mut **self, node) + } + + #[inline] + fn visit_super_prop_expr(&mut self, node: &SuperPropExpr<'a>) { + ::visit_super_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_switch_case(&mut self, node: &SwitchCase<'a>) { + ::visit_switch_case(&mut **self, node) + } + + #[inline] + fn visit_switch_cases(&mut self, node: &[SwitchCase<'a>]) { + ::visit_switch_cases(&mut **self, node) + } + + #[inline] + fn visit_switch_stmt(&mut self, node: &SwitchStmt<'a>) { + ::visit_switch_stmt(&mut **self, node) + } + + #[inline] + fn visit_syntax_context(&mut self, node: &swc_common::SyntaxContext) { + ::visit_syntax_context(&mut **self, node) + } + + #[inline] + fn visit_tagged_tpl(&mut self, node: &TaggedTpl<'a>) { + ::visit_tagged_tpl(&mut **self, node) + } + + #[inline] + fn visit_this_expr(&mut self, node: &ThisExpr) { + ::visit_this_expr(&mut **self, node) + } + + #[inline] + fn visit_throw_stmt(&mut self, node: &ThrowStmt<'a>) { + ::visit_throw_stmt(&mut **self, node) + } + + #[inline] + fn visit_tpl(&mut self, node: &Tpl<'a>) { + ::visit_tpl(&mut **self, node) + } + + #[inline] + fn visit_tpl_element(&mut self, node: &TplElement) { + ::visit_tpl_element(&mut **self, node) + } + + #[inline] + fn visit_tpl_elements(&mut self, node: &[TplElement]) { + ::visit_tpl_elements(&mut **self, node) + } + + #[inline] + fn visit_true_plus_minus(&mut self, node: &TruePlusMinus) { + ::visit_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_try_stmt(&mut self, node: &TryStmt<'a>) { + ::visit_try_stmt(&mut **self, node) + } + + #[inline] + fn visit_ts_array_type(&mut self, node: &TsArrayType<'a>) { + ::visit_ts_array_type(&mut **self, node) + } + + #[inline] + fn visit_ts_as_expr(&mut self, node: &TsAsExpr<'a>) { + ::visit_ts_as_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_call_signature_decl(&mut self, node: &TsCallSignatureDecl<'a>) { + ::visit_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_conditional_type(&mut self, node: &TsConditionalType<'a>) { + ::visit_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn visit_ts_const_assertion(&mut self, node: &TsConstAssertion<'a>) { + ::visit_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn visit_ts_construct_signature_decl(&mut self, node: &TsConstructSignatureDecl<'a>) { + ::visit_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_constructor_type(&mut self, node: &TsConstructorType<'a>) { + ::visit_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_ts_entity_name(&mut self, node: &TsEntityName<'a>) { + ::visit_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_decl(&mut self, node: &TsEnumDecl<'a>) { + ::visit_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_member(&mut self, node: &TsEnumMember<'a>) { + ::visit_ts_enum_member(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_member_id(&mut self, node: &TsEnumMemberId<'a>) { + ::visit_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn visit_ts_enum_members(&mut self, node: &[TsEnumMember<'a>]) { + ::visit_ts_enum_members(&mut **self, node) + } + + #[inline] + fn visit_ts_export_assignment(&mut self, node: &TsExportAssignment<'a>) { + ::visit_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn visit_ts_expr_with_type_args(&mut self, node: &TsExprWithTypeArgs<'a>) { + ::visit_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn visit_ts_expr_with_type_argss(&mut self, node: &[TsExprWithTypeArgs<'a>]) { + ::visit_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn visit_ts_external_module_ref(&mut self, node: &TsExternalModuleRef) { + ::visit_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_or_constructor_type(&mut self, node: &TsFnOrConstructorType<'a>) { + ::visit_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_param(&mut self, node: &TsFnParam<'a>) { + ::visit_ts_fn_param(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_params(&mut self, node: &[TsFnParam<'a>]) { + ::visit_ts_fn_params(&mut **self, node) + } + + #[inline] + fn visit_ts_fn_type(&mut self, node: &TsFnType<'a>) { + ::visit_ts_fn_type(&mut **self, node) + } + + #[inline] + fn visit_ts_getter_signature(&mut self, node: &TsGetterSignature<'a>) { + ::visit_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_import_equals_decl(&mut self, node: &TsImportEqualsDecl<'a>) { + ::visit_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_import_type(&mut self, node: &TsImportType<'a>) { + ::visit_ts_import_type(&mut **self, node) + } + + #[inline] + fn visit_ts_index_signature(&mut self, node: &TsIndexSignature<'a>) { + ::visit_ts_index_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_indexed_access_type(&mut self, node: &TsIndexedAccessType<'a>) { + ::visit_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn visit_ts_infer_type(&mut self, node: &TsInferType<'a>) { + ::visit_ts_infer_type(&mut **self, node) + } + + #[inline] + fn visit_ts_instantiation(&mut self, node: &TsInstantiation<'a>) { + ::visit_ts_instantiation(&mut **self, node) + } + + #[inline] + fn visit_ts_interface_body(&mut self, node: &TsInterfaceBody<'a>) { + ::visit_ts_interface_body(&mut **self, node) + } + + #[inline] + fn visit_ts_interface_decl(&mut self, node: &TsInterfaceDecl<'a>) { + ::visit_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_intersection_type(&mut self, node: &TsIntersectionType<'a>) { + ::visit_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_ts_keyword_type(&mut self, node: &TsKeywordType) { + ::visit_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn visit_ts_keyword_type_kind(&mut self, node: &TsKeywordTypeKind) { + ::visit_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn visit_ts_lit(&mut self, node: &TsLit<'a>) { + ::visit_ts_lit(&mut **self, node) + } + + #[inline] + fn visit_ts_lit_type(&mut self, node: &TsLitType<'a>) { + ::visit_ts_lit_type(&mut **self, node) + } + + #[inline] + fn visit_ts_mapped_type(&mut self, node: &TsMappedType<'a>) { + ::visit_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn visit_ts_method_signature(&mut self, node: &TsMethodSignature<'a>) { + ::visit_ts_method_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_module_block(&mut self, node: &TsModuleBlock<'a>) { + ::visit_ts_module_block(&mut **self, node) + } + + #[inline] + fn visit_ts_module_decl(&mut self, node: &TsModuleDecl<'a>) { + ::visit_ts_module_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_module_name(&mut self, node: &TsModuleName<'a>) { + ::visit_ts_module_name(&mut **self, node) + } + + #[inline] + fn visit_ts_module_ref(&mut self, node: &TsModuleRef<'a>) { + ::visit_ts_module_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_body(&mut self, node: &TsNamespaceBody<'a>) { + ::visit_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_decl(&mut self, node: &TsNamespaceDecl<'a>) { + ::visit_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_namespace_export_decl(&mut self, node: &TsNamespaceExportDecl) { + ::visit_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_non_null_expr(&mut self, node: &TsNonNullExpr<'a>) { + ::visit_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_optional_type(&mut self, node: &TsOptionalType<'a>) { + ::visit_ts_optional_type(&mut **self, node) + } + + #[inline] + fn visit_ts_param_prop(&mut self, node: &TsParamProp<'a>) { + ::visit_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_ts_param_prop_param(&mut self, node: &TsParamPropParam<'a>) { + ::visit_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn visit_ts_parenthesized_type(&mut self, node: &TsParenthesizedType<'a>) { + ::visit_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn visit_ts_property_signature(&mut self, node: &TsPropertySignature<'a>) { + ::visit_ts_property_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_qualified_name(&mut self, node: &TsQualifiedName<'a>) { + ::visit_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn visit_ts_rest_type(&mut self, node: &TsRestType<'a>) { + ::visit_ts_rest_type(&mut **self, node) + } + + #[inline] + fn visit_ts_satisfies_expr(&mut self, node: &TsSatisfiesExpr<'a>) { + ::visit_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_setter_signature(&mut self, node: &TsSetterSignature<'a>) { + ::visit_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn visit_ts_this_type(&mut self, node: &TsThisType) { + ::visit_ts_this_type(&mut **self, node) + } + + #[inline] + fn visit_ts_this_type_or_ident(&mut self, node: &TsThisTypeOrIdent<'a>) { + ::visit_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn visit_ts_tpl_lit_type(&mut self, node: &TsTplLitType<'a>) { + ::visit_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_element(&mut self, node: &TsTupleElement<'a>) { + ::visit_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_elements(&mut self, node: &[TsTupleElement<'a>]) { + ::visit_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn visit_ts_tuple_type(&mut self, node: &TsTupleType<'a>) { + ::visit_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn visit_ts_type(&mut self, node: &TsType<'a>) { + ::visit_ts_type(&mut **self, node) + } + + #[inline] + fn visit_ts_type_alias_decl(&mut self, node: &TsTypeAliasDecl<'a>) { + ::visit_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_type_ann(&mut self, node: &TsTypeAnn<'a>) { + ::visit_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_ts_type_assertion(&mut self, node: &TsTypeAssertion<'a>) { + ::visit_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn visit_ts_type_element(&mut self, node: &TsTypeElement<'a>) { + ::visit_ts_type_element(&mut **self, node) + } + + #[inline] + fn visit_ts_type_elements(&mut self, node: &[TsTypeElement<'a>]) { + ::visit_ts_type_elements(&mut **self, node) + } + + #[inline] + fn visit_ts_type_lit(&mut self, node: &TsTypeLit<'a>) { + ::visit_ts_type_lit(&mut **self, node) + } + + #[inline] + fn visit_ts_type_operator(&mut self, node: &TsTypeOperator<'a>) { + ::visit_ts_type_operator(&mut **self, node) + } + + #[inline] + fn visit_ts_type_operator_op(&mut self, node: &TsTypeOperatorOp) { + ::visit_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param(&mut self, node: &TsTypeParam<'a>) { + ::visit_ts_type_param(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param_decl(&mut self, node: &TsTypeParamDecl<'a>) { + ::visit_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_ts_type_param_instantiation(&mut self, node: &TsTypeParamInstantiation<'a>) { + ::visit_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_ts_type_params(&mut self, node: &[TsTypeParam<'a>]) { + ::visit_ts_type_params(&mut **self, node) + } + + #[inline] + fn visit_ts_type_predicate(&mut self, node: &TsTypePredicate<'a>) { + ::visit_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn visit_ts_type_query(&mut self, node: &TsTypeQuery<'a>) { + ::visit_ts_type_query(&mut **self, node) + } + + #[inline] + fn visit_ts_type_query_expr(&mut self, node: &TsTypeQueryExpr<'a>) { + ::visit_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn visit_ts_type_ref(&mut self, node: &TsTypeRef<'a>) { + ::visit_ts_type_ref(&mut **self, node) + } + + #[inline] + fn visit_ts_types(&mut self, node: &[TsType<'a>]) { + ::visit_ts_types(&mut **self, node) + } + + #[inline] + fn visit_ts_union_or_intersection_type(&mut self, node: &TsUnionOrIntersectionType<'a>) { + ::visit_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_ts_union_type(&mut self, node: &TsUnionType<'a>) { + ::visit_ts_union_type(&mut **self, node) + } + + #[inline] + fn visit_unary_expr(&mut self, node: &UnaryExpr<'a>) { + ::visit_unary_expr(&mut **self, node) + } + + #[inline] + fn visit_unary_op(&mut self, node: &UnaryOp) { + ::visit_unary_op(&mut **self, node) + } + + #[inline] + fn visit_update_expr(&mut self, node: &UpdateExpr<'a>) { + ::visit_update_expr(&mut **self, node) + } + + #[inline] + fn visit_update_op(&mut self, node: &UpdateOp) { + ::visit_update_op(&mut **self, node) + } + + #[inline] + fn visit_using_decl(&mut self, node: &UsingDecl<'a>) { + ::visit_using_decl(&mut **self, node) + } + + #[inline] + fn visit_var_decl(&mut self, node: &VarDecl<'a>) { + ::visit_var_decl(&mut **self, node) + } + + #[inline] + fn visit_var_decl_kind(&mut self, node: &VarDeclKind) { + ::visit_var_decl_kind(&mut **self, node) + } + + #[inline] + fn visit_var_decl_or_expr(&mut self, node: &VarDeclOrExpr<'a>) { + ::visit_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_var_declarator(&mut self, node: &VarDeclarator<'a>) { + ::visit_var_declarator(&mut **self, node) + } + + #[inline] + fn visit_var_declarators(&mut self, node: &[VarDeclarator<'a>]) { + ::visit_var_declarators(&mut **self, node) + } + + #[inline] + fn visit_while_stmt(&mut self, node: &WhileStmt<'a>) { + ::visit_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_with_stmt(&mut self, node: &WithStmt<'a>) { + ::visit_with_stmt(&mut **self, node) + } + + #[inline] + fn visit_yield_expr(&mut self, node: &YieldExpr<'a>) { + ::visit_yield_expr(&mut **self, node) + } +} +impl<'a, A, B> Visit<'a> for ::swc_visit::Either +where + A: Visit<'a>, + B: Visit<'a>, +{ + #[inline] + fn visit_accessibility(&mut self, node: &Accessibility) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_accessibility(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_accessibility(visitor, node), + } + } + + #[inline] + fn visit_array_lit(&mut self, node: &ArrayLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_array_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_array_lit(visitor, node), + } + } + + #[inline] + fn visit_array_pat(&mut self, node: &ArrayPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_array_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_array_pat(visitor, node), + } + } + + #[inline] + fn visit_arrow_expr(&mut self, node: &ArrowExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_arrow_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_arrow_expr(visitor, node), + } + } + + #[inline] + fn visit_assign_expr(&mut self, node: &AssignExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_expr(visitor, node), + } + } + + #[inline] + fn visit_assign_op(&mut self, node: &AssignOp) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_op(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_op(visitor, node), + } + } + + #[inline] + fn visit_assign_pat(&mut self, node: &AssignPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_pat(visitor, node), + } + } + + #[inline] + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_pat_prop(visitor, node), + } + } + + #[inline] + fn visit_assign_prop(&mut self, node: &AssignProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_prop(visitor, node), + } + } + + #[inline] + fn visit_assign_target(&mut self, node: &AssignTarget<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_target(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_target(visitor, node), + } + } + + #[inline] + fn visit_assign_target_pat(&mut self, node: &AssignTargetPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_assign_target_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_assign_target_pat(visitor, node), + } + } + + #[inline] + fn visit_atom(&mut self, node: &swc_atoms::Atom) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_atom(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_atom(visitor, node), + } + } + + #[inline] + fn visit_auto_accessor(&mut self, node: &AutoAccessor<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_auto_accessor(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_auto_accessor(visitor, node), + } + } + + #[inline] + fn visit_await_expr(&mut self, node: &AwaitExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_await_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_await_expr(visitor, node), + } + } + + #[inline] + fn visit_big_int(&mut self, node: &BigInt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_big_int(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_big_int(visitor, node), + } + } + + #[inline] + fn visit_big_int_value(&mut self, node: &BigIntValue) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_big_int_value(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_big_int_value(visitor, node), + } + } + + #[inline] + fn visit_bin_expr(&mut self, node: &BinExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_bin_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_bin_expr(visitor, node), + } + } + + #[inline] + fn visit_binary_op(&mut self, node: &BinaryOp) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_binary_op(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_binary_op(visitor, node), + } + } + + #[inline] + fn visit_binding_ident(&mut self, node: &BindingIdent<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_binding_ident(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_binding_ident(visitor, node), + } + } + + #[inline] + fn visit_block_stmt(&mut self, node: &BlockStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_block_stmt(visitor, node), + } + } + + #[inline] + fn visit_block_stmt_or_expr(&mut self, node: &BlockStmtOrExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_block_stmt_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_block_stmt_or_expr(visitor, node), + } + } + + #[inline] + fn visit_bool(&mut self, node: &Bool) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_bool(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_bool(visitor, node), + } + } + + #[inline] + fn visit_break_stmt(&mut self, node: &BreakStmt) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_break_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_break_stmt(visitor, node), + } + } + + #[inline] + fn visit_call_expr(&mut self, node: &CallExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_call_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_call_expr(visitor, node), + } + } + + #[inline] + fn visit_callee(&mut self, node: &Callee<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_callee(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_callee(visitor, node), + } + } + + #[inline] + fn visit_catch_clause(&mut self, node: &CatchClause<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_catch_clause(visitor, node), + } + } + + #[inline] + fn visit_class(&mut self, node: &Class<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class(visitor, node), + } + } + + #[inline] + fn visit_class_decl(&mut self, node: &ClassDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_decl(visitor, node), + } + } + + #[inline] + fn visit_class_expr(&mut self, node: &ClassExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_expr(visitor, node), + } + } + + #[inline] + fn visit_class_member(&mut self, node: &ClassMember<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_member(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_member(visitor, node), + } + } + + #[inline] + fn visit_class_members(&mut self, node: &[ClassMember<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_members(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_members(visitor, node), + } + } + + #[inline] + fn visit_class_method(&mut self, node: &ClassMethod<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_method(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_method(visitor, node), + } + } + + #[inline] + fn visit_class_prop(&mut self, node: &ClassProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_class_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_class_prop(visitor, node), + } + } + + #[inline] + fn visit_computed_prop_name(&mut self, node: &ComputedPropName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_computed_prop_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_computed_prop_name(visitor, node), + } + } + + #[inline] + fn visit_cond_expr(&mut self, node: &CondExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_cond_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_cond_expr(visitor, node), + } + } + + #[inline] + fn visit_constructor(&mut self, node: &Constructor<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_constructor(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_constructor(visitor, node), + } + } + + #[inline] + fn visit_continue_stmt(&mut self, node: &ContinueStmt) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_continue_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_continue_stmt(visitor, node), + } + } + + #[inline] + fn visit_debugger_stmt(&mut self, node: &DebuggerStmt) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_debugger_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_debugger_stmt(visitor, node), + } + } + + #[inline] + fn visit_decl(&mut self, node: &Decl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_decl(visitor, node), + } + } + + #[inline] + fn visit_decorator(&mut self, node: &Decorator<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_decorator(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_decorator(visitor, node), + } + } + + #[inline] + fn visit_decorators(&mut self, node: &[Decorator<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_decorators(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_decorators(visitor, node), + } + } + + #[inline] + fn visit_default_decl(&mut self, node: &DefaultDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_default_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_default_decl(visitor, node), + } + } + + #[inline] + fn visit_do_while_stmt(&mut self, node: &DoWhileStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_do_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_do_while_stmt(visitor, node), + } + } + + #[inline] + fn visit_empty_stmt(&mut self, node: &EmptyStmt) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_empty_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_empty_stmt(visitor, node), + } + } + + #[inline] + fn visit_export_all(&mut self, node: &ExportAll<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_all(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_all(visitor, node), + } + } + + #[inline] + fn visit_export_decl(&mut self, node: &ExportDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_decl(visitor, node), + } + } + + #[inline] + fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_default_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_default_decl(visitor, node), + } + } + + #[inline] + fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_default_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_default_expr(visitor, node), + } + } + + #[inline] + fn visit_export_default_specifier(&mut self, node: &ExportDefaultSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_export_default_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_export_default_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_export_named_specifier(&mut self, node: &ExportNamedSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_named_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_named_specifier(visitor, node), + } + } + + #[inline] + fn visit_export_namespace_specifier(&mut self, node: &ExportNamespaceSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_export_namespace_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_export_namespace_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_export_specifier(&mut self, node: &ExportSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_specifier(visitor, node), + } + } + + #[inline] + fn visit_export_specifiers(&mut self, node: &[ExportSpecifier<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_export_specifiers(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_export_specifiers(visitor, node), + } + } + + #[inline] + fn visit_expr(&mut self, node: &Expr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_expr(visitor, node), + } + } + + #[inline] + fn visit_expr_or_spread(&mut self, node: &ExprOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_expr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_expr_or_spread(visitor, node), + } + } + + #[inline] + fn visit_expr_or_spreads(&mut self, node: &[ExprOrSpread<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_expr_stmt(&mut self, node: &ExprStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_expr_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_expr_stmt(visitor, node), + } + } + + #[inline] + fn visit_exprs(&mut self, node: &[Expr<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_exprs(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_exprs(visitor, node), + } + } + + #[inline] + fn visit_fn_decl(&mut self, node: &FnDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_fn_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_fn_decl(visitor, node), + } + } + + #[inline] + fn visit_fn_expr(&mut self, node: &FnExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_fn_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_fn_expr(visitor, node), + } + } + + #[inline] + fn visit_for_head(&mut self, node: &ForHead<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_for_head(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_for_head(visitor, node), + } + } + + #[inline] + fn visit_for_in_stmt(&mut self, node: &ForInStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_for_in_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_for_in_stmt(visitor, node), + } + } + + #[inline] + fn visit_for_of_stmt(&mut self, node: &ForOfStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_for_of_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_for_of_stmt(visitor, node), + } + } + + #[inline] + fn visit_for_stmt(&mut self, node: &ForStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_for_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_for_stmt(visitor, node), + } + } + + #[inline] + fn visit_function(&mut self, node: &Function<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_function(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_function(visitor, node), + } + } + + #[inline] + fn visit_getter_prop(&mut self, node: &GetterProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_getter_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_getter_prop(visitor, node), + } + } + + #[inline] + fn visit_ident(&mut self, node: &Ident) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ident(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ident(visitor, node), + } + } + + #[inline] + fn visit_ident_name(&mut self, node: &IdentName) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ident_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ident_name(visitor, node), + } + } + + #[inline] + fn visit_if_stmt(&mut self, node: &IfStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_if_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_if_stmt(visitor, node), + } + } + + #[inline] + fn visit_import(&mut self, node: &Import) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import(visitor, node), + } + } + + #[inline] + fn visit_import_decl(&mut self, node: &ImportDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_decl(visitor, node), + } + } + + #[inline] + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_import_default_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_import_default_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_named_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_named_specifier(visitor, node), + } + } + + #[inline] + fn visit_import_phase(&mut self, node: &ImportPhase) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_phase(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_phase(visitor, node), + } + } + + #[inline] + fn visit_import_specifier(&mut self, node: &ImportSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_specifier(visitor, node), + } + } + + #[inline] + fn visit_import_specifiers(&mut self, node: &[ImportSpecifier<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_specifiers(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_specifiers(visitor, node), + } + } + + #[inline] + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_import_star_as_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_import_star_as_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_import_with(&mut self, node: &ImportWith<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_with(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_with(visitor, node), + } + } + + #[inline] + fn visit_import_with_item(&mut self, node: &ImportWithItem) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_with_item(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_with_item(visitor, node), + } + } + + #[inline] + fn visit_import_with_items(&mut self, node: &[ImportWithItem]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_import_with_items(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_import_with_items(visitor, node), + } + } + + #[inline] + fn visit_invalid(&mut self, node: &Invalid) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_invalid(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_invalid(visitor, node), + } + } + + #[inline] + fn visit_jsx_attr(&mut self, node: &JSXAttr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_attr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_attr(visitor, node), + } + } + + #[inline] + fn visit_jsx_attr_name(&mut self, node: &JSXAttrName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_attr_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_attr_name(visitor, node), + } + } + + #[inline] + fn visit_jsx_attr_or_spread(&mut self, node: &JSXAttrOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_attr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_attr_or_spread(visitor, node), + } + } + + #[inline] + fn visit_jsx_attr_or_spreads(&mut self, node: &[JSXAttrOrSpread<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_attr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_attr_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_jsx_attr_value(&mut self, node: &JSXAttrValue<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_attr_value(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_attr_value(visitor, node), + } + } + + #[inline] + fn visit_jsx_closing_element(&mut self, node: &JSXClosingElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_closing_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_closing_element(visitor, node), + } + } + + #[inline] + fn visit_jsx_closing_fragment(&mut self, node: &JSXClosingFragment) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_closing_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_closing_fragment(visitor, node), + } + } + + #[inline] + fn visit_jsx_element(&mut self, node: &JSXElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_element(visitor, node), + } + } + + #[inline] + fn visit_jsx_element_child(&mut self, node: &JSXElementChild<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_element_child(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_element_child(visitor, node), + } + } + + #[inline] + fn visit_jsx_element_childs(&mut self, node: &[JSXElementChild<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_element_childs(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_element_childs(visitor, node), + } + } + + #[inline] + fn visit_jsx_element_name(&mut self, node: &JSXElementName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_element_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_element_name(visitor, node), + } + } + + #[inline] + fn visit_jsx_empty_expr(&mut self, node: &JSXEmptyExpr) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_empty_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_empty_expr(visitor, node), + } + } + + #[inline] + fn visit_jsx_expr(&mut self, node: &JSXExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_expr(visitor, node), + } + } + + #[inline] + fn visit_jsx_expr_container(&mut self, node: &JSXExprContainer<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_expr_container(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_expr_container(visitor, node), + } + } + + #[inline] + fn visit_jsx_fragment(&mut self, node: &JSXFragment<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_fragment(visitor, node), + } + } + + #[inline] + fn visit_jsx_member_expr(&mut self, node: &JSXMemberExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_member_expr(visitor, node), + } + } + + #[inline] + fn visit_jsx_namespaced_name(&mut self, node: &JSXNamespacedName) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_namespaced_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_namespaced_name(visitor, node), + } + } + + #[inline] + fn visit_jsx_object(&mut self, node: &JSXObject<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_object(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_object(visitor, node), + } + } + + #[inline] + fn visit_jsx_opening_element(&mut self, node: &JSXOpeningElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_opening_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_opening_element(visitor, node), + } + } + + #[inline] + fn visit_jsx_opening_fragment(&mut self, node: &JSXOpeningFragment) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_opening_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_opening_fragment(visitor, node), + } + } + + #[inline] + fn visit_jsx_spread_child(&mut self, node: &JSXSpreadChild<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_spread_child(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_spread_child(visitor, node), + } + } + + #[inline] + fn visit_jsx_text(&mut self, node: &JSXText) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_jsx_text(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_jsx_text(visitor, node), + } + } + + #[inline] + fn visit_key(&mut self, node: &Key<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_key(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_key(visitor, node), + } + } + + #[inline] + fn visit_key_value_pat_prop(&mut self, node: &KeyValuePatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_key_value_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_key_value_pat_prop(visitor, node), + } + } + + #[inline] + fn visit_key_value_prop(&mut self, node: &KeyValueProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_key_value_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_key_value_prop(visitor, node), + } + } + + #[inline] + fn visit_labeled_stmt(&mut self, node: &LabeledStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_labeled_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_labeled_stmt(visitor, node), + } + } + + #[inline] + fn visit_lit(&mut self, node: &Lit<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_lit(visitor, node), + } + } + + #[inline] + fn visit_member_expr(&mut self, node: &MemberExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_member_expr(visitor, node), + } + } + + #[inline] + fn visit_member_prop(&mut self, node: &MemberProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_member_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_member_prop(visitor, node), + } + } + + #[inline] + fn visit_meta_prop_expr(&mut self, node: &MetaPropExpr) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_meta_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_meta_prop_expr(visitor, node), + } + } + + #[inline] + fn visit_meta_prop_kind(&mut self, node: &MetaPropKind) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_meta_prop_kind(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_meta_prop_kind(visitor, node), + } + } + + #[inline] + fn visit_method_kind(&mut self, node: &MethodKind) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_method_kind(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_method_kind(visitor, node), + } + } + + #[inline] + fn visit_method_prop(&mut self, node: &MethodProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_method_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_method_prop(visitor, node), + } + } + + #[inline] + fn visit_module(&mut self, node: &Module<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_module(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_module(visitor, node), + } + } + + #[inline] + fn visit_module_decl(&mut self, node: &ModuleDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_module_decl(visitor, node), + } + } + + #[inline] + fn visit_module_export_name(&mut self, node: &ModuleExportName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_module_export_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_module_export_name(visitor, node), + } + } + + #[inline] + fn visit_module_item(&mut self, node: &ModuleItem<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_module_item(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_module_item(visitor, node), + } + } + + #[inline] + fn visit_module_items(&mut self, node: &[ModuleItem<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_module_items(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_module_items(visitor, node), + } + } + + #[inline] + fn visit_named_export(&mut self, node: &NamedExport<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_named_export(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_named_export(visitor, node), + } + } + + #[inline] + fn visit_new_expr(&mut self, node: &NewExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_new_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_new_expr(visitor, node), + } + } + + #[inline] + fn visit_null(&mut self, node: &Null) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_null(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_null(visitor, node), + } + } + + #[inline] + fn visit_number(&mut self, node: &Number) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_number(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_number(visitor, node), + } + } + + #[inline] + fn visit_object_lit(&mut self, node: &ObjectLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_object_lit(visitor, node), + } + } + + #[inline] + fn visit_object_pat(&mut self, node: &ObjectPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_object_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_object_pat(visitor, node), + } + } + + #[inline] + fn visit_object_pat_prop(&mut self, node: &ObjectPatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_object_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_object_pat_prop(visitor, node), + } + } + + #[inline] + fn visit_object_pat_props(&mut self, node: &[ObjectPatProp<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_object_pat_props(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_object_pat_props(visitor, node), + } + } + + #[inline] + fn visit_opt_accessibility(&mut self, node: &Option) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_accessibility(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_accessibility(visitor, node), + } + } + + #[inline] + fn visit_opt_atom(&mut self, node: &Option) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_atom(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_atom(visitor, node), + } + } + + #[inline] + fn visit_opt_block_stmt(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_block_stmt(visitor, node), + } + } + + #[inline] + fn visit_opt_call(&mut self, node: &OptCall<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_call(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_call(visitor, node), + } + } + + #[inline] + fn visit_opt_catch_clause(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_catch_clause(visitor, node), + } + } + + #[inline] + fn visit_opt_chain_base(&mut self, node: &OptChainBase<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_chain_base(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_chain_base(visitor, node), + } + } + + #[inline] + fn visit_opt_chain_expr(&mut self, node: &OptChainExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_chain_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_chain_expr(visitor, node), + } + } + + #[inline] + fn visit_opt_expr(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_expr(visitor, node), + } + } + + #[inline] + fn visit_opt_expr_or_spread(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_expr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_expr_or_spread(visitor, node), + } + } + + #[inline] + fn visit_opt_expr_or_spreads(&mut self, node: &Option>>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_opt_ident(&mut self, node: &Option) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ident(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ident(visitor, node), + } + } + + #[inline] + fn visit_opt_jsx_attr_value(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_jsx_attr_value(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_jsx_attr_value(visitor, node), + } + } + + #[inline] + fn visit_opt_jsx_closing_element(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_jsx_closing_element(visitor, node), + swc_visit::Either::Right(visitor) => { + Visit::visit_opt_jsx_closing_element(visitor, node) + } + } + } + + #[inline] + fn visit_opt_module_export_name(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_module_export_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_module_export_name(visitor, node), + } + } + + #[inline] + fn visit_opt_object_lit(&mut self, node: &Option>>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_object_lit(visitor, node), + } + } + + #[inline] + fn visit_opt_pat(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_pat(visitor, node), + } + } + + #[inline] + fn visit_opt_span(&mut self, node: &Option) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_span(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_span(visitor, node), + } + } + + #[inline] + fn visit_opt_stmt(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_stmt(visitor, node), + } + } + + #[inline] + fn visit_opt_str(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_str(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_str(visitor, node), + } + } + + #[inline] + fn visit_opt_true_plus_minus(&mut self, node: &Option) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_true_plus_minus(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_true_plus_minus(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_entity_name(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ts_entity_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ts_entity_name(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_namespace_body(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ts_namespace_body(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ts_namespace_body(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_type(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ts_type(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_type_ann(&mut self, node: &Option>>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ts_type_ann(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_type_param_decl(&mut self, node: &Option>>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_ts_type_param_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_ts_type_param_decl(visitor, node), + } + } + + #[inline] + fn visit_opt_ts_type_param_instantiation( + &mut self, + node: &Option>>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_opt_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_opt_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn visit_opt_var_decl_or_expr(&mut self, node: &Option>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_var_decl_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_var_decl_or_expr(visitor, node), + } + } + + #[inline] + fn visit_opt_vec_expr_or_spreads(&mut self, node: &[Option>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_vec_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => { + Visit::visit_opt_vec_expr_or_spreads(visitor, node) + } + } + } + + #[inline] + fn visit_opt_vec_pats(&mut self, node: &[Option>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_opt_vec_pats(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_opt_vec_pats(visitor, node), + } + } + + #[inline] + fn visit_param(&mut self, node: &Param<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_param(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_param(visitor, node), + } + } + + #[inline] + fn visit_param_or_ts_param_prop(&mut self, node: &ParamOrTsParamProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_param_or_ts_param_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_param_or_ts_param_prop(visitor, node), + } + } + + #[inline] + fn visit_param_or_ts_param_props(&mut self, node: &[ParamOrTsParamProp<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_param_or_ts_param_props(visitor, node), + swc_visit::Either::Right(visitor) => { + Visit::visit_param_or_ts_param_props(visitor, node) + } + } + } + + #[inline] + fn visit_params(&mut self, node: &[Param<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_params(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_params(visitor, node), + } + } + + #[inline] + fn visit_paren_expr(&mut self, node: &ParenExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_paren_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_paren_expr(visitor, node), + } + } + + #[inline] + fn visit_pat(&mut self, node: &Pat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_pat(visitor, node), + } + } + + #[inline] + fn visit_pats(&mut self, node: &[Pat<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_pats(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_pats(visitor, node), + } + } + + #[inline] + fn visit_private_method(&mut self, node: &PrivateMethod<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_private_method(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_private_method(visitor, node), + } + } + + #[inline] + fn visit_private_name(&mut self, node: &PrivateName) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_private_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_private_name(visitor, node), + } + } + + #[inline] + fn visit_private_prop(&mut self, node: &PrivateProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_private_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_private_prop(visitor, node), + } + } + + #[inline] + fn visit_program(&mut self, node: &Program<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_program(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_program(visitor, node), + } + } + + #[inline] + fn visit_prop(&mut self, node: &Prop<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_prop(visitor, node), + } + } + + #[inline] + fn visit_prop_name(&mut self, node: &PropName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_prop_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_prop_name(visitor, node), + } + } + + #[inline] + fn visit_prop_or_spread(&mut self, node: &PropOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_prop_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_prop_or_spread(visitor, node), + } + } + + #[inline] + fn visit_prop_or_spreads(&mut self, node: &[PropOrSpread<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_prop_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_prop_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_regex(&mut self, node: &Regex) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_regex(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_regex(visitor, node), + } + } + + #[inline] + fn visit_rest_pat(&mut self, node: &RestPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_rest_pat(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_rest_pat(visitor, node), + } + } + + #[inline] + fn visit_return_stmt(&mut self, node: &ReturnStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_return_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_return_stmt(visitor, node), + } + } + + #[inline] + fn visit_script(&mut self, node: &Script<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_script(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_script(visitor, node), + } + } + + #[inline] + fn visit_seq_expr(&mut self, node: &SeqExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_seq_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_seq_expr(visitor, node), + } + } + + #[inline] + fn visit_setter_prop(&mut self, node: &SetterProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_setter_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_setter_prop(visitor, node), + } + } + + #[inline] + fn visit_simple_assign_target(&mut self, node: &SimpleAssignTarget<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_simple_assign_target(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_simple_assign_target(visitor, node), + } + } + + #[inline] + fn visit_span(&mut self, node: &swc_common::Span) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_span(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_span(visitor, node), + } + } + + #[inline] + fn visit_spread_element(&mut self, node: &SpreadElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_spread_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_spread_element(visitor, node), + } + } + + #[inline] + fn visit_static_block(&mut self, node: &StaticBlock<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_static_block(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_static_block(visitor, node), + } + } + + #[inline] + fn visit_stmt(&mut self, node: &Stmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_stmt(visitor, node), + } + } + + #[inline] + fn visit_stmts(&mut self, node: &[Stmt<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_stmts(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_stmts(visitor, node), + } + } + + #[inline] + fn visit_str(&mut self, node: &Str) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_str(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_str(visitor, node), + } + } + + #[inline] + fn visit_super(&mut self, node: &Super) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_super(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_super(visitor, node), + } + } + + #[inline] + fn visit_super_prop(&mut self, node: &SuperProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_super_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_super_prop(visitor, node), + } + } + + #[inline] + fn visit_super_prop_expr(&mut self, node: &SuperPropExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_super_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_super_prop_expr(visitor, node), + } + } + + #[inline] + fn visit_switch_case(&mut self, node: &SwitchCase<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_switch_case(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_switch_case(visitor, node), + } + } + + #[inline] + fn visit_switch_cases(&mut self, node: &[SwitchCase<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_switch_cases(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_switch_cases(visitor, node), + } + } + + #[inline] + fn visit_switch_stmt(&mut self, node: &SwitchStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_switch_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_switch_stmt(visitor, node), + } + } + + #[inline] + fn visit_syntax_context(&mut self, node: &swc_common::SyntaxContext) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_syntax_context(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_syntax_context(visitor, node), + } + } + + #[inline] + fn visit_tagged_tpl(&mut self, node: &TaggedTpl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_tagged_tpl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_tagged_tpl(visitor, node), + } + } + + #[inline] + fn visit_this_expr(&mut self, node: &ThisExpr) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_this_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_this_expr(visitor, node), + } + } + + #[inline] + fn visit_throw_stmt(&mut self, node: &ThrowStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_throw_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_throw_stmt(visitor, node), + } + } + + #[inline] + fn visit_tpl(&mut self, node: &Tpl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_tpl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_tpl(visitor, node), + } + } + + #[inline] + fn visit_tpl_element(&mut self, node: &TplElement) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_tpl_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_tpl_element(visitor, node), + } + } + + #[inline] + fn visit_tpl_elements(&mut self, node: &[TplElement]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_tpl_elements(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_tpl_elements(visitor, node), + } + } + + #[inline] + fn visit_true_plus_minus(&mut self, node: &TruePlusMinus) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_true_plus_minus(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_true_plus_minus(visitor, node), + } + } + + #[inline] + fn visit_try_stmt(&mut self, node: &TryStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_try_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_try_stmt(visitor, node), + } + } + + #[inline] + fn visit_ts_array_type(&mut self, node: &TsArrayType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_array_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_array_type(visitor, node), + } + } + + #[inline] + fn visit_ts_as_expr(&mut self, node: &TsAsExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_as_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_as_expr(visitor, node), + } + } + + #[inline] + fn visit_ts_call_signature_decl(&mut self, node: &TsCallSignatureDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_call_signature_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_call_signature_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_conditional_type(&mut self, node: &TsConditionalType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_conditional_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_conditional_type(visitor, node), + } + } + + #[inline] + fn visit_ts_const_assertion(&mut self, node: &TsConstAssertion<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_const_assertion(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_const_assertion(visitor, node), + } + } + + #[inline] + fn visit_ts_construct_signature_decl(&mut self, node: &TsConstructSignatureDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_ts_construct_signature_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_construct_signature_decl(visitor, node) + } + } + } + + #[inline] + fn visit_ts_constructor_type(&mut self, node: &TsConstructorType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_constructor_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_constructor_type(visitor, node), + } + } + + #[inline] + fn visit_ts_entity_name(&mut self, node: &TsEntityName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_entity_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_entity_name(visitor, node), + } + } + + #[inline] + fn visit_ts_enum_decl(&mut self, node: &TsEnumDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_enum_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_enum_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_enum_member(&mut self, node: &TsEnumMember<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_enum_member(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_enum_member(visitor, node), + } + } + + #[inline] + fn visit_ts_enum_member_id(&mut self, node: &TsEnumMemberId<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_enum_member_id(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_enum_member_id(visitor, node), + } + } + + #[inline] + fn visit_ts_enum_members(&mut self, node: &[TsEnumMember<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_enum_members(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_enum_members(visitor, node), + } + } + + #[inline] + fn visit_ts_export_assignment(&mut self, node: &TsExportAssignment<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_export_assignment(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_export_assignment(visitor, node), + } + } + + #[inline] + fn visit_ts_expr_with_type_args(&mut self, node: &TsExprWithTypeArgs<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_expr_with_type_args(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_expr_with_type_args(visitor, node), + } + } + + #[inline] + fn visit_ts_expr_with_type_argss(&mut self, node: &[TsExprWithTypeArgs<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_expr_with_type_argss(visitor, node), + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_expr_with_type_argss(visitor, node) + } + } + } + + #[inline] + fn visit_ts_external_module_ref(&mut self, node: &TsExternalModuleRef) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_external_module_ref(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_external_module_ref(visitor, node), + } + } + + #[inline] + fn visit_ts_fn_or_constructor_type(&mut self, node: &TsFnOrConstructorType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_ts_fn_or_constructor_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_fn_or_constructor_type(visitor, node) + } + } + } + + #[inline] + fn visit_ts_fn_param(&mut self, node: &TsFnParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_fn_param(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_fn_param(visitor, node), + } + } + + #[inline] + fn visit_ts_fn_params(&mut self, node: &[TsFnParam<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_fn_params(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_fn_params(visitor, node), + } + } + + #[inline] + fn visit_ts_fn_type(&mut self, node: &TsFnType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_fn_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_fn_type(visitor, node), + } + } + + #[inline] + fn visit_ts_getter_signature(&mut self, node: &TsGetterSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_getter_signature(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_getter_signature(visitor, node), + } + } + + #[inline] + fn visit_ts_import_equals_decl(&mut self, node: &TsImportEqualsDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_import_equals_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_import_equals_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_import_type(&mut self, node: &TsImportType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_import_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_import_type(visitor, node), + } + } + + #[inline] + fn visit_ts_index_signature(&mut self, node: &TsIndexSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_index_signature(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_index_signature(visitor, node), + } + } + + #[inline] + fn visit_ts_indexed_access_type(&mut self, node: &TsIndexedAccessType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_indexed_access_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_indexed_access_type(visitor, node), + } + } + + #[inline] + fn visit_ts_infer_type(&mut self, node: &TsInferType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_infer_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_infer_type(visitor, node), + } + } + + #[inline] + fn visit_ts_instantiation(&mut self, node: &TsInstantiation<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_instantiation(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_instantiation(visitor, node), + } + } + + #[inline] + fn visit_ts_interface_body(&mut self, node: &TsInterfaceBody<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_interface_body(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_interface_body(visitor, node), + } + } + + #[inline] + fn visit_ts_interface_decl(&mut self, node: &TsInterfaceDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_interface_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_interface_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_intersection_type(&mut self, node: &TsIntersectionType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_intersection_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_intersection_type(visitor, node), + } + } + + #[inline] + fn visit_ts_keyword_type(&mut self, node: &TsKeywordType) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_keyword_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_keyword_type(visitor, node), + } + } + + #[inline] + fn visit_ts_keyword_type_kind(&mut self, node: &TsKeywordTypeKind) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_keyword_type_kind(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_keyword_type_kind(visitor, node), + } + } + + #[inline] + fn visit_ts_lit(&mut self, node: &TsLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_lit(visitor, node), + } + } + + #[inline] + fn visit_ts_lit_type(&mut self, node: &TsLitType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_lit_type(visitor, node), + } + } + + #[inline] + fn visit_ts_mapped_type(&mut self, node: &TsMappedType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_mapped_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_mapped_type(visitor, node), + } + } + + #[inline] + fn visit_ts_method_signature(&mut self, node: &TsMethodSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_method_signature(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_method_signature(visitor, node), + } + } + + #[inline] + fn visit_ts_module_block(&mut self, node: &TsModuleBlock<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_module_block(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_module_block(visitor, node), + } + } + + #[inline] + fn visit_ts_module_decl(&mut self, node: &TsModuleDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_module_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_module_name(&mut self, node: &TsModuleName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_module_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_module_name(visitor, node), + } + } + + #[inline] + fn visit_ts_module_ref(&mut self, node: &TsModuleRef<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_module_ref(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_module_ref(visitor, node), + } + } + + #[inline] + fn visit_ts_namespace_body(&mut self, node: &TsNamespaceBody<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_namespace_body(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_namespace_body(visitor, node), + } + } + + #[inline] + fn visit_ts_namespace_decl(&mut self, node: &TsNamespaceDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_namespace_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_namespace_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_namespace_export_decl(&mut self, node: &TsNamespaceExportDecl) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_ts_namespace_export_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_namespace_export_decl(visitor, node) + } + } + } + + #[inline] + fn visit_ts_non_null_expr(&mut self, node: &TsNonNullExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_non_null_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_non_null_expr(visitor, node), + } + } + + #[inline] + fn visit_ts_optional_type(&mut self, node: &TsOptionalType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_optional_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_optional_type(visitor, node), + } + } + + #[inline] + fn visit_ts_param_prop(&mut self, node: &TsParamProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_param_prop(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_param_prop(visitor, node), + } + } + + #[inline] + fn visit_ts_param_prop_param(&mut self, node: &TsParamPropParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_param_prop_param(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_param_prop_param(visitor, node), + } + } + + #[inline] + fn visit_ts_parenthesized_type(&mut self, node: &TsParenthesizedType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_parenthesized_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_parenthesized_type(visitor, node), + } + } + + #[inline] + fn visit_ts_property_signature(&mut self, node: &TsPropertySignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_property_signature(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_property_signature(visitor, node), + } + } + + #[inline] + fn visit_ts_qualified_name(&mut self, node: &TsQualifiedName<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_qualified_name(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_qualified_name(visitor, node), + } + } + + #[inline] + fn visit_ts_rest_type(&mut self, node: &TsRestType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_rest_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_rest_type(visitor, node), + } + } + + #[inline] + fn visit_ts_satisfies_expr(&mut self, node: &TsSatisfiesExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_satisfies_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_satisfies_expr(visitor, node), + } + } + + #[inline] + fn visit_ts_setter_signature(&mut self, node: &TsSetterSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_setter_signature(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_setter_signature(visitor, node), + } + } + + #[inline] + fn visit_ts_this_type(&mut self, node: &TsThisType) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_this_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_this_type(visitor, node), + } + } + + #[inline] + fn visit_ts_this_type_or_ident(&mut self, node: &TsThisTypeOrIdent<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_this_type_or_ident(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_this_type_or_ident(visitor, node), + } + } + + #[inline] + fn visit_ts_tpl_lit_type(&mut self, node: &TsTplLitType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_tpl_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_tpl_lit_type(visitor, node), + } + } + + #[inline] + fn visit_ts_tuple_element(&mut self, node: &TsTupleElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_tuple_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_tuple_element(visitor, node), + } + } + + #[inline] + fn visit_ts_tuple_elements(&mut self, node: &[TsTupleElement<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_tuple_elements(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_tuple_elements(visitor, node), + } + } + + #[inline] + fn visit_ts_tuple_type(&mut self, node: &TsTupleType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_tuple_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_tuple_type(visitor, node), + } + } + + #[inline] + fn visit_ts_type(&mut self, node: &TsType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type(visitor, node), + } + } + + #[inline] + fn visit_ts_type_alias_decl(&mut self, node: &TsTypeAliasDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_alias_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_alias_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_type_ann(&mut self, node: &TsTypeAnn<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_ann(visitor, node), + } + } + + #[inline] + fn visit_ts_type_assertion(&mut self, node: &TsTypeAssertion<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_assertion(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_assertion(visitor, node), + } + } + + #[inline] + fn visit_ts_type_element(&mut self, node: &TsTypeElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_element(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_element(visitor, node), + } + } + + #[inline] + fn visit_ts_type_elements(&mut self, node: &[TsTypeElement<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_elements(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_elements(visitor, node), + } + } + + #[inline] + fn visit_ts_type_lit(&mut self, node: &TsTypeLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_lit(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_lit(visitor, node), + } + } + + #[inline] + fn visit_ts_type_operator(&mut self, node: &TsTypeOperator<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_operator(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_operator(visitor, node), + } + } + + #[inline] + fn visit_ts_type_operator_op(&mut self, node: &TsTypeOperatorOp) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_operator_op(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_operator_op(visitor, node), + } + } + + #[inline] + fn visit_ts_type_param(&mut self, node: &TsTypeParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_param(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_param(visitor, node), + } + } + + #[inline] + fn visit_ts_type_param_decl(&mut self, node: &TsTypeParamDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_param_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_param_decl(visitor, node), + } + } + + #[inline] + fn visit_ts_type_param_instantiation(&mut self, node: &TsTypeParamInstantiation<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn visit_ts_type_params(&mut self, node: &[TsTypeParam<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_params(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_params(visitor, node), + } + } + + #[inline] + fn visit_ts_type_predicate(&mut self, node: &TsTypePredicate<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_predicate(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_predicate(visitor, node), + } + } + + #[inline] + fn visit_ts_type_query(&mut self, node: &TsTypeQuery<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_query(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_query(visitor, node), + } + } + + #[inline] + fn visit_ts_type_query_expr(&mut self, node: &TsTypeQueryExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_query_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_query_expr(visitor, node), + } + } + + #[inline] + fn visit_ts_type_ref(&mut self, node: &TsTypeRef<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_type_ref(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_type_ref(visitor, node), + } + } + + #[inline] + fn visit_ts_types(&mut self, node: &[TsType<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_types(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_types(visitor, node), + } + } + + #[inline] + fn visit_ts_union_or_intersection_type(&mut self, node: &TsUnionOrIntersectionType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + Visit::visit_ts_union_or_intersection_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Visit::visit_ts_union_or_intersection_type(visitor, node) + } + } + } + + #[inline] + fn visit_ts_union_type(&mut self, node: &TsUnionType<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_ts_union_type(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_ts_union_type(visitor, node), + } + } + + #[inline] + fn visit_unary_expr(&mut self, node: &UnaryExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_unary_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_unary_expr(visitor, node), + } + } + + #[inline] + fn visit_unary_op(&mut self, node: &UnaryOp) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_unary_op(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_unary_op(visitor, node), + } + } + + #[inline] + fn visit_update_expr(&mut self, node: &UpdateExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_update_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_update_expr(visitor, node), + } + } + + #[inline] + fn visit_update_op(&mut self, node: &UpdateOp) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_update_op(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_update_op(visitor, node), + } + } + + #[inline] + fn visit_using_decl(&mut self, node: &UsingDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_using_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_using_decl(visitor, node), + } + } + + #[inline] + fn visit_var_decl(&mut self, node: &VarDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_var_decl(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_var_decl(visitor, node), + } + } + + #[inline] + fn visit_var_decl_kind(&mut self, node: &VarDeclKind) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_var_decl_kind(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_var_decl_kind(visitor, node), + } + } + + #[inline] + fn visit_var_decl_or_expr(&mut self, node: &VarDeclOrExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_var_decl_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_var_decl_or_expr(visitor, node), + } + } + + #[inline] + fn visit_var_declarator(&mut self, node: &VarDeclarator<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_var_declarator(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_var_declarator(visitor, node), + } + } + + #[inline] + fn visit_var_declarators(&mut self, node: &[VarDeclarator<'a>]) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_var_declarators(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_var_declarators(visitor, node), + } + } + + #[inline] + fn visit_while_stmt(&mut self, node: &WhileStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_while_stmt(visitor, node), + } + } + + #[inline] + fn visit_with_stmt(&mut self, node: &WithStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_with_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_with_stmt(visitor, node), + } + } + + #[inline] + fn visit_yield_expr(&mut self, node: &YieldExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => Visit::visit_yield_expr(visitor, node), + swc_visit::Either::Right(visitor) => Visit::visit_yield_expr(visitor, node), + } + } +} +impl<'a, V> Visit<'a> for ::swc_visit::Optional +where + V: Visit<'a>, +{ + #[inline] + fn visit_accessibility(&mut self, node: &Accessibility) { + if self.enabled { + ::visit_accessibility(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_array_lit(&mut self, node: &ArrayLit<'a>) { + if self.enabled { + ::visit_array_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_array_pat(&mut self, node: &ArrayPat<'a>) { + if self.enabled { + ::visit_array_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_arrow_expr(&mut self, node: &ArrowExpr<'a>) { + if self.enabled { + ::visit_arrow_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_expr(&mut self, node: &AssignExpr<'a>) { + if self.enabled { + ::visit_assign_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_op(&mut self, node: &AssignOp) { + if self.enabled { + ::visit_assign_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_pat(&mut self, node: &AssignPat<'a>) { + if self.enabled { + ::visit_assign_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_pat_prop(&mut self, node: &AssignPatProp<'a>) { + if self.enabled { + ::visit_assign_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_prop(&mut self, node: &AssignProp<'a>) { + if self.enabled { + ::visit_assign_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_target(&mut self, node: &AssignTarget<'a>) { + if self.enabled { + ::visit_assign_target(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_assign_target_pat(&mut self, node: &AssignTargetPat<'a>) { + if self.enabled { + ::visit_assign_target_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_atom(&mut self, node: &swc_atoms::Atom) { + if self.enabled { + ::visit_atom(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_auto_accessor(&mut self, node: &AutoAccessor<'a>) { + if self.enabled { + ::visit_auto_accessor(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_await_expr(&mut self, node: &AwaitExpr<'a>) { + if self.enabled { + ::visit_await_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_big_int(&mut self, node: &BigInt<'a>) { + if self.enabled { + ::visit_big_int(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_big_int_value(&mut self, node: &BigIntValue) { + if self.enabled { + ::visit_big_int_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_bin_expr(&mut self, node: &BinExpr<'a>) { + if self.enabled { + ::visit_bin_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_binary_op(&mut self, node: &BinaryOp) { + if self.enabled { + ::visit_binary_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_binding_ident(&mut self, node: &BindingIdent<'a>) { + if self.enabled { + ::visit_binding_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_block_stmt(&mut self, node: &BlockStmt<'a>) { + if self.enabled { + ::visit_block_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_block_stmt_or_expr(&mut self, node: &BlockStmtOrExpr<'a>) { + if self.enabled { + ::visit_block_stmt_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_bool(&mut self, node: &Bool) { + if self.enabled { + ::visit_bool(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_break_stmt(&mut self, node: &BreakStmt) { + if self.enabled { + ::visit_break_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_call_expr(&mut self, node: &CallExpr<'a>) { + if self.enabled { + ::visit_call_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_callee(&mut self, node: &Callee<'a>) { + if self.enabled { + ::visit_callee(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_catch_clause(&mut self, node: &CatchClause<'a>) { + if self.enabled { + ::visit_catch_clause(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class(&mut self, node: &Class<'a>) { + if self.enabled { + ::visit_class(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_decl(&mut self, node: &ClassDecl<'a>) { + if self.enabled { + ::visit_class_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_expr(&mut self, node: &ClassExpr<'a>) { + if self.enabled { + ::visit_class_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_member(&mut self, node: &ClassMember<'a>) { + if self.enabled { + ::visit_class_member(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_members(&mut self, node: &[ClassMember<'a>]) { + if self.enabled { + ::visit_class_members(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_method(&mut self, node: &ClassMethod<'a>) { + if self.enabled { + ::visit_class_method(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_class_prop(&mut self, node: &ClassProp<'a>) { + if self.enabled { + ::visit_class_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_computed_prop_name(&mut self, node: &ComputedPropName<'a>) { + if self.enabled { + ::visit_computed_prop_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_cond_expr(&mut self, node: &CondExpr<'a>) { + if self.enabled { + ::visit_cond_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_constructor(&mut self, node: &Constructor<'a>) { + if self.enabled { + ::visit_constructor(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_continue_stmt(&mut self, node: &ContinueStmt) { + if self.enabled { + ::visit_continue_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_debugger_stmt(&mut self, node: &DebuggerStmt) { + if self.enabled { + ::visit_debugger_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_decl(&mut self, node: &Decl<'a>) { + if self.enabled { + ::visit_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_decorator(&mut self, node: &Decorator<'a>) { + if self.enabled { + ::visit_decorator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_decorators(&mut self, node: &[Decorator<'a>]) { + if self.enabled { + ::visit_decorators(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_default_decl(&mut self, node: &DefaultDecl<'a>) { + if self.enabled { + ::visit_default_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_do_while_stmt(&mut self, node: &DoWhileStmt<'a>) { + if self.enabled { + ::visit_do_while_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_empty_stmt(&mut self, node: &EmptyStmt) { + if self.enabled { + ::visit_empty_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_all(&mut self, node: &ExportAll<'a>) { + if self.enabled { + ::visit_export_all(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_decl(&mut self, node: &ExportDecl<'a>) { + if self.enabled { + ::visit_export_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl<'a>) { + if self.enabled { + ::visit_export_default_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr<'a>) { + if self.enabled { + ::visit_export_default_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_default_specifier(&mut self, node: &ExportDefaultSpecifier) { + if self.enabled { + ::visit_export_default_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_named_specifier(&mut self, node: &ExportNamedSpecifier<'a>) { + if self.enabled { + ::visit_export_named_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_namespace_specifier(&mut self, node: &ExportNamespaceSpecifier<'a>) { + if self.enabled { + ::visit_export_namespace_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_specifier(&mut self, node: &ExportSpecifier<'a>) { + if self.enabled { + ::visit_export_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_export_specifiers(&mut self, node: &[ExportSpecifier<'a>]) { + if self.enabled { + ::visit_export_specifiers(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_expr(&mut self, node: &Expr<'a>) { + if self.enabled { + ::visit_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_expr_or_spread(&mut self, node: &ExprOrSpread<'a>) { + if self.enabled { + ::visit_expr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_expr_or_spreads(&mut self, node: &[ExprOrSpread<'a>]) { + if self.enabled { + ::visit_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_expr_stmt(&mut self, node: &ExprStmt<'a>) { + if self.enabled { + ::visit_expr_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_exprs(&mut self, node: &[Expr<'a>]) { + if self.enabled { + ::visit_exprs(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_fn_decl(&mut self, node: &FnDecl<'a>) { + if self.enabled { + ::visit_fn_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_fn_expr(&mut self, node: &FnExpr<'a>) { + if self.enabled { + ::visit_fn_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_for_head(&mut self, node: &ForHead<'a>) { + if self.enabled { + ::visit_for_head(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_for_in_stmt(&mut self, node: &ForInStmt<'a>) { + if self.enabled { + ::visit_for_in_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_for_of_stmt(&mut self, node: &ForOfStmt<'a>) { + if self.enabled { + ::visit_for_of_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_for_stmt(&mut self, node: &ForStmt<'a>) { + if self.enabled { + ::visit_for_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_function(&mut self, node: &Function<'a>) { + if self.enabled { + ::visit_function(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_getter_prop(&mut self, node: &GetterProp<'a>) { + if self.enabled { + ::visit_getter_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ident(&mut self, node: &Ident) { + if self.enabled { + ::visit_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ident_name(&mut self, node: &IdentName) { + if self.enabled { + ::visit_ident_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_if_stmt(&mut self, node: &IfStmt<'a>) { + if self.enabled { + ::visit_if_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import(&mut self, node: &Import) { + if self.enabled { + ::visit_import(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_decl(&mut self, node: &ImportDecl<'a>) { + if self.enabled { + ::visit_import_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_default_specifier(&mut self, node: &ImportDefaultSpecifier) { + if self.enabled { + ::visit_import_default_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_named_specifier(&mut self, node: &ImportNamedSpecifier<'a>) { + if self.enabled { + ::visit_import_named_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_phase(&mut self, node: &ImportPhase) { + if self.enabled { + ::visit_import_phase(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_specifier(&mut self, node: &ImportSpecifier<'a>) { + if self.enabled { + ::visit_import_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_specifiers(&mut self, node: &[ImportSpecifier<'a>]) { + if self.enabled { + ::visit_import_specifiers(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_star_as_specifier(&mut self, node: &ImportStarAsSpecifier) { + if self.enabled { + ::visit_import_star_as_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_with(&mut self, node: &ImportWith<'a>) { + if self.enabled { + ::visit_import_with(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_with_item(&mut self, node: &ImportWithItem) { + if self.enabled { + ::visit_import_with_item(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_import_with_items(&mut self, node: &[ImportWithItem]) { + if self.enabled { + ::visit_import_with_items(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_invalid(&mut self, node: &Invalid) { + if self.enabled { + ::visit_invalid(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_attr(&mut self, node: &JSXAttr<'a>) { + if self.enabled { + ::visit_jsx_attr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_attr_name(&mut self, node: &JSXAttrName<'a>) { + if self.enabled { + ::visit_jsx_attr_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_attr_or_spread(&mut self, node: &JSXAttrOrSpread<'a>) { + if self.enabled { + ::visit_jsx_attr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_attr_or_spreads(&mut self, node: &[JSXAttrOrSpread<'a>]) { + if self.enabled { + ::visit_jsx_attr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_attr_value(&mut self, node: &JSXAttrValue<'a>) { + if self.enabled { + ::visit_jsx_attr_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_closing_element(&mut self, node: &JSXClosingElement<'a>) { + if self.enabled { + ::visit_jsx_closing_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_closing_fragment(&mut self, node: &JSXClosingFragment) { + if self.enabled { + ::visit_jsx_closing_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_element(&mut self, node: &JSXElement<'a>) { + if self.enabled { + ::visit_jsx_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_element_child(&mut self, node: &JSXElementChild<'a>) { + if self.enabled { + ::visit_jsx_element_child(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_element_childs(&mut self, node: &[JSXElementChild<'a>]) { + if self.enabled { + ::visit_jsx_element_childs(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_element_name(&mut self, node: &JSXElementName<'a>) { + if self.enabled { + ::visit_jsx_element_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_empty_expr(&mut self, node: &JSXEmptyExpr) { + if self.enabled { + ::visit_jsx_empty_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_expr(&mut self, node: &JSXExpr<'a>) { + if self.enabled { + ::visit_jsx_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_expr_container(&mut self, node: &JSXExprContainer<'a>) { + if self.enabled { + ::visit_jsx_expr_container(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_fragment(&mut self, node: &JSXFragment<'a>) { + if self.enabled { + ::visit_jsx_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_member_expr(&mut self, node: &JSXMemberExpr<'a>) { + if self.enabled { + ::visit_jsx_member_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_namespaced_name(&mut self, node: &JSXNamespacedName) { + if self.enabled { + ::visit_jsx_namespaced_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_object(&mut self, node: &JSXObject<'a>) { + if self.enabled { + ::visit_jsx_object(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_opening_element(&mut self, node: &JSXOpeningElement<'a>) { + if self.enabled { + ::visit_jsx_opening_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_opening_fragment(&mut self, node: &JSXOpeningFragment) { + if self.enabled { + ::visit_jsx_opening_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_spread_child(&mut self, node: &JSXSpreadChild<'a>) { + if self.enabled { + ::visit_jsx_spread_child(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_jsx_text(&mut self, node: &JSXText) { + if self.enabled { + ::visit_jsx_text(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_key(&mut self, node: &Key<'a>) { + if self.enabled { + ::visit_key(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_key_value_pat_prop(&mut self, node: &KeyValuePatProp<'a>) { + if self.enabled { + ::visit_key_value_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_key_value_prop(&mut self, node: &KeyValueProp<'a>) { + if self.enabled { + ::visit_key_value_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_labeled_stmt(&mut self, node: &LabeledStmt<'a>) { + if self.enabled { + ::visit_labeled_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_lit(&mut self, node: &Lit<'a>) { + if self.enabled { + ::visit_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_member_expr(&mut self, node: &MemberExpr<'a>) { + if self.enabled { + ::visit_member_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_member_prop(&mut self, node: &MemberProp<'a>) { + if self.enabled { + ::visit_member_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_meta_prop_expr(&mut self, node: &MetaPropExpr) { + if self.enabled { + ::visit_meta_prop_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_meta_prop_kind(&mut self, node: &MetaPropKind) { + if self.enabled { + ::visit_meta_prop_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_method_kind(&mut self, node: &MethodKind) { + if self.enabled { + ::visit_method_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_method_prop(&mut self, node: &MethodProp<'a>) { + if self.enabled { + ::visit_method_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_module(&mut self, node: &Module<'a>) { + if self.enabled { + ::visit_module(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_module_decl(&mut self, node: &ModuleDecl<'a>) { + if self.enabled { + ::visit_module_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_module_export_name(&mut self, node: &ModuleExportName<'a>) { + if self.enabled { + ::visit_module_export_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_module_item(&mut self, node: &ModuleItem<'a>) { + if self.enabled { + ::visit_module_item(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_module_items(&mut self, node: &[ModuleItem<'a>]) { + if self.enabled { + ::visit_module_items(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_named_export(&mut self, node: &NamedExport<'a>) { + if self.enabled { + ::visit_named_export(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_new_expr(&mut self, node: &NewExpr<'a>) { + if self.enabled { + ::visit_new_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_null(&mut self, node: &Null) { + if self.enabled { + ::visit_null(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_number(&mut self, node: &Number) { + if self.enabled { + ::visit_number(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_object_lit(&mut self, node: &ObjectLit<'a>) { + if self.enabled { + ::visit_object_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_object_pat(&mut self, node: &ObjectPat<'a>) { + if self.enabled { + ::visit_object_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_object_pat_prop(&mut self, node: &ObjectPatProp<'a>) { + if self.enabled { + ::visit_object_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_object_pat_props(&mut self, node: &[ObjectPatProp<'a>]) { + if self.enabled { + ::visit_object_pat_props(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_accessibility(&mut self, node: &Option) { + if self.enabled { + ::visit_opt_accessibility(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_atom(&mut self, node: &Option) { + if self.enabled { + ::visit_opt_atom(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_block_stmt(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_block_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_call(&mut self, node: &OptCall<'a>) { + if self.enabled { + ::visit_opt_call(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_catch_clause(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_catch_clause(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_chain_base(&mut self, node: &OptChainBase<'a>) { + if self.enabled { + ::visit_opt_chain_base(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_chain_expr(&mut self, node: &OptChainExpr<'a>) { + if self.enabled { + ::visit_opt_chain_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_expr(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_expr_or_spread(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_expr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_expr_or_spreads(&mut self, node: &Option>>) { + if self.enabled { + ::visit_opt_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ident(&mut self, node: &Option) { + if self.enabled { + ::visit_opt_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_jsx_attr_value(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_jsx_attr_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_jsx_closing_element(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_jsx_closing_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_module_export_name(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_module_export_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_object_lit(&mut self, node: &Option>>) { + if self.enabled { + ::visit_opt_object_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_pat(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_span(&mut self, node: &Option) { + if self.enabled { + ::visit_opt_span(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_stmt(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_str(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_str(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_true_plus_minus(&mut self, node: &Option) { + if self.enabled { + ::visit_opt_true_plus_minus(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_entity_name(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_ts_entity_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_namespace_body(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_ts_namespace_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_type(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_ts_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_ann(&mut self, node: &Option>>) { + if self.enabled { + ::visit_opt_ts_type_ann(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_param_decl(&mut self, node: &Option>>) { + if self.enabled { + ::visit_opt_ts_type_param_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_param_instantiation( + &mut self, + node: &Option>>, + ) { + if self.enabled { + ::visit_opt_ts_type_param_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_var_decl_or_expr(&mut self, node: &Option>) { + if self.enabled { + ::visit_opt_var_decl_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_vec_expr_or_spreads(&mut self, node: &[Option>]) { + if self.enabled { + ::visit_opt_vec_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_opt_vec_pats(&mut self, node: &[Option>]) { + if self.enabled { + ::visit_opt_vec_pats(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_param(&mut self, node: &Param<'a>) { + if self.enabled { + ::visit_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_param_or_ts_param_prop(&mut self, node: &ParamOrTsParamProp<'a>) { + if self.enabled { + ::visit_param_or_ts_param_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_param_or_ts_param_props(&mut self, node: &[ParamOrTsParamProp<'a>]) { + if self.enabled { + ::visit_param_or_ts_param_props(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_params(&mut self, node: &[Param<'a>]) { + if self.enabled { + ::visit_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_paren_expr(&mut self, node: &ParenExpr<'a>) { + if self.enabled { + ::visit_paren_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_pat(&mut self, node: &Pat<'a>) { + if self.enabled { + ::visit_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_pats(&mut self, node: &[Pat<'a>]) { + if self.enabled { + ::visit_pats(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_private_method(&mut self, node: &PrivateMethod<'a>) { + if self.enabled { + ::visit_private_method(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_private_name(&mut self, node: &PrivateName) { + if self.enabled { + ::visit_private_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_private_prop(&mut self, node: &PrivateProp<'a>) { + if self.enabled { + ::visit_private_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_program(&mut self, node: &Program<'a>) { + if self.enabled { + ::visit_program(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_prop(&mut self, node: &Prop<'a>) { + if self.enabled { + ::visit_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_prop_name(&mut self, node: &PropName<'a>) { + if self.enabled { + ::visit_prop_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_prop_or_spread(&mut self, node: &PropOrSpread<'a>) { + if self.enabled { + ::visit_prop_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_prop_or_spreads(&mut self, node: &[PropOrSpread<'a>]) { + if self.enabled { + ::visit_prop_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_regex(&mut self, node: &Regex) { + if self.enabled { + ::visit_regex(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_rest_pat(&mut self, node: &RestPat<'a>) { + if self.enabled { + ::visit_rest_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_return_stmt(&mut self, node: &ReturnStmt<'a>) { + if self.enabled { + ::visit_return_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_script(&mut self, node: &Script<'a>) { + if self.enabled { + ::visit_script(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_seq_expr(&mut self, node: &SeqExpr<'a>) { + if self.enabled { + ::visit_seq_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_setter_prop(&mut self, node: &SetterProp<'a>) { + if self.enabled { + ::visit_setter_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_simple_assign_target(&mut self, node: &SimpleAssignTarget<'a>) { + if self.enabled { + ::visit_simple_assign_target(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_span(&mut self, node: &swc_common::Span) { + if self.enabled { + ::visit_span(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_spread_element(&mut self, node: &SpreadElement<'a>) { + if self.enabled { + ::visit_spread_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_static_block(&mut self, node: &StaticBlock<'a>) { + if self.enabled { + ::visit_static_block(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_stmt(&mut self, node: &Stmt<'a>) { + if self.enabled { + ::visit_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_stmts(&mut self, node: &[Stmt<'a>]) { + if self.enabled { + ::visit_stmts(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_str(&mut self, node: &Str) { + if self.enabled { + ::visit_str(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_super(&mut self, node: &Super) { + if self.enabled { + ::visit_super(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_super_prop(&mut self, node: &SuperProp<'a>) { + if self.enabled { + ::visit_super_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_super_prop_expr(&mut self, node: &SuperPropExpr<'a>) { + if self.enabled { + ::visit_super_prop_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_switch_case(&mut self, node: &SwitchCase<'a>) { + if self.enabled { + ::visit_switch_case(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_switch_cases(&mut self, node: &[SwitchCase<'a>]) { + if self.enabled { + ::visit_switch_cases(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_switch_stmt(&mut self, node: &SwitchStmt<'a>) { + if self.enabled { + ::visit_switch_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_syntax_context(&mut self, node: &swc_common::SyntaxContext) { + if self.enabled { + ::visit_syntax_context(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_tagged_tpl(&mut self, node: &TaggedTpl<'a>) { + if self.enabled { + ::visit_tagged_tpl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_this_expr(&mut self, node: &ThisExpr) { + if self.enabled { + ::visit_this_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_throw_stmt(&mut self, node: &ThrowStmt<'a>) { + if self.enabled { + ::visit_throw_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_tpl(&mut self, node: &Tpl<'a>) { + if self.enabled { + ::visit_tpl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_tpl_element(&mut self, node: &TplElement) { + if self.enabled { + ::visit_tpl_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_tpl_elements(&mut self, node: &[TplElement]) { + if self.enabled { + ::visit_tpl_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_true_plus_minus(&mut self, node: &TruePlusMinus) { + if self.enabled { + ::visit_true_plus_minus(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_try_stmt(&mut self, node: &TryStmt<'a>) { + if self.enabled { + ::visit_try_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_array_type(&mut self, node: &TsArrayType<'a>) { + if self.enabled { + ::visit_ts_array_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_as_expr(&mut self, node: &TsAsExpr<'a>) { + if self.enabled { + ::visit_ts_as_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_call_signature_decl(&mut self, node: &TsCallSignatureDecl<'a>) { + if self.enabled { + ::visit_ts_call_signature_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_conditional_type(&mut self, node: &TsConditionalType<'a>) { + if self.enabled { + ::visit_ts_conditional_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_const_assertion(&mut self, node: &TsConstAssertion<'a>) { + if self.enabled { + ::visit_ts_const_assertion(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_construct_signature_decl(&mut self, node: &TsConstructSignatureDecl<'a>) { + if self.enabled { + ::visit_ts_construct_signature_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_constructor_type(&mut self, node: &TsConstructorType<'a>) { + if self.enabled { + ::visit_ts_constructor_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_entity_name(&mut self, node: &TsEntityName<'a>) { + if self.enabled { + ::visit_ts_entity_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_enum_decl(&mut self, node: &TsEnumDecl<'a>) { + if self.enabled { + ::visit_ts_enum_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_enum_member(&mut self, node: &TsEnumMember<'a>) { + if self.enabled { + ::visit_ts_enum_member(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_enum_member_id(&mut self, node: &TsEnumMemberId<'a>) { + if self.enabled { + ::visit_ts_enum_member_id(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_enum_members(&mut self, node: &[TsEnumMember<'a>]) { + if self.enabled { + ::visit_ts_enum_members(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_export_assignment(&mut self, node: &TsExportAssignment<'a>) { + if self.enabled { + ::visit_ts_export_assignment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_expr_with_type_args(&mut self, node: &TsExprWithTypeArgs<'a>) { + if self.enabled { + ::visit_ts_expr_with_type_args(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_expr_with_type_argss(&mut self, node: &[TsExprWithTypeArgs<'a>]) { + if self.enabled { + ::visit_ts_expr_with_type_argss(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_external_module_ref(&mut self, node: &TsExternalModuleRef) { + if self.enabled { + ::visit_ts_external_module_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_fn_or_constructor_type(&mut self, node: &TsFnOrConstructorType<'a>) { + if self.enabled { + ::visit_ts_fn_or_constructor_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_fn_param(&mut self, node: &TsFnParam<'a>) { + if self.enabled { + ::visit_ts_fn_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_fn_params(&mut self, node: &[TsFnParam<'a>]) { + if self.enabled { + ::visit_ts_fn_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_fn_type(&mut self, node: &TsFnType<'a>) { + if self.enabled { + ::visit_ts_fn_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_getter_signature(&mut self, node: &TsGetterSignature<'a>) { + if self.enabled { + ::visit_ts_getter_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_import_equals_decl(&mut self, node: &TsImportEqualsDecl<'a>) { + if self.enabled { + ::visit_ts_import_equals_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_import_type(&mut self, node: &TsImportType<'a>) { + if self.enabled { + ::visit_ts_import_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_index_signature(&mut self, node: &TsIndexSignature<'a>) { + if self.enabled { + ::visit_ts_index_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_indexed_access_type(&mut self, node: &TsIndexedAccessType<'a>) { + if self.enabled { + ::visit_ts_indexed_access_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_infer_type(&mut self, node: &TsInferType<'a>) { + if self.enabled { + ::visit_ts_infer_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_instantiation(&mut self, node: &TsInstantiation<'a>) { + if self.enabled { + ::visit_ts_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_interface_body(&mut self, node: &TsInterfaceBody<'a>) { + if self.enabled { + ::visit_ts_interface_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_interface_decl(&mut self, node: &TsInterfaceDecl<'a>) { + if self.enabled { + ::visit_ts_interface_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_intersection_type(&mut self, node: &TsIntersectionType<'a>) { + if self.enabled { + ::visit_ts_intersection_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_keyword_type(&mut self, node: &TsKeywordType) { + if self.enabled { + ::visit_ts_keyword_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_keyword_type_kind(&mut self, node: &TsKeywordTypeKind) { + if self.enabled { + ::visit_ts_keyword_type_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_lit(&mut self, node: &TsLit<'a>) { + if self.enabled { + ::visit_ts_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_lit_type(&mut self, node: &TsLitType<'a>) { + if self.enabled { + ::visit_ts_lit_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_mapped_type(&mut self, node: &TsMappedType<'a>) { + if self.enabled { + ::visit_ts_mapped_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_method_signature(&mut self, node: &TsMethodSignature<'a>) { + if self.enabled { + ::visit_ts_method_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_module_block(&mut self, node: &TsModuleBlock<'a>) { + if self.enabled { + ::visit_ts_module_block(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_module_decl(&mut self, node: &TsModuleDecl<'a>) { + if self.enabled { + ::visit_ts_module_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_module_name(&mut self, node: &TsModuleName<'a>) { + if self.enabled { + ::visit_ts_module_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_module_ref(&mut self, node: &TsModuleRef<'a>) { + if self.enabled { + ::visit_ts_module_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_namespace_body(&mut self, node: &TsNamespaceBody<'a>) { + if self.enabled { + ::visit_ts_namespace_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_namespace_decl(&mut self, node: &TsNamespaceDecl<'a>) { + if self.enabled { + ::visit_ts_namespace_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_namespace_export_decl(&mut self, node: &TsNamespaceExportDecl) { + if self.enabled { + ::visit_ts_namespace_export_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_non_null_expr(&mut self, node: &TsNonNullExpr<'a>) { + if self.enabled { + ::visit_ts_non_null_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_optional_type(&mut self, node: &TsOptionalType<'a>) { + if self.enabled { + ::visit_ts_optional_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_param_prop(&mut self, node: &TsParamProp<'a>) { + if self.enabled { + ::visit_ts_param_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_param_prop_param(&mut self, node: &TsParamPropParam<'a>) { + if self.enabled { + ::visit_ts_param_prop_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_parenthesized_type(&mut self, node: &TsParenthesizedType<'a>) { + if self.enabled { + ::visit_ts_parenthesized_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_property_signature(&mut self, node: &TsPropertySignature<'a>) { + if self.enabled { + ::visit_ts_property_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_qualified_name(&mut self, node: &TsQualifiedName<'a>) { + if self.enabled { + ::visit_ts_qualified_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_rest_type(&mut self, node: &TsRestType<'a>) { + if self.enabled { + ::visit_ts_rest_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_satisfies_expr(&mut self, node: &TsSatisfiesExpr<'a>) { + if self.enabled { + ::visit_ts_satisfies_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_setter_signature(&mut self, node: &TsSetterSignature<'a>) { + if self.enabled { + ::visit_ts_setter_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_this_type(&mut self, node: &TsThisType) { + if self.enabled { + ::visit_ts_this_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_this_type_or_ident(&mut self, node: &TsThisTypeOrIdent<'a>) { + if self.enabled { + ::visit_ts_this_type_or_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_tpl_lit_type(&mut self, node: &TsTplLitType<'a>) { + if self.enabled { + ::visit_ts_tpl_lit_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_tuple_element(&mut self, node: &TsTupleElement<'a>) { + if self.enabled { + ::visit_ts_tuple_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_tuple_elements(&mut self, node: &[TsTupleElement<'a>]) { + if self.enabled { + ::visit_ts_tuple_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_tuple_type(&mut self, node: &TsTupleType<'a>) { + if self.enabled { + ::visit_ts_tuple_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type(&mut self, node: &TsType<'a>) { + if self.enabled { + ::visit_ts_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_alias_decl(&mut self, node: &TsTypeAliasDecl<'a>) { + if self.enabled { + ::visit_ts_type_alias_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_ann(&mut self, node: &TsTypeAnn<'a>) { + if self.enabled { + ::visit_ts_type_ann(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_assertion(&mut self, node: &TsTypeAssertion<'a>) { + if self.enabled { + ::visit_ts_type_assertion(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_element(&mut self, node: &TsTypeElement<'a>) { + if self.enabled { + ::visit_ts_type_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_elements(&mut self, node: &[TsTypeElement<'a>]) { + if self.enabled { + ::visit_ts_type_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_lit(&mut self, node: &TsTypeLit<'a>) { + if self.enabled { + ::visit_ts_type_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_operator(&mut self, node: &TsTypeOperator<'a>) { + if self.enabled { + ::visit_ts_type_operator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_operator_op(&mut self, node: &TsTypeOperatorOp) { + if self.enabled { + ::visit_ts_type_operator_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_param(&mut self, node: &TsTypeParam<'a>) { + if self.enabled { + ::visit_ts_type_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_param_decl(&mut self, node: &TsTypeParamDecl<'a>) { + if self.enabled { + ::visit_ts_type_param_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_param_instantiation(&mut self, node: &TsTypeParamInstantiation<'a>) { + if self.enabled { + ::visit_ts_type_param_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_params(&mut self, node: &[TsTypeParam<'a>]) { + if self.enabled { + ::visit_ts_type_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_predicate(&mut self, node: &TsTypePredicate<'a>) { + if self.enabled { + ::visit_ts_type_predicate(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_query(&mut self, node: &TsTypeQuery<'a>) { + if self.enabled { + ::visit_ts_type_query(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_query_expr(&mut self, node: &TsTypeQueryExpr<'a>) { + if self.enabled { + ::visit_ts_type_query_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_type_ref(&mut self, node: &TsTypeRef<'a>) { + if self.enabled { + ::visit_ts_type_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_types(&mut self, node: &[TsType<'a>]) { + if self.enabled { + ::visit_ts_types(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_union_or_intersection_type(&mut self, node: &TsUnionOrIntersectionType<'a>) { + if self.enabled { + ::visit_ts_union_or_intersection_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_ts_union_type(&mut self, node: &TsUnionType<'a>) { + if self.enabled { + ::visit_ts_union_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_unary_expr(&mut self, node: &UnaryExpr<'a>) { + if self.enabled { + ::visit_unary_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_unary_op(&mut self, node: &UnaryOp) { + if self.enabled { + ::visit_unary_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_update_expr(&mut self, node: &UpdateExpr<'a>) { + if self.enabled { + ::visit_update_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_update_op(&mut self, node: &UpdateOp) { + if self.enabled { + ::visit_update_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_using_decl(&mut self, node: &UsingDecl<'a>) { + if self.enabled { + ::visit_using_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_var_decl(&mut self, node: &VarDecl<'a>) { + if self.enabled { + ::visit_var_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_var_decl_kind(&mut self, node: &VarDeclKind) { + if self.enabled { + ::visit_var_decl_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_var_decl_or_expr(&mut self, node: &VarDeclOrExpr<'a>) { + if self.enabled { + ::visit_var_decl_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_var_declarator(&mut self, node: &VarDeclarator<'a>) { + if self.enabled { + ::visit_var_declarator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_var_declarators(&mut self, node: &[VarDeclarator<'a>]) { + if self.enabled { + ::visit_var_declarators(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_while_stmt(&mut self, node: &WhileStmt<'a>) { + if self.enabled { + ::visit_while_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_with_stmt(&mut self, node: &WithStmt<'a>) { + if self.enabled { + ::visit_with_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_yield_expr(&mut self, node: &YieldExpr<'a>) { + if self.enabled { + ::visit_yield_expr(&mut self.visitor, node) + } else { + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +pub trait VisitWith<'a, V: ?Sized + Visit<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn visit_with(&self, visitor: &mut V); + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn visit_children_with(&self, visitor: &mut V); +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Accessibility { + #[doc = "Calls [Visit`::visit_accessibility`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_accessibility(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Accessibility::Public => {} + Accessibility::Protected => {} + Accessibility::Private => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ArrayLit<'a> { + #[doc = "Calls [Visit`::visit_array_lit`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_array_lit(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ArrayLit { span, elems } => { + { + >::visit_with(span, visitor) + }; + { + >> as VisitWith>::visit_with(elems, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ArrayPat<'a> { + #[doc = "Calls [Visit`::visit_array_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_array_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + >> as VisitWith>::visit_with(elems, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [Visit`::visit_arrow_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_arrow_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + >> as VisitWith>::visit_with( + return_type, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignExpr<'a> { + #[doc = "Calls [Visit`::visit_assign_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(op, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + as VisitWith>::visit_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignPat<'a> { + #[doc = "Calls [Visit`::visit_assign_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignPat { span, left, right } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + as VisitWith>::visit_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [Visit`::visit_assign_pat_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_pat_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignPatProp { span, key, value } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignProp<'a> { + #[doc = "Calls [Visit`::visit_assign_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignProp { span, key, value } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(key, visitor) + }; + { + as VisitWith>::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignTarget<'a> { + #[doc = "Calls [Visit`::visit_assign_target`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_target(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignTarget::Simple { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + AssignTarget::Pat { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [Visit`::visit_assign_target_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_target_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + AssignTargetPat::Object { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + AssignTargetPat::Invalid { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [Visit`::visit_auto_accessor`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_auto_accessor(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(value, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [Visit`::visit_await_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_await_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + AwaitExpr { span, arg } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BigInt<'a> { + #[doc = "Calls [Visit`::visit_big_int`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_big_int(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BigInt { span, value, raw } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(value, visitor) + }; + { + as VisitWith>::visit_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BinExpr<'a> { + #[doc = "Calls [Visit`::visit_bin_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_bin_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BinExpr { + span, + op, + left, + right, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(op, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + as VisitWith>::visit_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BindingIdent<'a> { + #[doc = "Calls [Visit`::visit_binding_ident`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_binding_ident(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BindingIdent { id, type_ann } => { + { + >::visit_with(id, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BlockStmt<'a> { + #[doc = "Calls [Visit`::visit_block_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_block_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BlockStmt { span, ctxt, stmts } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + > as VisitWith>::visit_with(stmts, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [Visit`::visit_block_stmt_or_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_block_stmt_or_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Bool { + #[doc = "Calls [Visit`::visit_bool`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_bool(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Bool { span, value } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BreakStmt { + #[doc = "Calls [Visit`::visit_break_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_break_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + BreakStmt { span, label } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(label, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for CallExpr<'a> { + #[doc = "Calls [Visit`::visit_call_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_call_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + as VisitWith>::visit_with(callee, visitor) + }; + { + > as VisitWith>::visit_with(args, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Callee<'a> { + #[doc = "Calls [Visit`::visit_callee`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_callee(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Callee::Super { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Callee::Import { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Callee::Expr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for CatchClause<'a> { + #[doc = "Calls [Visit`::visit_catch_clause`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_catch_clause(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + CatchClause { span, param, body } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(param, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Class<'a> { + #[doc = "Calls [Visit`::visit_class`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + { + > as VisitWith>::visit_with(super_class, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + >> as VisitWith>::visit_with( + super_type_params, + visitor, + ) + }; + { + > as VisitWith>::visit_with( + implements, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ClassDecl<'a> { + #[doc = "Calls [Visit`::visit_class_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ClassDecl { + ident, + declare, + class, + } => { + { + >::visit_with(ident, visitor) + }; + { + > as VisitWith>::visit_with(class, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ClassExpr<'a> { + #[doc = "Calls [Visit`::visit_class_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ClassExpr { ident, class } => { + { + as VisitWith>::visit_with(ident, visitor) + }; + { + > as VisitWith>::visit_with(class, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ClassMember<'a> { + #[doc = "Calls [Visit`::visit_class_member`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_member(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ClassMember::Constructor { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::Method { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::PrivateMethod { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::ClassProp { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::PrivateProp { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::Empty { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::StaticBlock { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ClassMember::AutoAccessor { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ClassMethod<'a> { + #[doc = "Calls [Visit`::visit_class_method`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_method(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(function, visitor) + }; + { + >::visit_with(kind, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ClassProp<'a> { + #[doc = "Calls [Visit`::visit_class_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(value, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [Visit`::visit_computed_prop_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_computed_prop_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ComputedPropName { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for CondExpr<'a> { + #[doc = "Calls [Visit`::visit_cond_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_cond_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(test, visitor) + }; + { + as VisitWith>::visit_with(cons, visitor) + }; + { + as VisitWith>::visit_with(alt, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Constructor<'a> { + #[doc = "Calls [Visit`::visit_constructor`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_constructor(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ContinueStmt { + #[doc = "Calls [Visit`::visit_continue_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_continue_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ContinueStmt { span, label } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(label, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for DebuggerStmt { + #[doc = "Calls [Visit`::visit_debugger_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_debugger_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + DebuggerStmt { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Decl<'a> { + #[doc = "Calls [Visit`::visit_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Decl::Class { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::Fn { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::Var { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::Using { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::TsInterface { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::TsTypeAlias { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::TsEnum { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Decl::TsModule { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Decorator<'a> { + #[doc = "Calls [Visit`::visit_decorator`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_decorator(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Decorator { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [Visit`::visit_default_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_default_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + DefaultDecl::Class { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + DefaultDecl::Fn { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [Visit`::visit_do_while_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_do_while_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + DoWhileStmt { span, test, body } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(test, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for EmptyStmt { + #[doc = "Calls [Visit`::visit_empty_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_empty_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + EmptyStmt { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportAll<'a> { + #[doc = "Calls [Visit`::visit_export_all`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_all(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(src, visitor) + }; + { + >> as VisitWith>::visit_with(with, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportDecl<'a> { + #[doc = "Calls [Visit`::visit_export_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportDecl { span, decl } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(decl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [Visit`::visit_export_default_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_default_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportDefaultDecl { span, decl } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(decl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [Visit`::visit_export_default_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_default_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportDefaultExpr { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [Visit`::visit_export_default_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_default_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportDefaultSpecifier { exported } => { + { + >::visit_with(exported, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [Visit`::visit_export_named_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_named_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(orig, visitor) + }; + { + > as VisitWith>::visit_with(exported, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportNamespaceSpecifier<'a> { + #[doc = "Calls [Visit`::visit_export_namespace_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_namespace_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportNamespaceSpecifier { span, name } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [Visit`::visit_export_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + > as VisitWith>::visit_with( + _field_0, visitor, + ); + } + ExportSpecifier::Default { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + ExportSpecifier::Named { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Expr<'a> { + #[doc = "Calls [Visit`::visit_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Expr::This { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Array { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Object { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Fn { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Unary { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Update { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Bin { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Assign { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Member { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::SuperProp { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Cond { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Call { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::New { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Seq { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Lit { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Tpl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TaggedTpl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Arrow { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Class { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Yield { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::MetaProp { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Await { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Paren { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::JSXMember { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::JSXNamespacedName { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::JSXEmpty { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::JSXElement { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::JSXFragment { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsTypeAssertion { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsConstAssertion { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsNonNull { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsAs { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsInstantiation { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::TsSatisfies { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::PrivateName { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Expr::OptChain { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Expr::Invalid { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [Visit`::visit_expr_or_spread`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_expr_or_spread(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExprOrSpread { spread, expr } => { + { + as VisitWith>::visit_with(spread, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ExprStmt<'a> { + #[doc = "Calls [Visit`::visit_expr_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_expr_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ExprStmt { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for FnDecl<'a> { + #[doc = "Calls [Visit`::visit_fn_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_fn_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + FnDecl { + ident, + declare, + function, + } => { + { + >::visit_with(ident, visitor) + }; + { + > as VisitWith>::visit_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for FnExpr<'a> { + #[doc = "Calls [Visit`::visit_fn_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_fn_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + FnExpr { ident, function } => { + { + as VisitWith>::visit_with(ident, visitor) + }; + { + > as VisitWith>::visit_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ForHead<'a> { + #[doc = "Calls [Visit`::visit_for_head`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_for_head(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ForHead::VarDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ForHead::UsingDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ForHead::Pat { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ForInStmt<'a> { + #[doc = "Calls [Visit`::visit_for_in_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_for_in_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + as VisitWith>::visit_with(right, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [Visit`::visit_for_of_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_for_of_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + as VisitWith>::visit_with(right, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ForStmt<'a> { + #[doc = "Calls [Visit`::visit_for_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_for_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(init, visitor) + }; + { + > as VisitWith>::visit_with(test, visitor) + }; + { + > as VisitWith>::visit_with(update, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Function<'a> { + #[doc = "Calls [Visit`::visit_function`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_function(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + { + > as VisitWith>::visit_with(params, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + >> as VisitWith>::visit_with( + return_type, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for GetterProp<'a> { + #[doc = "Calls [Visit`::visit_getter_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_getter_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Ident { + #[doc = "Calls [Visit`::visit_ident`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ident(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + >::visit_with(sym, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for IdentName { + #[doc = "Calls [Visit`::visit_ident_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ident_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + IdentName { span, sym } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(sym, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for IfStmt<'a> { + #[doc = "Calls [Visit`::visit_if_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_if_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(test, visitor) + }; + { + as VisitWith>::visit_with(cons, visitor) + }; + { + > as VisitWith>::visit_with(alt, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Import { + #[doc = "Calls [Visit`::visit_import`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Import { span, phase } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(phase, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportDecl<'a> { + #[doc = "Calls [Visit`::visit_import_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(specifiers, visitor) + }; + { + as VisitWith>::visit_with(src, visitor) + }; + { + >> as VisitWith>::visit_with(with, visitor) + }; + { + >::visit_with(phase, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [Visit`::visit_import_default_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_default_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportDefaultSpecifier { span, local } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(local, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [Visit`::visit_import_named_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_named_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(local, visitor) + }; + { + > as VisitWith>::visit_with(imported, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportPhase { + #[doc = "Calls [Visit`::visit_import_phase`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_phase(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportPhase::Evaluation => {} + ImportPhase::Source => {} + ImportPhase::Defer => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [Visit`::visit_import_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ImportSpecifier::Default { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + ImportSpecifier::Namespace { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [Visit`::visit_import_star_as_specifier`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_star_as_specifier(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportStarAsSpecifier { span, local } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(local, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportWith<'a> { + #[doc = "Calls [Visit`::visit_import_with`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_with(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportWith { span, values } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(values, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ImportWithItem { + #[doc = "Calls [Visit`::visit_import_with_item`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_with_item(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ImportWithItem { key, value } => { + { + >::visit_with(key, visitor) + }; + { + >::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Invalid { + #[doc = "Calls [Visit`::visit_invalid`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_invalid(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Invalid { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXAttr<'a> { + #[doc = "Calls [Visit`::visit_jsx_attr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_attr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXAttr { span, name, value } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(name, visitor) + }; + { + > as VisitWith>::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [Visit`::visit_jsx_attr_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_attr_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [Visit`::visit_jsx_attr_or_spread`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_attr_or_spread(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [Visit`::visit_jsx_attr_value`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_attr_value(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [Visit`::visit_jsx_closing_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_closing_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXClosingElement { span, name } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXClosingFragment { + #[doc = "Calls [Visit`::visit_jsx_closing_fragment`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_closing_fragment(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXClosingFragment { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXElement<'a> { + #[doc = "Calls [Visit`::visit_jsx_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(opening, visitor) + }; + { + > as VisitWith>::visit_with(children, visitor) + }; + { + > as VisitWith>::visit_with(closing, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [Visit`::visit_jsx_element_child`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_element_child(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementChild::JSXElement { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXElementName<'a> { + #[doc = "Calls [Visit`::visit_jsx_element_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_element_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXElementName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXEmptyExpr { + #[doc = "Calls [Visit`::visit_jsx_empty_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_empty_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXEmptyExpr { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXExpr<'a> { + #[doc = "Calls [Visit`::visit_jsx_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + JSXExpr::Expr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [Visit`::visit_jsx_expr_container`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_expr_container(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXExprContainer { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXFragment<'a> { + #[doc = "Calls [Visit`::visit_jsx_fragment`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_fragment(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(opening, visitor) + }; + { + > as VisitWith>::visit_with(children, visitor) + }; + { + >::visit_with(closing, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [Visit`::visit_jsx_member_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_member_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXMemberExpr { span, obj, prop } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(obj, visitor) + }; + { + >::visit_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXNamespacedName { + #[doc = "Calls [Visit`::visit_jsx_namespaced_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_namespaced_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXNamespacedName { span, ns, name } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ns, visitor) + }; + { + >::visit_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXObject<'a> { + #[doc = "Calls [Visit`::visit_jsx_object`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_object(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + JSXObject::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [Visit`::visit_jsx_opening_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_opening_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + { + as VisitWith>::visit_with(name, visitor) + }; + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(attrs, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXOpeningFragment { + #[doc = "Calls [Visit`::visit_jsx_opening_fragment`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_opening_fragment(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXOpeningFragment { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [Visit`::visit_jsx_spread_child`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_spread_child(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXSpreadChild { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for JSXText { + #[doc = "Calls [Visit`::visit_jsx_text`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_text(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + JSXText { span, value, raw } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(value, visitor) + }; + { + >::visit_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Key<'a> { + #[doc = "Calls [Visit`::visit_key`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_key(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Key::Private { 0: _field_0 } => { + >::visit_with(_field_0, visitor); + } + Key::Public { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [Visit`::visit_key_value_pat_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_key_value_pat_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + KeyValuePatProp { key, value } => { + { + as VisitWith>::visit_with(key, visitor) + }; + { + as VisitWith>::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [Visit`::visit_key_value_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_key_value_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + KeyValueProp { key, value } => { + { + as VisitWith>::visit_with(key, visitor) + }; + { + as VisitWith>::visit_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [Visit`::visit_labeled_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_labeled_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + LabeledStmt { span, label, body } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(label, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Lit<'a> { + #[doc = "Calls [Visit`::visit_lit`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_lit(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Lit::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Lit::Bool { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Lit::Null { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Lit::Num { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Lit::BigInt { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Lit::Regex { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Lit::JSXText { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MemberExpr<'a> { + #[doc = "Calls [Visit`::visit_member_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_member_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MemberExpr { span, obj, prop } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(obj, visitor) + }; + { + as VisitWith>::visit_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MemberProp<'a> { + #[doc = "Calls [Visit`::visit_member_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_member_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MemberProp::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + MemberProp::PrivateName { 0: _field_0 } => { + >::visit_with(_field_0, visitor); + } + MemberProp::Computed { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MetaPropExpr { + #[doc = "Calls [Visit`::visit_meta_prop_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_meta_prop_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MetaPropExpr { span, kind } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(kind, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MetaPropKind { + #[doc = "Calls [Visit`::visit_meta_prop_kind`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_meta_prop_kind(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MetaPropKind::NewTarget => {} + MetaPropKind::ImportMeta => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MethodKind { + #[doc = "Calls [Visit`::visit_method_kind`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_method_kind(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MethodKind::Method => {} + MethodKind::Getter => {} + MethodKind::Setter => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for MethodProp<'a> { + #[doc = "Calls [Visit`::visit_method_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_method_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + MethodProp { key, function } => { + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Module<'a> { + #[doc = "Calls [Visit`::visit_module`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_module(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Module { + span, + body, + shebang, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + { + as VisitWith>::visit_with(shebang, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [Visit`::visit_module_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_module_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ModuleDecl::Import { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::ExportAll { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [Visit`::visit_module_export_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_module_export_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + ModuleExportName::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ModuleItem<'a> { + #[doc = "Calls [Visit`::visit_module_item`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_module_item(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + ModuleItem::Stmt { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for NamedExport<'a> { + #[doc = "Calls [Visit`::visit_named_export`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_named_export(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(specifiers, visitor) + }; + { + > as VisitWith>::visit_with(src, visitor) + }; + { + >> as VisitWith>::visit_with(with, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for NewExpr<'a> { + #[doc = "Calls [Visit`::visit_new_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_new_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + as VisitWith>::visit_with(callee, visitor) + }; + { + >> as VisitWith>::visit_with(args, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Null { + #[doc = "Calls [Visit`::visit_null`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_null(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Null { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Number { + #[doc = "Calls [Visit`::visit_number`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_number(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Number { span, value, raw } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ObjectLit<'a> { + #[doc = "Calls [Visit`::visit_object_lit`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_object_lit(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ObjectLit { span, props } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(props, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ObjectPat<'a> { + #[doc = "Calls [Visit`::visit_object_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_object_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(props, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [Visit`::visit_object_pat_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_object_pat_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ObjectPatProp::Assign { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ObjectPatProp::Rest { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for OptCall<'a> { + #[doc = "Calls [Visit`::visit_opt_call`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_call(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + as VisitWith>::visit_with(callee, visitor) + }; + { + > as VisitWith>::visit_with(args, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for OptChainBase<'a> { + #[doc = "Calls [Visit`::visit_opt_chain_base`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_chain_base(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + OptChainBase::Member { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + OptChainBase::Call { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [Visit`::visit_opt_chain_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_chain_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + OptChainExpr { + span, + optional, + base, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(base, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Param<'a> { + #[doc = "Calls [Visit`::visit_param`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_param(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Param { + span, + decorators, + pat, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + as VisitWith>::visit_with(pat, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [Visit`::visit_param_or_ts_param_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_param_or_ts_param_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ParenExpr<'a> { + #[doc = "Calls [Visit`::visit_paren_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_paren_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ParenExpr { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Pat<'a> { + #[doc = "Calls [Visit`::visit_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Pat::Ident { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Array { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Rest { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Object { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Assign { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Invalid { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Pat::Expr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [Visit`::visit_private_method`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_private_method(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(function, visitor) + }; + { + >::visit_with(kind, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for PrivateName { + #[doc = "Calls [Visit`::visit_private_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_private_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + PrivateName { span, name } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for PrivateProp<'a> { + #[doc = "Calls [Visit`::visit_private_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_private_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + >::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(value, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Program<'a> { + #[doc = "Calls [Visit`::visit_program`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_program(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Program::Module { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Program::Script { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Prop<'a> { + #[doc = "Calls [Visit`::visit_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Prop::Shorthand { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Prop::KeyValue { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Prop::Assign { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Prop::Getter { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Prop::Setter { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Prop::Method { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for PropName<'a> { + #[doc = "Calls [Visit`::visit_prop_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_prop_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + PropName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + PropName::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + PropName::Num { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + PropName::Computed { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + PropName::BigInt { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [Visit`::visit_prop_or_spread`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_prop_or_spread(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + PropOrSpread::Prop { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Regex { + #[doc = "Calls [Visit`::visit_regex`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_regex(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Regex { span, exp, flags } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(exp, visitor) + }; + { + >::visit_with(flags, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for RestPat<'a> { + #[doc = "Calls [Visit`::visit_rest_pat`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_rest_pat(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(dot3_token, visitor) + }; + { + as VisitWith>::visit_with(arg, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [Visit`::visit_return_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_return_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ReturnStmt { span, arg } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Script<'a> { + #[doc = "Calls [Visit`::visit_script`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_script(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Script { + span, + body, + shebang, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + { + as VisitWith>::visit_with(shebang, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SeqExpr<'a> { + #[doc = "Calls [Visit`::visit_seq_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_seq_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SeqExpr { span, exprs } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(exprs, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SetterProp<'a> { + #[doc = "Calls [Visit`::visit_setter_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_setter_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(this_param, visitor) + }; + { + as VisitWith>::visit_with(param, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [Visit`::visit_simple_assign_target`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_simple_assign_target(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::Member { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SpreadElement<'a> { + #[doc = "Calls [Visit`::visit_spread_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_spread_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SpreadElement { dot3_token, expr } => { + { + >::visit_with(dot3_token, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for StaticBlock<'a> { + #[doc = "Calls [Visit`::visit_static_block`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_static_block(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + StaticBlock { span, body } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Stmt<'a> { + #[doc = "Calls [Visit`::visit_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Stmt::Block { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Empty { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Debugger { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::With { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Return { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Labeled { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Break { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Continue { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::If { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Switch { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Throw { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Try { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::While { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::DoWhile { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::For { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::ForIn { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::ForOf { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Decl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + Stmt::Expr { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Str { + #[doc = "Calls [Visit`::visit_str`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_str(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Str { span, value, raw } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(value, visitor) + }; + { + as VisitWith>::visit_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Super { + #[doc = "Calls [Visit`::visit_super`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_super(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Super { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SuperProp<'a> { + #[doc = "Calls [Visit`::visit_super_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_super_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SuperProp::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + SuperProp::Computed { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [Visit`::visit_super_prop_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_super_prop_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SuperPropExpr { span, obj, prop } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(obj, visitor) + }; + { + as VisitWith>::visit_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SwitchCase<'a> { + #[doc = "Calls [Visit`::visit_switch_case`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_switch_case(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SwitchCase { span, test, cons } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(test, visitor) + }; + { + > as VisitWith>::visit_with(cons, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [Visit`::visit_switch_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_switch_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(discriminant, visitor) + }; + { + > as VisitWith>::visit_with(cases, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [Visit`::visit_tagged_tpl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_tagged_tpl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + as VisitWith>::visit_with(tag, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + > as VisitWith>::visit_with(tpl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ThisExpr { + #[doc = "Calls [Visit`::visit_this_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_this_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ThisExpr { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [Visit`::visit_throw_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_throw_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + ThrowStmt { span, arg } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Tpl<'a> { + #[doc = "Calls [Visit`::visit_tpl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_tpl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + Tpl { + span, + exprs, + quasis, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(exprs, visitor) + }; + { + as VisitWith>::visit_with(quasis, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TplElement { + #[doc = "Calls [Visit`::visit_tpl_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_tpl_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(cooked, visitor) + }; + { + >::visit_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TruePlusMinus { + #[doc = "Calls [Visit`::visit_true_plus_minus`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_true_plus_minus(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TruePlusMinus::True => {} + TruePlusMinus::Plus => {} + TruePlusMinus::Minus => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TryStmt<'a> { + #[doc = "Calls [Visit`::visit_try_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_try_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(block, visitor) + }; + { + > as VisitWith>::visit_with(handler, visitor) + }; + { + > as VisitWith>::visit_with(finalizer, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsArrayType<'a> { + #[doc = "Calls [Visit`::visit_ts_array_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_array_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsArrayType { span, elem_type } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(elem_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [Visit`::visit_ts_as_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_as_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_call_signature_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_call_signature_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [Visit`::visit_ts_conditional_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_conditional_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(check_type, visitor) + }; + { + as VisitWith>::visit_with(extends_type, visitor) + }; + { + as VisitWith>::visit_with(true_type, visitor) + }; + { + as VisitWith>::visit_with(false_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [Visit`::visit_ts_const_assertion`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_const_assertion(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsConstAssertion { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsConstructSignatureDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_construct_signature_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_construct_signature_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [Visit`::visit_ts_constructor_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_constructor_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + > as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsEntityName<'a> { + #[doc = "Calls [Visit`::visit_ts_entity_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_entity_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsEntityName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_enum_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_enum_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + { + > as VisitWith>::visit_with(members, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [Visit`::visit_ts_enum_member`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_enum_member(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsEnumMember { span, id, init } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(id, visitor) + }; + { + > as VisitWith>::visit_with(init, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [Visit`::visit_ts_enum_member_id`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_enum_member_id(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsEnumMemberId::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [Visit`::visit_ts_export_assignment`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_export_assignment(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsExportAssignment { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [Visit`::visit_ts_expr_with_type_args`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_expr_with_type_args(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsExternalModuleRef { + #[doc = "Calls [Visit`::visit_ts_external_module_ref`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_external_module_ref(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsExternalModuleRef { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [Visit`::visit_ts_fn_or_constructor_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_fn_or_constructor_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsFnParam<'a> { + #[doc = "Calls [Visit`::visit_ts_fn_param`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_fn_param(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsFnParam::Ident { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsFnParam::Array { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsFnParam::Rest { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsFnParam::Object { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsFnType<'a> { + #[doc = "Calls [Visit`::visit_ts_fn_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_fn_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + > as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [Visit`::visit_ts_getter_signature`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_getter_signature(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_import_equals_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_import_equals_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + { + as VisitWith>::visit_with(module_ref, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsImportType<'a> { + #[doc = "Calls [Visit`::visit_ts_import_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_import_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(arg, visitor) + }; + { + > as VisitWith>::visit_with(qualifier, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [Visit`::visit_ts_index_signature`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_index_signature(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [Visit`::visit_ts_indexed_access_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_indexed_access_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(obj_type, visitor) + }; + { + as VisitWith>::visit_with(index_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsInferType<'a> { + #[doc = "Calls [Visit`::visit_ts_infer_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_infer_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsInferType { span, type_param } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [Visit`::visit_ts_instantiation`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_instantiation(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + { + > as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [Visit`::visit_ts_interface_body`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_interface_body(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsInterfaceBody { span, body } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_interface_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_interface_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + > as VisitWith>::visit_with(extends, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [Visit`::visit_ts_intersection_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_intersection_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsIntersectionType { span, types } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(types, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsKeywordType { + #[doc = "Calls [Visit`::visit_ts_keyword_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_keyword_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsKeywordType { span, kind } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(kind, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [Visit`::visit_ts_keyword_type_kind`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_keyword_type_kind(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsKeywordTypeKind::TsAnyKeyword => {} + TsKeywordTypeKind::TsUnknownKeyword => {} + TsKeywordTypeKind::TsNumberKeyword => {} + TsKeywordTypeKind::TsObjectKeyword => {} + TsKeywordTypeKind::TsBooleanKeyword => {} + TsKeywordTypeKind::TsBigIntKeyword => {} + TsKeywordTypeKind::TsStringKeyword => {} + TsKeywordTypeKind::TsSymbolKeyword => {} + TsKeywordTypeKind::TsVoidKeyword => {} + TsKeywordTypeKind::TsUndefinedKeyword => {} + TsKeywordTypeKind::TsNullKeyword => {} + TsKeywordTypeKind::TsNeverKeyword => {} + TsKeywordTypeKind::TsIntrinsicKeyword => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsLit<'a> { + #[doc = "Calls [Visit`::visit_ts_lit`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_lit(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsLit::Number { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsLit::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsLit::Bool { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsLit::BigInt { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsLit::Tpl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsLitType<'a> { + #[doc = "Calls [Visit`::visit_ts_lit_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_lit_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsLitType { span, lit } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(lit, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsMappedType<'a> { + #[doc = "Calls [Visit`::visit_ts_mapped_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_mapped_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(readonly, visitor) + }; + { + as VisitWith>::visit_with(type_param, visitor) + }; + { + > as VisitWith>::visit_with(name_type, visitor) + }; + { + as VisitWith>::visit_with(optional, visitor) + }; + { + > as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [Visit`::visit_ts_method_signature`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_method_signature(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [Visit`::visit_ts_module_block`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_module_block(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsModuleBlock { span, body } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_module_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_module_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(id, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsModuleName<'a> { + #[doc = "Calls [Visit`::visit_ts_module_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_module_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsModuleName::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsModuleName::Str { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [Visit`::visit_ts_module_ref`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_module_ref(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [Visit`::visit_ts_namespace_body`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_namespace_body(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_namespace_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_namespace_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + { + > as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [Visit`::visit_ts_namespace_export_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_namespace_export_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsNamespaceExportDecl { span, id } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [Visit`::visit_ts_non_null_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_non_null_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsNonNullExpr { span, expr } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [Visit`::visit_ts_optional_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_optional_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsOptionalType { span, type_ann } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsParamProp<'a> { + #[doc = "Calls [Visit`::visit_ts_param_prop`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_param_prop(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(decorators, visitor) + }; + { + as VisitWith>::visit_with(accessibility, visitor) + }; + { + as VisitWith>::visit_with(param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [Visit`::visit_ts_param_prop_param`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_param_prop_param(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsParamPropParam::Assign { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [Visit`::visit_ts_parenthesized_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_parenthesized_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsParenthesizedType { span, type_ann } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [Visit`::visit_ts_property_signature`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_property_signature(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [Visit`::visit_ts_qualified_name`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_qualified_name(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsQualifiedName { span, left, right } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(left, visitor) + }; + { + >::visit_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsRestType<'a> { + #[doc = "Calls [Visit`::visit_ts_rest_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_rest_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsRestType { span, type_ann } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [Visit`::visit_ts_satisfies_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_satisfies_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [Visit`::visit_ts_setter_signature`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_setter_signature(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(key, visitor) + }; + { + as VisitWith>::visit_with(param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsThisType { + #[doc = "Calls [Visit`::visit_ts_this_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_this_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsThisType { span } => { + { + >::visit_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [Visit`::visit_ts_this_type_or_ident`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_this_type_or_ident(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [Visit`::visit_ts_tpl_lit_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_tpl_lit_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(types, visitor) + }; + { + as VisitWith>::visit_with(quasis, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [Visit`::visit_ts_tuple_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_tuple_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTupleElement { span, label, ty } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(label, visitor) + }; + { + as VisitWith>::visit_with(ty, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTupleType<'a> { + #[doc = "Calls [Visit`::visit_ts_tuple_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_tuple_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTupleType { span, elem_types } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(elem_types, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsType<'a> { + #[doc = "Calls [Visit`::visit_ts_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsThisType { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTypeRef { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTypeQuery { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTypeLit { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsArrayType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTupleType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsOptionalType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsRestType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + > as VisitWith>::visit_with( + _field_0, visitor, + ); + } + TsType::TsConditionalType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsInferType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsParenthesizedType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTypeOperator { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsMappedType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsLitType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsTypePredicate { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsType::TsImportType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_type_alias_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_alias_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(id, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [Visit`::visit_ts_type_ann`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_ann(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeAnn { span, type_ann } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [Visit`::visit_ts_type_assertion`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_assertion(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [Visit`::visit_ts_type_element`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_element(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + > as VisitWith>::visit_with( + _field_0, visitor, + ); + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [Visit`::visit_ts_type_lit`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_lit(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeLit { span, members } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(members, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [Visit`::visit_ts_type_operator`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_operator(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeOperator { span, op, type_ann } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(op, visitor) + }; + { + as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [Visit`::visit_ts_type_operator_op`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_operator_op(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeOperatorOp::KeyOf => {} + TsTypeOperatorOp::Unique => {} + TsTypeOperatorOp::ReadOnly => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [Visit`::visit_ts_type_param`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_param(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(name, visitor) + }; + { + > as VisitWith>::visit_with(constraint, visitor) + }; + { + > as VisitWith>::visit_with(default, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [Visit`::visit_ts_type_param_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_param_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeParamDecl { span, params } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeParamInstantiation<'a> { + #[doc = "Calls [Visit`::visit_ts_type_param_instantiation`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_param_instantiation(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeParamInstantiation { span, params } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(params, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [Visit`::visit_ts_type_predicate`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_predicate(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(param_name, visitor) + }; + { + >> as VisitWith>::visit_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [Visit`::visit_ts_type_query`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_query(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(expr_name, visitor) + }; + { + >> as VisitWith>::visit_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [Visit`::visit_ts_type_query_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_query_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [Visit`::visit_ts_type_ref`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_ref(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(type_name, visitor) + }; + { + >> as VisitWith>::visit_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsUnionOrIntersectionType<'a> { + #[doc = "Calls [Visit`::visit_ts_union_or_intersection_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_union_or_intersection_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for TsUnionType<'a> { + #[doc = "Calls [Visit`::visit_ts_union_type`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_union_type(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + TsUnionType { span, types } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(types, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [Visit`::visit_unary_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_unary_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + UnaryExpr { span, op, arg } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(op, visitor) + }; + { + as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [Visit`::visit_update_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_update_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(op, visitor) + }; + { + as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for UsingDecl<'a> { + #[doc = "Calls [Visit`::visit_using_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_using_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(decls, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for VarDecl<'a> { + #[doc = "Calls [Visit`::visit_var_decl`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_var_decl(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + { + >::visit_with(span, visitor) + }; + { + >::visit_with(ctxt, visitor) + }; + { + >::visit_with(kind, visitor) + }; + { + > as VisitWith>::visit_with(decls, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for VarDeclKind { + #[doc = "Calls [Visit`::visit_var_decl_kind`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_var_decl_kind(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + VarDeclKind::Var => {} + VarDeclKind::Let => {} + VarDeclKind::Const => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [Visit`::visit_var_decl_or_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_var_decl_or_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + > as VisitWith>::visit_with(_field_0, visitor); + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + as VisitWith>::visit_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [Visit`::visit_var_declarator`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_var_declarator(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(name, visitor) + }; + { + > as VisitWith>::visit_with(init, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for WhileStmt<'a> { + #[doc = "Calls [Visit`::visit_while_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_while_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + WhileStmt { span, test, body } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(test, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for WithStmt<'a> { + #[doc = "Calls [Visit`::visit_with_stmt`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_with_stmt(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + WithStmt { span, obj, body } => { + { + >::visit_with(span, visitor) + }; + { + as VisitWith>::visit_with(obj, visitor) + }; + { + as VisitWith>::visit_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for YieldExpr<'a> { + #[doc = "Calls [Visit`::visit_yield_expr`] with `self`."] + fn visit_with(&self, visitor: &mut V) { + ::visit_yield_expr(visitor, self) + } + + fn visit_children_with(&self, visitor: &mut V) { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + { + >::visit_with(span, visitor) + }; + { + > as VisitWith>::visit_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for AssignOp { + #[doc = "Calls [Visit`::visit_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_assign_op(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for swc_atoms::Atom { + #[doc = "Calls [Visit`::visit_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_atom(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BigIntValue { + #[doc = "Calls [Visit`::visit_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_big_int_value(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for BinaryOp { + #[doc = "Calls [Visit`::visit_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_binary_op(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ClassMember<'a>] { + #[doc = "Calls [Visit`::visit_class_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_class_members(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Decorator<'a>] { + #[doc = "Calls [Visit`::visit_decorators`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_decorators(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ExportSpecifier<'a>] { + #[doc = "Calls [Visit`::visit_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_export_specifiers(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ExprOrSpread<'a>] { + #[doc = "Calls [Visit`::visit_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Expr<'a>] { + #[doc = "Calls [Visit`::visit_exprs`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_exprs(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ImportSpecifier<'a>] { + #[doc = "Calls [Visit`::visit_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_specifiers(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ImportWithItem] { + #[doc = "Calls [Visit`::visit_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_import_with_items(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| >::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [JSXAttrOrSpread<'a>] { + #[doc = "Calls [Visit`::visit_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_attr_or_spreads(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [JSXElementChild<'a>] { + #[doc = "Calls [Visit`::visit_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_jsx_element_childs(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ModuleItem<'a>] { + #[doc = "Calls [Visit`::visit_module_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_module_items(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ObjectPatProp<'a>] { + #[doc = "Calls [Visit`::visit_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_object_pat_props(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option { + #[doc = "Calls [Visit`::visit_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_accessibility(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => >::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option { + #[doc = "Calls [Visit`::visit_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_atom(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => >::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_block_stmt(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_catch_clause(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_expr(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_expr_or_spread(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option>> { + #[doc = "Calls [Visit`::visit_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => > as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option { + #[doc = "Calls [Visit`::visit_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ident(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => >::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_jsx_attr_value(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_jsx_closing_element(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_module_export_name(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option>> { + #[doc = "Calls [Visit`::visit_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_object_lit(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => > as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_pat(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option { + #[doc = "Calls [Visit`::visit_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_span(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => >::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_stmt(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_str(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option { + #[doc = "Calls [Visit`::visit_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_true_plus_minus(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => >::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_entity_name(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_namespace_body(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_type(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option>> { + #[doc = "Calls [Visit`::visit_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_type_ann(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => > as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option>> { + #[doc = "Calls [Visit`::visit_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_type_param_decl(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitWith>::visit_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option>> { + #[doc = "Calls [Visit`::visit_opt_ts_type_param_instantiation`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_ts_type_param_instantiation(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitWith>::visit_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for Option> { + #[doc = "Calls [Visit`::visit_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_var_decl_or_expr(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + match self { + Some(inner) => as VisitWith>::visit_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Option>] { + #[doc = "Calls [Visit`::visit_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_vec_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| > as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Option>] { + #[doc = "Calls [Visit`::visit_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_opt_vec_pats(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| > as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [ParamOrTsParamProp<'a>] { + #[doc = "Calls [Visit`::visit_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_param_or_ts_param_props(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Param<'a>] { + #[doc = "Calls [Visit`::visit_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_params(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Pat<'a>] { + #[doc = "Calls [Visit`::visit_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_pats(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [PropOrSpread<'a>] { + #[doc = "Calls [Visit`::visit_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_prop_or_spreads(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for swc_common::Span { + #[doc = "Calls [Visit`::visit_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_span(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [Stmt<'a>] { + #[doc = "Calls [Visit`::visit_stmts`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_stmts(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [SwitchCase<'a>] { + #[doc = "Calls [Visit`::visit_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_switch_cases(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [Visit`::visit_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_syntax_context(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TplElement] { + #[doc = "Calls [Visit`::visit_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_tpl_elements(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| >::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsEnumMember<'a>] { + #[doc = "Calls [Visit`::visit_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_enum_members(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsExprWithTypeArgs<'a>] { + #[doc = "Calls [Visit`::visit_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_expr_with_type_argss(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsFnParam<'a>] { + #[doc = "Calls [Visit`::visit_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_fn_params(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsTupleElement<'a>] { + #[doc = "Calls [Visit`::visit_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_tuple_elements(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsTypeElement<'a>] { + #[doc = "Calls [Visit`::visit_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_elements(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsTypeParam<'a>] { + #[doc = "Calls [Visit`::visit_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_type_params(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [TsType<'a>] { + #[doc = "Calls [Visit`::visit_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_ts_types(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for UnaryOp { + #[doc = "Calls [Visit`::visit_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_unary_op(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for UpdateOp { + #[doc = "Calls [Visit`::visit_update_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_update_op(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + Visit<'a>> VisitWith<'a, V> for [VarDeclarator<'a>] { + #[doc = "Calls [Visit`::visit_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn visit_with(&self, visitor: &mut V) { + ::visit_var_declarators(visitor, self) + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + self.iter() + .for_each(|item| as VisitWith>::visit_with(item, visitor)) + } +} +impl<'a, V, T> VisitWith<'a, V> for Box<'a, T> +where + V: ?Sized + Visit<'a>, + T: VisitWith<'a, V>, +{ + #[inline] + fn visit_with(&self, visitor: &mut V) { + let v = >::visit_with(&**self, visitor); + v + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + let v = >::visit_children_with(&**self, visitor); + v + } +} +impl<'a, V, T> VisitWith<'a, V> for Vec<'a, T> +where + V: ?Sized + Visit<'a>, + [T]: VisitWith<'a, V>, +{ + #[inline] + fn visit_with(&self, visitor: &mut V) { + let v = <[T] as VisitWith>::visit_with(self, visitor); + v + } + + #[inline] + fn visit_children_with(&self, visitor: &mut V) { + let v = <[T] as VisitWith>::visit_children_with(self, visitor); + v + } +} +#[doc = r" A visitor trait for traversing the AST."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait VisitAstPath<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Accessibility, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_array_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_array_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_arrow_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrowExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_assign_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_assign_op<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignOp, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_assign_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_assign_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_assign_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_assign_target_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTargetPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_atoms::Atom, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_auto_accessor<'ast: 'r, 'r>( + &mut self, + node: &'ast AutoAccessor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_await_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AwaitExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_big_int<'ast: 'r, 'r>( + &mut self, + node: &'ast BigInt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_big_int_value<'ast: 'r, 'r>( + &mut self, + node: &'ast BigIntValue, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_bin_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BinExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_binary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast BinaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_binding_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast BindingIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_block_stmt_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmtOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_bool<'ast: 'r, 'r>(&mut self, node: &'ast Bool, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_break_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BreakStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_call_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CallExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_callee<'ast: 'r, 'r>( + &mut self, + node: &'ast Callee<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast CatchClause<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_class<'ast: 'r, 'r>( + &mut self, + node: &'ast Class<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_class_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_class_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_class_member<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_class_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [ClassMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ClassMember<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_class_method<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_class_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_computed_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ComputedPropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_cond_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CondExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_constructor<'ast: 'r, 'r>( + &mut self, + node: &'ast Constructor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_continue_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ContinueStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_debugger_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DebuggerStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_decl<'ast: 'r, 'r>(&mut self, node: &'ast Decl<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_decorator<'ast: 'r, 'r>( + &mut self, + node: &'ast Decorator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_decorators<'ast: 'r, 'r>( + &mut self, + node: &'ast [Decorator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Decorator<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast DefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_do_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DoWhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_empty_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast EmptyStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_export_all<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportAll<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_export_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_export_default_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_export_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_export_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_export_namespace_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_export_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > >::visit_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_export_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ExportSpecifier<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_expr<'ast: 'r, 'r>(&mut self, node: &'ast Expr<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExprOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ExprOrSpread<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_expr_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_exprs<'ast: 'r, 'r>( + &mut self, + node: &'ast [Expr<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Expr<'a>] as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_fn_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast FnDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_fn_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast FnExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_for_head<'ast: 'r, 'r>( + &mut self, + node: &'ast ForHead<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_for_in_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForInStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_for_of_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForOfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_for_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_function<'ast: 'r, 'r>( + &mut self, + node: &'ast Function<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_getter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast GetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ident<'ast: 'r, 'r>(&mut self, node: &'ast Ident, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_ident_name<'ast: 'r, 'r>( + &mut self, + node: &'ast IdentName, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_if_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast IfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_import<'ast: 'r, 'r>(&mut self, node: &'ast Import, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_import_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_import_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_import_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_import_phase<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportPhase, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_import_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > >::visit_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_import_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ImportSpecifier<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_import_star_as_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportStarAsSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_import_with<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWith<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_import_with_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWithItem, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_import_with_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportWithItem], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ImportWithItem] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_invalid<'ast: 'r, 'r>( + &mut self, + node: &'ast Invalid, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_jsx_attr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_attr_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_attr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > >::visit_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_attr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXAttrOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[JSXAttrOrSpread<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrValue<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_closing_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_jsx_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_element_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > >::visit_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_jsx_element_childs<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXElementChild<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[JSXElementChild<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_element_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_jsx_empty_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXEmptyExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_jsx_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_jsx_expr_container<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExprContainer<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXFragment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXMemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_jsx_namespaced_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXNamespacedName, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_jsx_object<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXObject<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_jsx_opening_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_opening_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_jsx_spread_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXSpreadChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_jsx_text<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXText, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_key<'ast: 'r, 'r>(&mut self, node: &'ast Key<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_key_value_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValuePatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_key_value_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValueProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_labeled_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast LabeledStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_lit<'ast: 'r, 'r>(&mut self, node: &'ast Lit<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_member_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_meta_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_meta_prop_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropKind, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_method_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodKind, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_method_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_module<'ast: 'r, 'r>( + &mut self, + node: &'ast Module<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleExportName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_module_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleItem<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_module_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ModuleItem<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ModuleItem<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_named_export<'ast: 'r, 'r>( + &mut self, + node: &'ast NamedExport<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_new_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast NewExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_null<'ast: 'r, 'r>(&mut self, node: &'ast Null, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_number<'ast: 'r, 'r>(&mut self, node: &'ast Number, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_object_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_object_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_object_pat_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ObjectPatProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ObjectPatProp<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_opt_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_call<'ast: 'r, 'r>( + &mut self, + node: &'ast OptCall<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_chain_base<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainBase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_chain_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_opt_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + >> as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_opt_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > >::visit_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + >> as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_span<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_opt_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_opt_str<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_opt_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_opt_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + >> as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < Self > > :: visit_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < Self > > :: visit_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_opt_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + > as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_opt_vec_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Option>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_opt_vec_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Option>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_param<'ast: 'r, 'r>( + &mut self, + node: &'ast Param<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_param_or_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ParamOrTsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_param_or_ts_param_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ParamOrTsParamProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[ParamOrTsParamProp<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [Param<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Param<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_paren_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ParenExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_pat<'ast: 'r, 'r>(&mut self, node: &'ast Pat<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Pat<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Pat<'a>] as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_private_method<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_private_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateName, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_private_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_program<'ast: 'r, 'r>( + &mut self, + node: &'ast Program<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_prop<'ast: 'r, 'r>(&mut self, node: &'ast Prop<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_prop_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast PropOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_prop_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [PropOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[PropOrSpread<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_regex<'ast: 'r, 'r>(&mut self, node: &'ast Regex, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_rest_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast RestPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_return_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ReturnStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_script<'ast: 'r, 'r>( + &mut self, + node: &'ast Script<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_seq_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SeqExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_setter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_simple_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast SimpleAssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_span<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::Span, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_spread_element<'ast: 'r, 'r>( + &mut self, + node: &'ast SpreadElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_static_block<'ast: 'r, 'r>( + &mut self, + node: &'ast StaticBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_stmt<'ast: 'r, 'r>(&mut self, node: &'ast Stmt<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_stmts<'ast: 'r, 'r>( + &mut self, + node: &'ast [Stmt<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[Stmt<'a>] as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_str<'ast: 'r, 'r>(&mut self, node: &'ast Str, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_super<'ast: 'r, 'r>(&mut self, node: &'ast Super, __ast_path: &mut AstNodePath<'r>) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_super_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_super_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperPropExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_switch_case<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchCase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_switch_cases<'ast: 'r, 'r>( + &mut self, + node: &'ast [SwitchCase<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[SwitchCase<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_switch_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_syntax_context<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::SyntaxContext, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_tagged_tpl<'ast: 'r, 'r>( + &mut self, + node: &'ast TaggedTpl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_this_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ThisExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_throw_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ThrowStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_tpl<'ast: 'r, 'r>(&mut self, node: &'ast Tpl<'a>, __ast_path: &mut AstNodePath<'r>) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_tpl_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TplElement, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_tpl_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TplElement], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TplElement] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast TruePlusMinus, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_try_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast TryStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_array_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsArrayType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_as_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsAsExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_call_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsCallSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_conditional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConditionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_const_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_ts_construct_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEntityName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_enum_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_enum_member<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_enum_member_id<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMemberId<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_ts_enum_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsEnumMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsEnumMember<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_export_assignment<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExportAssignment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_expr_with_type_args<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExprWithTypeArgs<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_expr_with_type_argss<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsExprWithTypeArgs<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsExprWithTypeArgs<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_external_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExternalModuleRef, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_fn_or_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnOrConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_fn_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::visit_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_ts_fn_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsFnParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsFnParam<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_fn_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_getter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsGetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_import_equals_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportEqualsDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_import_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_index_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_indexed_access_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexedAccessType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_infer_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInferType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_interface_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_interface_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_keyword_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordType, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_keyword_type_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordTypeKind, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_mapped_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMappedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_method_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMethodSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_module_block<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_module_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_namespace_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_namespace_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceExportDecl, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_non_null_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNonNullExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_optional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsOptionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_param_prop_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamPropParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_parenthesized_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParenthesizedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_property_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsPropertySignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_qualified_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsQualifiedName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_rest_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsRestType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_satisfies_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSatisfiesExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_setter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_ts_this_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisType, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_this_type_or_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisTypeOrIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_tpl_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTplLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_tuple_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_tuple_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTupleElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsTupleElement<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_tuple_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_alias_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAliasDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAnn<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsTypeElement<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_type_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_operator<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_ts_type_operator_op<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperatorOp, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_ts_type_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsTypeParam<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_predicate<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypePredicate<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_query<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQuery<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_type_query_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQueryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_ts_type_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::visit_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_ts_types<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsType<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[TsType<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::visit_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn visit_ts_union_or_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_ts_union_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_unary_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_unary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_update_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::visit_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_update_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateOp, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_using_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast UsingDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_var_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::visit_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_var_decl_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclKind, + __ast_path: &mut AstNodePath<'r>, + ) { + >::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::visit_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_var_declarator<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclarator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::visit_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_var_declarators<'ast: 'r, 'r>( + &mut self, + node: &'ast [VarDeclarator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + <[VarDeclarator<'a>] as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_with_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WithStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::visit_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_yield_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast YieldExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + as VisitWithAstPath>::visit_children_with_ast_path( + node, self, __ast_path, + ) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitAstPath<'a> for &mut V +where + V: ?Sized + VisitAstPath<'a>, +{ + #[inline] + fn visit_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Accessibility, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_array_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_array_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_arrow_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrowExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_op<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_target_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTargetPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_atoms::Atom, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_auto_accessor<'ast: 'r, 'r>( + &mut self, + node: &'ast AutoAccessor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_await_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AwaitExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_big_int<'ast: 'r, 'r>( + &mut self, + node: &'ast BigInt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_big_int_value<'ast: 'r, 'r>( + &mut self, + node: &'ast BigIntValue, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_bin_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BinExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_binary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast BinaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_binding_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast BindingIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_block_stmt_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmtOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_bool<'ast: 'r, 'r>(&mut self, node: &'ast Bool, __ast_path: &mut AstNodePath<'r>) { + ::visit_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_break_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BreakStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_call_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CallExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_callee<'ast: 'r, 'r>( + &mut self, + node: &'ast Callee<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast CatchClause<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class<'ast: 'r, 'r>( + &mut self, + node: &'ast Class<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_member<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [ClassMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_method<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_computed_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ComputedPropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_cond_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CondExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_constructor<'ast: 'r, 'r>( + &mut self, + node: &'ast Constructor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_continue_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ContinueStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_debugger_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DebuggerStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decl<'ast: 'r, 'r>(&mut self, node: &'ast Decl<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decorator<'ast: 'r, 'r>( + &mut self, + node: &'ast Decorator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decorators<'ast: 'r, 'r>( + &mut self, + node: &'ast [Decorator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast DefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_do_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DoWhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_empty_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast EmptyStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_all<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportAll<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_namespace_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr<'ast: 'r, 'r>(&mut self, node: &'ast Expr<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExprOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_exprs<'ast: 'r, 'r>( + &mut self, + node: &'ast [Expr<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_fn_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast FnDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_fn_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast FnExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_head<'ast: 'r, 'r>( + &mut self, + node: &'ast ForHead<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_in_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForInStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_of_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForOfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_function<'ast: 'r, 'r>( + &mut self, + node: &'ast Function<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_function(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_getter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast GetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ident<'ast: 'r, 'r>(&mut self, node: &'ast Ident, __ast_path: &mut AstNodePath<'r>) { + ::visit_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ident_name<'ast: 'r, 'r>( + &mut self, + node: &'ast IdentName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_if_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast IfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import<'ast: 'r, 'r>(&mut self, node: &'ast Import, __ast_path: &mut AstNodePath<'r>) { + ::visit_import(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_phase<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportPhase, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_star_as_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportStarAsSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWith<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWithItem, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportWithItem], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_invalid<'ast: 'r, 'r>( + &mut self, + node: &'ast Invalid, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXAttrOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrValue<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_closing_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_childs<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXElementChild<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_empty_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXEmptyExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_expr_container<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExprContainer<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXFragment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXMemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_namespaced_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXNamespacedName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_object<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXObject<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_opening_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_opening_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_spread_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXSpreadChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_text<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXText, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key<'ast: 'r, 'r>(&mut self, node: &'ast Key<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_key(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key_value_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValuePatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key_value_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValueProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_labeled_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast LabeledStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_lit<'ast: 'r, 'r>(&mut self, node: &'ast Lit<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_member_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_meta_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_meta_prop_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_method_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_method_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module<'ast: 'r, 'r>( + &mut self, + node: &'ast Module<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleExportName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleItem<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ModuleItem<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_named_export<'ast: 'r, 'r>( + &mut self, + node: &'ast NamedExport<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_new_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast NewExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_null<'ast: 'r, 'r>(&mut self, node: &'ast Null, __ast_path: &mut AstNodePath<'r>) { + ::visit_null(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_number<'ast: 'r, 'r>(&mut self, node: &'ast Number, __ast_path: &mut AstNodePath<'r>) { + ::visit_number(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ObjectPatProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_call<'ast: 'r, 'r>( + &mut self, + node: &'ast OptCall<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_chain_base<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainBase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_chain_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_span<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_str<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_vec_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_vec_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param<'ast: 'r, 'r>( + &mut self, + node: &'ast Param<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param_or_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ParamOrTsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param_or_ts_param_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ParamOrTsParamProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [Param<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_paren_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ParenExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_pat<'ast: 'r, 'r>(&mut self, node: &'ast Pat<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Pat<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_method<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_program<'ast: 'r, 'r>( + &mut self, + node: &'ast Program<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_program(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop<'ast: 'r, 'r>(&mut self, node: &'ast Prop<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast PropOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [PropOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_regex<'ast: 'r, 'r>(&mut self, node: &'ast Regex, __ast_path: &mut AstNodePath<'r>) { + ::visit_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_rest_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast RestPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_return_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ReturnStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_script<'ast: 'r, 'r>( + &mut self, + node: &'ast Script<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_script(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_seq_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SeqExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_setter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_simple_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast SimpleAssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_span<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::Span, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_spread_element<'ast: 'r, 'r>( + &mut self, + node: &'ast SpreadElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_static_block<'ast: 'r, 'r>( + &mut self, + node: &'ast StaticBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_stmt<'ast: 'r, 'r>(&mut self, node: &'ast Stmt<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_stmts<'ast: 'r, 'r>( + &mut self, + node: &'ast [Stmt<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_str<'ast: 'r, 'r>(&mut self, node: &'ast Str, __ast_path: &mut AstNodePath<'r>) { + ::visit_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super<'ast: 'r, 'r>(&mut self, node: &'ast Super, __ast_path: &mut AstNodePath<'r>) { + ::visit_super(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperPropExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_case<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchCase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_cases<'ast: 'r, 'r>( + &mut self, + node: &'ast [SwitchCase<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_syntax_context<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::SyntaxContext, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tagged_tpl<'ast: 'r, 'r>( + &mut self, + node: &'ast TaggedTpl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_this_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ThisExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_throw_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ThrowStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl<'ast: 'r, 'r>(&mut self, node: &'ast Tpl<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TplElement, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TplElement], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast TruePlusMinus, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_try_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast TryStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_array_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsArrayType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_as_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsAsExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_call_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsCallSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_conditional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConditionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_const_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_construct_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEntityName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_member<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_member_id<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMemberId<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsEnumMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_export_assignment<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExportAssignment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_expr_with_type_args<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExprWithTypeArgs<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_expr_with_type_argss<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsExprWithTypeArgs<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_external_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExternalModuleRef, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_or_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnOrConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsFnParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_getter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsGetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_import_equals_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportEqualsDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_import_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_index_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_indexed_access_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexedAccessType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_infer_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInferType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_interface_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_interface_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_keyword_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordType, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_keyword_type_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordTypeKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_mapped_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMappedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_method_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMethodSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_block<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceExportDecl, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_non_null_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNonNullExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_optional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsOptionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_param_prop_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamPropParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_parenthesized_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParenthesizedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_property_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsPropertySignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_qualified_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsQualifiedName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_rest_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsRestType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_satisfies_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSatisfiesExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_setter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_this_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisType, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_this_type_or_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisTypeOrIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tpl_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTplLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTupleElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_alias_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAliasDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAnn<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_operator<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_operator_op<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperatorOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_predicate<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypePredicate<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_query<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQuery<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_query_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQueryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_types<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsType<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_union_or_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_or_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_union_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_unary_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_unary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_update_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_update_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_using_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast UsingDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_declarator<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclarator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_declarators<'ast: 'r, 'r>( + &mut self, + node: &'ast [VarDeclarator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_with_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WithStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_yield_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast YieldExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitAstPath<'a> for Box<'a, V> +where + V: ?Sized + VisitAstPath<'a>, +{ + #[inline] + fn visit_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Accessibility, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_array_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_array_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_arrow_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrowExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_op<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_assign_target_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTargetPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_atoms::Atom, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_auto_accessor<'ast: 'r, 'r>( + &mut self, + node: &'ast AutoAccessor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_await_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AwaitExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_big_int<'ast: 'r, 'r>( + &mut self, + node: &'ast BigInt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_big_int_value<'ast: 'r, 'r>( + &mut self, + node: &'ast BigIntValue, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_bin_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BinExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_binary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast BinaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_binding_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast BindingIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_block_stmt_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmtOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_bool<'ast: 'r, 'r>(&mut self, node: &'ast Bool, __ast_path: &mut AstNodePath<'r>) { + ::visit_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_break_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BreakStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_call_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CallExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_callee<'ast: 'r, 'r>( + &mut self, + node: &'ast Callee<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast CatchClause<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class<'ast: 'r, 'r>( + &mut self, + node: &'ast Class<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_member<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [ClassMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_method<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_class_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_computed_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ComputedPropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_cond_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CondExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_constructor<'ast: 'r, 'r>( + &mut self, + node: &'ast Constructor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_continue_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ContinueStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_debugger_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DebuggerStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decl<'ast: 'r, 'r>(&mut self, node: &'ast Decl<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decorator<'ast: 'r, 'r>( + &mut self, + node: &'ast Decorator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_decorators<'ast: 'r, 'r>( + &mut self, + node: &'ast [Decorator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast DefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_do_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DoWhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_empty_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast EmptyStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_all<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportAll<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_namespace_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_export_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr<'ast: 'r, 'r>(&mut self, node: &'ast Expr<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExprOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_expr_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_exprs<'ast: 'r, 'r>( + &mut self, + node: &'ast [Expr<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_fn_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast FnDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_fn_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast FnExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_head<'ast: 'r, 'r>( + &mut self, + node: &'ast ForHead<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_in_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForInStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_of_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForOfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_for_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_function<'ast: 'r, 'r>( + &mut self, + node: &'ast Function<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_function(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_getter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast GetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ident<'ast: 'r, 'r>(&mut self, node: &'ast Ident, __ast_path: &mut AstNodePath<'r>) { + ::visit_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ident_name<'ast: 'r, 'r>( + &mut self, + node: &'ast IdentName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_if_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast IfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import<'ast: 'r, 'r>(&mut self, node: &'ast Import, __ast_path: &mut AstNodePath<'r>) { + ::visit_import(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_phase<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportPhase, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_star_as_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportStarAsSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWith<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWithItem, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_import_with_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportWithItem], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_invalid<'ast: 'r, 'r>( + &mut self, + node: &'ast Invalid, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXAttrOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrValue<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_closing_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_childs<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXElementChild<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_element_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_empty_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXEmptyExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_expr_container<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExprContainer<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXFragment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXMemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_namespaced_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXNamespacedName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_object<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXObject<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_opening_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_opening_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_spread_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXSpreadChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_jsx_text<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXText, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key<'ast: 'r, 'r>(&mut self, node: &'ast Key<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_key(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key_value_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValuePatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_key_value_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValueProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_labeled_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast LabeledStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_lit<'ast: 'r, 'r>(&mut self, node: &'ast Lit<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_member_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_meta_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_meta_prop_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_method_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_method_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module<'ast: 'r, 'r>( + &mut self, + node: &'ast Module<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleExportName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleItem<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_module_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ModuleItem<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_named_export<'ast: 'r, 'r>( + &mut self, + node: &'ast NamedExport<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_new_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast NewExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_null<'ast: 'r, 'r>(&mut self, node: &'ast Null, __ast_path: &mut AstNodePath<'r>) { + ::visit_null(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_number<'ast: 'r, 'r>(&mut self, node: &'ast Number, __ast_path: &mut AstNodePath<'r>) { + ::visit_number(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_object_pat_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ObjectPatProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_call<'ast: 'r, 'r>( + &mut self, + node: &'ast OptCall<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_chain_base<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainBase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_chain_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_span<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_str<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_vec_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_opt_vec_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param<'ast: 'r, 'r>( + &mut self, + node: &'ast Param<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param_or_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ParamOrTsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_param_or_ts_param_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ParamOrTsParamProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [Param<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_paren_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ParenExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_pat<'ast: 'r, 'r>(&mut self, node: &'ast Pat<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Pat<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_method<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateName, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_private_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_program<'ast: 'r, 'r>( + &mut self, + node: &'ast Program<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_program(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop<'ast: 'r, 'r>(&mut self, node: &'ast Prop<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast PropOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_prop_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [PropOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_regex<'ast: 'r, 'r>(&mut self, node: &'ast Regex, __ast_path: &mut AstNodePath<'r>) { + ::visit_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_rest_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast RestPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_return_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ReturnStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_script<'ast: 'r, 'r>( + &mut self, + node: &'ast Script<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_script(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_seq_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SeqExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_setter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_simple_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast SimpleAssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_span<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::Span, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_spread_element<'ast: 'r, 'r>( + &mut self, + node: &'ast SpreadElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_static_block<'ast: 'r, 'r>( + &mut self, + node: &'ast StaticBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_stmt<'ast: 'r, 'r>(&mut self, node: &'ast Stmt<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_stmts<'ast: 'r, 'r>( + &mut self, + node: &'ast [Stmt<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_str<'ast: 'r, 'r>(&mut self, node: &'ast Str, __ast_path: &mut AstNodePath<'r>) { + ::visit_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super<'ast: 'r, 'r>(&mut self, node: &'ast Super, __ast_path: &mut AstNodePath<'r>) { + ::visit_super(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_super_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperPropExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_case<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchCase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_cases<'ast: 'r, 'r>( + &mut self, + node: &'ast [SwitchCase<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_switch_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_syntax_context<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::SyntaxContext, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tagged_tpl<'ast: 'r, 'r>( + &mut self, + node: &'ast TaggedTpl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_this_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ThisExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_throw_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ThrowStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl<'ast: 'r, 'r>(&mut self, node: &'ast Tpl<'a>, __ast_path: &mut AstNodePath<'r>) { + ::visit_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TplElement, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_tpl_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TplElement], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast TruePlusMinus, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_try_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast TryStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_array_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsArrayType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_as_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsAsExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_call_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsCallSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_conditional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConditionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_const_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_construct_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEntityName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_member<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_member_id<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMemberId<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_enum_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsEnumMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_export_assignment<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExportAssignment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_expr_with_type_args<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExprWithTypeArgs<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_expr_with_type_argss<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsExprWithTypeArgs<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_external_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExternalModuleRef, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_or_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnOrConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsFnParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_fn_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_getter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsGetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_import_equals_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportEqualsDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_import_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_index_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_indexed_access_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexedAccessType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_infer_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInferType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_interface_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_interface_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_keyword_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordType, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_keyword_type_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordTypeKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_mapped_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMappedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_method_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMethodSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_block<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_namespace_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceExportDecl, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_non_null_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNonNullExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_optional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsOptionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_param_prop_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamPropParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_parenthesized_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParenthesizedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_property_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsPropertySignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_qualified_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsQualifiedName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_rest_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsRestType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_satisfies_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSatisfiesExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_setter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_this_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisType, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_this_type_or_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisTypeOrIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tpl_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTplLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTupleElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_tuple_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_alias_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAliasDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAnn<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_operator<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_operator_op<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperatorOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_predicate<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypePredicate<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_query<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQuery<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_query_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQueryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_type_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_types<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsType<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_union_or_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_or_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_ts_union_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_unary_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_unary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_update_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_update_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateOp, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_using_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast UsingDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclKind, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_declarator<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclarator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_var_declarators<'ast: 'r, 'r>( + &mut self, + node: &'ast [VarDeclarator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_with_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WithStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_yield_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast YieldExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, A, B> VisitAstPath<'a> for ::swc_visit::Either +where + A: VisitAstPath<'a>, + B: VisitAstPath<'a>, +{ + #[inline] + fn visit_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Accessibility, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_array_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_array_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_array_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_array_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_array_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_array_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_arrow_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrowExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_arrow_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_arrow_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_op<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignOp, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_assign_target_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTargetPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_assign_target_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_assign_target_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_atoms::Atom, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_atom(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_atom(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_auto_accessor<'ast: 'r, 'r>( + &mut self, + node: &'ast AutoAccessor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_auto_accessor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_auto_accessor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_await_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AwaitExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_await_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_await_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_big_int<'ast: 'r, 'r>( + &mut self, + node: &'ast BigInt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_big_int(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_big_int(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_big_int_value<'ast: 'r, 'r>( + &mut self, + node: &'ast BigIntValue, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_big_int_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_big_int_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_bin_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BinExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_bin_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_bin_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_binary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast BinaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_binary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_binary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_binding_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast BindingIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_binding_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_binding_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_block_stmt_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmtOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_block_stmt_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_block_stmt_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_bool<'ast: 'r, 'r>(&mut self, node: &'ast Bool, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_bool(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_bool(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_break_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BreakStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_break_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_break_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_call_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CallExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_call_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_call_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_callee<'ast: 'r, 'r>( + &mut self, + node: &'ast Callee<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_callee(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_callee(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast CatchClause<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class<'ast: 'r, 'r>( + &mut self, + node: &'ast Class<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_member<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [ClassMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_method<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_class_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_class_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_class_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_computed_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ComputedPropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_computed_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_computed_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_cond_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CondExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_cond_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_cond_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_constructor<'ast: 'r, 'r>( + &mut self, + node: &'ast Constructor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_constructor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_constructor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_continue_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ContinueStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_continue_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_continue_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_debugger_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DebuggerStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_debugger_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_debugger_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_decl<'ast: 'r, 'r>(&mut self, node: &'ast Decl<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_decl(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_decorator<'ast: 'r, 'r>( + &mut self, + node: &'ast Decorator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_decorator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_decorator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_decorators<'ast: 'r, 'r>( + &mut self, + node: &'ast [Decorator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_decorators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_decorators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast DefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_do_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DoWhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_do_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_do_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_empty_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast EmptyStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_empty_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_empty_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_all<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportAll<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_all(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_all(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_default_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_default_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_default_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_namespace_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_namespace_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_namespace_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_export_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_export_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_export_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_expr<'ast: 'r, 'r>(&mut self, node: &'ast Expr<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_expr(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExprOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_expr_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_expr_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_expr_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_exprs<'ast: 'r, 'r>( + &mut self, + node: &'ast [Expr<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_exprs(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_exprs(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_fn_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast FnDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_fn_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_fn_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_fn_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast FnExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_fn_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_fn_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_for_head<'ast: 'r, 'r>( + &mut self, + node: &'ast ForHead<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_for_head(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_for_head(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_for_in_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForInStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_for_in_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_for_in_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_for_of_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForOfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_for_of_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_for_of_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_for_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_for_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_for_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_function<'ast: 'r, 'r>( + &mut self, + node: &'ast Function<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_function(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_function(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_getter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast GetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_getter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_getter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ident<'ast: 'r, 'r>(&mut self, node: &'ast Ident, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ident_name<'ast: 'r, 'r>( + &mut self, + node: &'ast IdentName, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ident_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ident_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_if_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast IfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_if_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_if_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import<'ast: 'r, 'r>(&mut self, node: &'ast Import, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_phase<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportPhase, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_phase(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_phase(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_star_as_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportStarAsSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_star_as_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_star_as_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_with<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWith<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_with(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_with(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_with_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWithItem, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_with_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_with_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_import_with_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportWithItem], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_import_with_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_import_with_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_invalid<'ast: 'r, 'r>( + &mut self, + node: &'ast Invalid, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_invalid(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_invalid(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_attr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_attr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_attr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_attr_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_attr_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_attr_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_attr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_attr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_attr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_attr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXAttrOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_attr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_attr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrValue<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_closing_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_closing_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_closing_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_element_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_element_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_element_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_element_childs<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXElementChild<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_element_childs(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_element_childs(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_element_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_element_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_element_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_empty_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXEmptyExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_empty_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_empty_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_expr_container<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExprContainer<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_expr_container(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_expr_container(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXFragment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXMemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_namespaced_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXNamespacedName, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_namespaced_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_namespaced_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_object<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXObject<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_object(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_object(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_opening_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_opening_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_opening_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_opening_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_opening_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_opening_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_spread_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXSpreadChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_spread_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_spread_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_jsx_text<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXText, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_jsx_text(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_jsx_text(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_key<'ast: 'r, 'r>(&mut self, node: &'ast Key<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_key(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => VisitAstPath::visit_key(visitor, node, __ast_path), + } + } + + #[inline] + fn visit_key_value_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValuePatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_key_value_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_key_value_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_key_value_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValueProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_key_value_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_key_value_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_labeled_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast LabeledStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_labeled_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_labeled_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_lit<'ast: 'r, 'r>(&mut self, node: &'ast Lit<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_lit(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => VisitAstPath::visit_lit(visitor, node, __ast_path), + } + } + + #[inline] + fn visit_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_member_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_member_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_member_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_meta_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_meta_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_meta_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_meta_prop_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropKind, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_meta_prop_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_meta_prop_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_method_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodKind, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_method_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_method_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_method_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_method_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_method_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_module<'ast: 'r, 'r>( + &mut self, + node: &'ast Module<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_module(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_module(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleExportName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_module_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleItem<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_module_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_module_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_module_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ModuleItem<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_module_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_module_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_named_export<'ast: 'r, 'r>( + &mut self, + node: &'ast NamedExport<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_named_export(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_named_export(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_new_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast NewExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_new_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_new_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_null<'ast: 'r, 'r>(&mut self, node: &'ast Null, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_null(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_null(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_number<'ast: 'r, 'r>(&mut self, node: &'ast Number, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_number(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_number(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_object_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_object_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_object_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_object_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_object_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_object_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_object_pat_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ObjectPatProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_object_pat_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_object_pat_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_atom(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_atom(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_call<'ast: 'r, 'r>( + &mut self, + node: &'ast OptCall<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_call(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_call(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_chain_base<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainBase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_chain_base(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_chain_base(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_chain_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_chain_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_chain_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_span<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_span(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_span(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_str<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_str(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_str(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_ts_type_param_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_ts_type_param_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_vec_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_opt_vec_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_opt_vec_pats(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_opt_vec_pats(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_param<'ast: 'r, 'r>( + &mut self, + node: &'ast Param<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_param_or_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ParamOrTsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_param_or_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_param_or_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_param_or_ts_param_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ParamOrTsParamProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_param_or_ts_param_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_param_or_ts_param_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [Param<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_paren_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ParenExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_paren_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_paren_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_pat<'ast: 'r, 'r>(&mut self, node: &'ast Pat<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_pat(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => VisitAstPath::visit_pat(visitor, node, __ast_path), + } + } + + #[inline] + fn visit_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Pat<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_pats(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_pats(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_private_method<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_private_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_private_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_private_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateName, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_private_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_private_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_private_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_private_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_private_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_program<'ast: 'r, 'r>( + &mut self, + node: &'ast Program<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_program(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_program(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_prop<'ast: 'r, 'r>(&mut self, node: &'ast Prop<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_prop(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_prop_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast PropOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_prop_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_prop_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_prop_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [PropOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_prop_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_prop_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_regex<'ast: 'r, 'r>(&mut self, node: &'ast Regex, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_regex(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_regex(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_rest_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast RestPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_rest_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_rest_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_return_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ReturnStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_return_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_return_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_script<'ast: 'r, 'r>( + &mut self, + node: &'ast Script<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_script(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_script(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_seq_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SeqExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_seq_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_seq_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_setter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_setter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_setter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_simple_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast SimpleAssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_simple_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_simple_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_span<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::Span, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_span(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_span(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_spread_element<'ast: 'r, 'r>( + &mut self, + node: &'ast SpreadElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_spread_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_spread_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_static_block<'ast: 'r, 'r>( + &mut self, + node: &'ast StaticBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_static_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_static_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_stmt<'ast: 'r, 'r>(&mut self, node: &'ast Stmt<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_stmt(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_stmts<'ast: 'r, 'r>( + &mut self, + node: &'ast [Stmt<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_stmts(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_stmts(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_str<'ast: 'r, 'r>(&mut self, node: &'ast Str, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_str(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => VisitAstPath::visit_str(visitor, node, __ast_path), + } + } + + #[inline] + fn visit_super<'ast: 'r, 'r>(&mut self, node: &'ast Super, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_super(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_super(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_super_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_super_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_super_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_super_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperPropExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_super_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_super_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_switch_case<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchCase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_switch_case(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_switch_case(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_switch_cases<'ast: 'r, 'r>( + &mut self, + node: &'ast [SwitchCase<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_switch_cases(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_switch_cases(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_switch_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_switch_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_switch_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_syntax_context<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::SyntaxContext, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_syntax_context(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_syntax_context(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_tagged_tpl<'ast: 'r, 'r>( + &mut self, + node: &'ast TaggedTpl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_tagged_tpl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_tagged_tpl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_this_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ThisExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_this_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_this_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_throw_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ThrowStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_throw_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_throw_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_tpl<'ast: 'r, 'r>(&mut self, node: &'ast Tpl<'a>, __ast_path: &mut AstNodePath<'r>) { + match self { + swc_visit::Either::Left(visitor) => VisitAstPath::visit_tpl(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => VisitAstPath::visit_tpl(visitor, node, __ast_path), + } + } + + #[inline] + fn visit_tpl_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TplElement, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_tpl_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_tpl_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_tpl_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TplElement], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_tpl_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_tpl_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast TruePlusMinus, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_try_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast TryStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_try_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_try_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_array_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsArrayType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_array_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_array_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_as_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsAsExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_as_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_as_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_call_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsCallSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_call_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_call_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_conditional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConditionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_conditional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_conditional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_const_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_const_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_const_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_construct_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_construct_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_construct_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEntityName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_enum_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_enum_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_enum_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_enum_member<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_enum_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_enum_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_enum_member_id<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMemberId<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_enum_member_id(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_enum_member_id(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_enum_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsEnumMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_enum_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_enum_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_export_assignment<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExportAssignment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_export_assignment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_export_assignment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_expr_with_type_args<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExprWithTypeArgs<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_expr_with_type_args(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_expr_with_type_args(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_expr_with_type_argss<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsExprWithTypeArgs<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_expr_with_type_argss(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_expr_with_type_argss(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_external_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExternalModuleRef, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_external_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_external_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_fn_or_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnOrConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_fn_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_fn_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_fn_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_fn_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsFnParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_fn_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_fn_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_fn_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_fn_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_fn_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_getter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsGetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_getter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_getter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_import_equals_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportEqualsDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_import_equals_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_import_equals_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_import_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_import_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_import_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_index_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_index_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_index_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_indexed_access_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexedAccessType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_indexed_access_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_indexed_access_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_infer_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInferType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_infer_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_infer_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_interface_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_interface_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_interface_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_interface_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_interface_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_interface_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_keyword_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordType, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_keyword_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_keyword_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_keyword_type_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordTypeKind, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_keyword_type_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_keyword_type_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_mapped_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMappedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_mapped_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_mapped_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_method_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMethodSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_method_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_method_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_module_block<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_module_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_module_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_module_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_module_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_module_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_namespace_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_namespace_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_namespace_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_namespace_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceExportDecl, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_namespace_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_namespace_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_non_null_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNonNullExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_non_null_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_non_null_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_optional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsOptionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_optional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_optional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_param_prop_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamPropParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_param_prop_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_param_prop_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_parenthesized_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParenthesizedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_parenthesized_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_parenthesized_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_property_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsPropertySignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_property_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_property_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_qualified_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsQualifiedName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_qualified_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_qualified_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_rest_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsRestType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_rest_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_rest_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_satisfies_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSatisfiesExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_satisfies_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_satisfies_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_setter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_setter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_setter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_this_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisType, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_this_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_this_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_this_type_or_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisTypeOrIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_this_type_or_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_this_type_or_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_tpl_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTplLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_tpl_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_tpl_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_tuple_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_tuple_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_tuple_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_tuple_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTupleElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_tuple_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_tuple_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_tuple_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_tuple_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_tuple_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_alias_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAliasDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_alias_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_alias_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAnn<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_operator<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_operator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_operator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_operator_op<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperatorOp, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_operator_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_operator_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_param_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_param_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_predicate<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypePredicate<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_predicate(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_predicate(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_query<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQuery<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_query(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_query(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_query_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQueryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_query_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_query_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_type_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_type_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_type_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_types<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsType<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_types(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_types(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_union_or_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_union_or_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_union_or_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_ts_union_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_ts_union_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_ts_union_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_unary_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_unary_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_unary_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_unary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_unary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_unary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_update_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_update_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_update_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_update_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateOp, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_update_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_update_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_using_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast UsingDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_using_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_using_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_var_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_var_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_var_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_var_decl_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclKind, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_var_decl_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_var_decl_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_var_declarator<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclarator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_var_declarator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_var_declarator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_var_declarators<'ast: 'r, 'r>( + &mut self, + node: &'ast [VarDeclarator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_var_declarators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_var_declarators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_with_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WithStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_with_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_with_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_yield_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast YieldExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitAstPath::visit_yield_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitAstPath::visit_yield_expr(visitor, node, __ast_path) + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitAstPath<'a> for ::swc_visit::Optional +where + V: VisitAstPath<'a>, +{ + #[inline] + fn visit_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Accessibility, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_accessibility(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_array_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_array_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_array_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrayPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_array_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_arrow_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ArrowExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_arrow_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_op<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignOp, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_pat_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_target(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_assign_target_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast AssignTargetPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_assign_target_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_atoms::Atom, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_atom(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_auto_accessor<'ast: 'r, 'r>( + &mut self, + node: &'ast AutoAccessor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_auto_accessor(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_await_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast AwaitExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_await_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_big_int<'ast: 'r, 'r>( + &mut self, + node: &'ast BigInt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_big_int(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_big_int_value<'ast: 'r, 'r>( + &mut self, + node: &'ast BigIntValue, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_big_int_value(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_bin_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BinExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_bin_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_binary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast BinaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_binary_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_binding_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast BindingIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_binding_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_block_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_block_stmt_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast BlockStmtOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_block_stmt_or_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_bool<'ast: 'r, 'r>(&mut self, node: &'ast Bool, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_bool(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_break_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast BreakStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_break_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_call_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CallExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_call_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_callee<'ast: 'r, 'r>( + &mut self, + node: &'ast Callee<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_callee(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast CatchClause<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_catch_clause(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class<'ast: 'r, 'r>( + &mut self, + node: &'ast Class<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_member<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_member(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [ClassMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_members(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_method<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_method(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_class_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ClassProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_class_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_computed_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ComputedPropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_computed_prop_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_cond_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast CondExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_cond_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_constructor<'ast: 'r, 'r>( + &mut self, + node: &'ast Constructor<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_constructor(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_continue_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ContinueStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_continue_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_debugger_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DebuggerStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_debugger_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_decl<'ast: 'r, 'r>(&mut self, node: &'ast Decl<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_decorator<'ast: 'r, 'r>( + &mut self, + node: &'ast Decorator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_decorator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_decorators<'ast: 'r, 'r>( + &mut self, + node: &'ast [Decorator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_decorators(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast DefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_default_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_do_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast DoWhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_do_while_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_empty_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast EmptyStmt, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_empty_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_all<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportAll<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_all(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_default_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_default_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_default_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_default_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_default_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_named_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_namespace_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_namespace_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_export_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ExportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_export_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_export_specifiers(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_expr<'ast: 'r, 'r>(&mut self, node: &'ast Expr<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_expr_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [ExprOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_expr_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ExprStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_expr_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_exprs<'ast: 'r, 'r>( + &mut self, + node: &'ast [Expr<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_exprs(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_fn_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast FnDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_fn_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_fn_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast FnExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_fn_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_for_head<'ast: 'r, 'r>( + &mut self, + node: &'ast ForHead<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_for_head(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_for_in_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForInStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_for_in_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_for_of_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForOfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_for_of_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_for_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ForStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_for_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_function<'ast: 'r, 'r>( + &mut self, + node: &'ast Function<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_function(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_getter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast GetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_getter_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ident<'ast: 'r, 'r>(&mut self, node: &'ast Ident, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ident_name<'ast: 'r, 'r>( + &mut self, + node: &'ast IdentName, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ident_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_if_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast IfStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_if_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import<'ast: 'r, 'r>(&mut self, node: &'ast Import, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_import(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_default_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportDefaultSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_default_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_named_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportNamedSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_named_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_phase<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportPhase, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_phase(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportSpecifier<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_specifiers<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportSpecifier<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_specifiers(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_star_as_specifier<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportStarAsSpecifier, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_star_as_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_with<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWith<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_with(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_with_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ImportWithItem, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_with_item(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_import_with_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ImportWithItem], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_import_with_items(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_invalid<'ast: 'r, 'r>( + &mut self, + node: &'ast Invalid, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_invalid(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_attr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_attr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_attr_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_attr_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_attr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_attr_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_attr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXAttrOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_attr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXAttrValue<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_attr_value(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_closing_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_closing_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXClosingFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_closing_fragment(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_element_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_element_child(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_element_childs<'ast: 'r, 'r>( + &mut self, + node: &'ast [JSXElementChild<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_element_childs(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_element_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXElementName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_element_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_empty_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXEmptyExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_empty_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_expr_container<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXExprContainer<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_expr_container(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXFragment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_fragment(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXMemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_member_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_namespaced_name<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXNamespacedName, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_namespaced_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_object<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXObject<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_object(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_opening_element<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_opening_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_opening_fragment<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXOpeningFragment, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_opening_fragment(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_spread_child<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXSpreadChild<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_spread_child(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_jsx_text<'ast: 'r, 'r>( + &mut self, + node: &'ast JSXText, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_jsx_text(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_key<'ast: 'r, 'r>(&mut self, node: &'ast Key<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_key(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_key_value_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValuePatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_key_value_pat_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_key_value_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast KeyValueProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_key_value_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_labeled_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast LabeledStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_labeled_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_lit<'ast: 'r, 'r>(&mut self, node: &'ast Lit<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_member_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_member_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_member_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MemberProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_member_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_meta_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_meta_prop_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_meta_prop_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MetaPropKind, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_meta_prop_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_method_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodKind, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_method_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_method_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast MethodProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_method_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_module<'ast: 'r, 'r>( + &mut self, + node: &'ast Module<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_module(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_module_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleExportName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_module_export_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_module_item<'ast: 'r, 'r>( + &mut self, + node: &'ast ModuleItem<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_module_item(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_module_items<'ast: 'r, 'r>( + &mut self, + node: &'ast [ModuleItem<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_module_items(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_named_export<'ast: 'r, 'r>( + &mut self, + node: &'ast NamedExport<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_named_export(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_new_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast NewExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_new_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_null<'ast: 'r, 'r>(&mut self, node: &'ast Null, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_null(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_number<'ast: 'r, 'r>(&mut self, node: &'ast Number, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_number(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_object_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_object_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_object_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_object_pat_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ObjectPatProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_object_pat_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_object_pat_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ObjectPatProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_object_pat_props(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_accessibility<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_accessibility(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_atom<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_atom(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_block_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_block_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_call<'ast: 'r, 'r>( + &mut self, + node: &'ast OptCall<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_call(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_catch_clause<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_catch_clause(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_chain_base<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainBase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_chain_base(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_chain_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast OptChainExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_chain_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_expr_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_expr_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_jsx_attr_value<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_jsx_attr_value(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_jsx_closing_element<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_jsx_closing_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_module_export_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_module_export_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_object_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_object_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_span<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_span(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_str<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_str(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast Option, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_true_plus_minus(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_entity_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_namespace_body(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_type_param_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_opt_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast Option>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_var_decl_or_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_vec_expr_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_vec_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_opt_vec_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Option>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_opt_vec_pats(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_param<'ast: 'r, 'r>( + &mut self, + node: &'ast Param<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_param_or_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast ParamOrTsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_param_or_ts_param_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_param_or_ts_param_props<'ast: 'r, 'r>( + &mut self, + node: &'ast [ParamOrTsParamProp<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_param_or_ts_param_props(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [Param<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_paren_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ParenExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_paren_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_pat<'ast: 'r, 'r>(&mut self, node: &'ast Pat<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_pats<'ast: 'r, 'r>( + &mut self, + node: &'ast [Pat<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_pats(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_private_method<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateMethod<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_private_method(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_private_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateName, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_private_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_private_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast PrivateProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_private_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_program<'ast: 'r, 'r>( + &mut self, + node: &'ast Program<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_program(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_prop<'ast: 'r, 'r>(&mut self, node: &'ast Prop<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_prop_name<'ast: 'r, 'r>( + &mut self, + node: &'ast PropName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_prop_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_prop_or_spread<'ast: 'r, 'r>( + &mut self, + node: &'ast PropOrSpread<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_prop_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_prop_or_spreads<'ast: 'r, 'r>( + &mut self, + node: &'ast [PropOrSpread<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_prop_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_regex<'ast: 'r, 'r>(&mut self, node: &'ast Regex, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_regex(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_rest_pat<'ast: 'r, 'r>( + &mut self, + node: &'ast RestPat<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_rest_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_return_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ReturnStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_return_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_script<'ast: 'r, 'r>( + &mut self, + node: &'ast Script<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_script(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_seq_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SeqExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_seq_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_setter_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SetterProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_setter_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_simple_assign_target<'ast: 'r, 'r>( + &mut self, + node: &'ast SimpleAssignTarget<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_simple_assign_target(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_span<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::Span, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_span(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_spread_element<'ast: 'r, 'r>( + &mut self, + node: &'ast SpreadElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_spread_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_static_block<'ast: 'r, 'r>( + &mut self, + node: &'ast StaticBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_static_block(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_stmt<'ast: 'r, 'r>(&mut self, node: &'ast Stmt<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_stmts<'ast: 'r, 'r>( + &mut self, + node: &'ast [Stmt<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_stmts(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_str<'ast: 'r, 'r>(&mut self, node: &'ast Str, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_str(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_super<'ast: 'r, 'r>(&mut self, node: &'ast Super, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_super(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_super_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_super_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_super_prop_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast SuperPropExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_super_prop_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_switch_case<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchCase<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_switch_case(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_switch_cases<'ast: 'r, 'r>( + &mut self, + node: &'ast [SwitchCase<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_switch_cases(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_switch_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast SwitchStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_switch_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_syntax_context<'ast: 'r, 'r>( + &mut self, + node: &'ast swc_common::SyntaxContext, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_syntax_context(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_tagged_tpl<'ast: 'r, 'r>( + &mut self, + node: &'ast TaggedTpl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_tagged_tpl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_this_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast ThisExpr, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_this_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_throw_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast ThrowStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_throw_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_tpl<'ast: 'r, 'r>(&mut self, node: &'ast Tpl<'a>, __ast_path: &mut AstNodePath<'r>) { + if self.enabled { + ::visit_tpl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_tpl_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TplElement, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_tpl_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_tpl_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TplElement], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_tpl_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_true_plus_minus<'ast: 'r, 'r>( + &mut self, + node: &'ast TruePlusMinus, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_true_plus_minus(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_try_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast TryStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_try_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_array_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsArrayType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_array_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_as_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsAsExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_as_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_call_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsCallSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_call_signature_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_conditional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConditionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_conditional_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_const_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_const_assertion(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_construct_signature_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructSignatureDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_construct_signature_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_ts_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_constructor_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_entity_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEntityName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_entity_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_enum_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_enum_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_enum_member<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMember<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_enum_member(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_enum_member_id<'ast: 'r, 'r>( + &mut self, + node: &'ast TsEnumMemberId<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_enum_member_id(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_enum_members<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsEnumMember<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_enum_members(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_export_assignment<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExportAssignment<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_export_assignment(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_expr_with_type_args<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExprWithTypeArgs<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_expr_with_type_args(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_expr_with_type_argss<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsExprWithTypeArgs<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_expr_with_type_argss(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_external_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsExternalModuleRef, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_external_module_ref(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_fn_or_constructor_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnOrConstructorType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_fn_or_constructor_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_ts_fn_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_fn_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_fn_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsFnParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_fn_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_fn_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsFnType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_fn_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_getter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsGetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_getter_signature(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_import_equals_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportEqualsDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_import_equals_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_import_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsImportType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_import_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_index_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_index_signature(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_indexed_access_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIndexedAccessType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_indexed_access_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_infer_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInferType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_infer_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_instantiation(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_interface_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_interface_body(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_interface_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsInterfaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_interface_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_intersection_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_keyword_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordType, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_keyword_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_keyword_type_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast TsKeywordTypeKind, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_keyword_type_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_lit_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_mapped_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMappedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_mapped_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_method_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsMethodSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_method_signature(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_module_block<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleBlock<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_module_block(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_module_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_module_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_module_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_module_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_module_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsModuleRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_module_ref(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_namespace_body<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceBody<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_namespace_body(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_namespace_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_namespace_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_namespace_export_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNamespaceExportDecl, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_namespace_export_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_non_null_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsNonNullExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_non_null_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_optional_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsOptionalType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_optional_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_param_prop<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamProp<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_param_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_param_prop_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParamPropParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_param_prop_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_parenthesized_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsParenthesizedType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_parenthesized_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_property_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsPropertySignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_property_signature(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_qualified_name<'ast: 'r, 'r>( + &mut self, + node: &'ast TsQualifiedName<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_qualified_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_rest_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsRestType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_rest_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_satisfies_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSatisfiesExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_satisfies_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_setter_signature<'ast: 'r, 'r>( + &mut self, + node: &'ast TsSetterSignature<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_setter_signature(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_this_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisType, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_this_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_this_type_or_ident<'ast: 'r, 'r>( + &mut self, + node: &'ast TsThisTypeOrIdent<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_this_type_or_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_tpl_lit_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTplLitType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_tpl_lit_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_tuple_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_tuple_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_tuple_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTupleElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_tuple_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_tuple_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTupleType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_tuple_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_alias_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAliasDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_alias_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_ann<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAnn<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_assertion<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeAssertion<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_assertion(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_element<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeElement<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_elements<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeElement<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_lit<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeLit<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_operator<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_operator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_operator_op<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeOperatorOp, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_operator_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_param<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParam<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_param_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_param_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_param_instantiation<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeParamInstantiation<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_ts_type_params<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsTypeParam<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_predicate<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypePredicate<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_predicate(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_query<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQuery<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_query(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_query_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeQueryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_query_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_type_ref<'ast: 'r, 'r>( + &mut self, + node: &'ast TsTypeRef<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_type_ref(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_types<'ast: 'r, 'r>( + &mut self, + node: &'ast [TsType<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_types(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_ts_union_or_intersection_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_union_or_intersection_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_ts_union_type<'ast: 'r, 'r>( + &mut self, + node: &'ast TsUnionType<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_ts_union_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_unary_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_unary_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_unary_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UnaryOp, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_unary_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_update_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_update_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_update_op<'ast: 'r, 'r>( + &mut self, + node: &'ast UpdateOp, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_update_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_using_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast UsingDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_using_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_var_decl<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDecl<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_var_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_var_decl_kind<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclKind, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_var_decl_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_var_decl_or_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclOrExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_var_decl_or_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_var_declarator<'ast: 'r, 'r>( + &mut self, + node: &'ast VarDeclarator<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_var_declarator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_var_declarators<'ast: 'r, 'r>( + &mut self, + node: &'ast [VarDeclarator<'a>], + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_var_declarators(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_while_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WhileStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_while_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_with_stmt<'ast: 'r, 'r>( + &mut self, + node: &'ast WithStmt<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_with_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_yield_expr<'ast: 'r, 'r>( + &mut self, + node: &'ast YieldExpr<'a>, + __ast_path: &mut AstNodePath<'r>, + ) { + if self.enabled { + ::visit_yield_expr(&mut self.visitor, node, __ast_path) + } else { + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait VisitWithAstPath<'a, V: ?Sized + VisitAstPath<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ); + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ); +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Accessibility { + #[doc = "Calls [VisitAstPath`::visit_accessibility`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_accessibility(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Accessibility::Public => {} + Accessibility::Protected => {} + Accessibility::Private => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ArrayLit<'a> { + #[doc = "Calls [VisitAstPath`::visit_array_lit`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_lit(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ArrayLit { span, elems } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrayLit( + self, + self::fields::ArrayLitField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrayLit( + self, + self::fields::ArrayLitField::Elems(usize::MAX), + )); + >> as VisitWithAstPath>::visit_with_ast_path( + elems, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ArrayPat<'a> { + #[doc = "Calls [VisitAstPath`::visit_array_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_array_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrayPat( + self, + self::fields::ArrayPatField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrayPat( + self, + self::fields::ArrayPatField::Elems(usize::MAX), + )); + >> as VisitWithAstPath>::visit_with_ast_path( + elems, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrayPat( + self, + self::fields::ArrayPatField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_arrow_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_arrow_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ArrowExpr( + self, + self::fields::ArrowExprField::ReturnType, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + return_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignExpr( + self, + self::fields::AssignExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignExpr( + self, + self::fields::AssignExprField::Op, + )); + >::visit_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignExpr( + self, + self::fields::AssignExprField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignExpr( + self, + self::fields::AssignExprField::Right, + )); + as VisitWithAstPath>::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignPat<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignPat { span, left, right } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPat( + self, + self::fields::AssignPatField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPat( + self, + self::fields::AssignPatField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPat( + self, + self::fields::AssignPatField::Right, + )); + as VisitWithAstPath>::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_pat_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_pat_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignPatProp { span, key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPatProp( + self, + self::fields::AssignPatPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPatProp( + self, + self::fields::AssignPatPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignPatProp( + self, + self::fields::AssignPatPropField::Value, + )); + > as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignProp { span, key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignProp( + self, + self::fields::AssignPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignProp( + self, + self::fields::AssignPropField::Key, + )); + >::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignProp( + self, + self::fields::AssignPropField::Value, + )); + as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignTarget<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_target`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignTarget::Simple { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignTarget( + self, + self::fields::AssignTargetField::Simple, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTarget::Pat { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignTarget( + self, + self::fields::AssignTargetField::Pat, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [VisitAstPath`::visit_assign_target_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_target_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignTargetPat( + self, + self::fields::AssignTargetPatField::Array, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTargetPat::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignTargetPat( + self, + self::fields::AssignTargetPatField::Object, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTargetPat::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AssignTargetPat( + self, + self::fields::AssignTargetPatField::Invalid, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [VisitAstPath`::visit_auto_accessor`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_auto_accessor(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::Value, + )); + > as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AutoAccessor( + self, + self::fields::AutoAccessorField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_await_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_await_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + AwaitExpr { span, arg } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AwaitExpr( + self, + self::fields::AwaitExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::AwaitExpr( + self, + self::fields::AwaitExprField::Arg, + )); + as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BigInt<'a> { + #[doc = "Calls [VisitAstPath`::visit_big_int`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BigInt { span, value, raw } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BigInt( + self, + self::fields::BigIntField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BigInt( + self, + self::fields::BigIntField::Value, + )); + as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BigInt( + self, + self::fields::BigIntField::Raw, + )); + as VisitWithAstPath>::visit_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BinExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_bin_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_bin_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BinExpr { + span, + op, + left, + right, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BinExpr( + self, + self::fields::BinExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BinExpr( + self, + self::fields::BinExprField::Op, + )); + >::visit_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BinExpr( + self, + self::fields::BinExprField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BinExpr( + self, + self::fields::BinExprField::Right, + )); + as VisitWithAstPath>::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BindingIdent<'a> { + #[doc = "Calls [VisitAstPath`::visit_binding_ident`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binding_ident(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BindingIdent { id, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BindingIdent( + self, + self::fields::BindingIdentField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BindingIdent( + self, + self::fields::BindingIdentField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BlockStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_block_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BlockStmt { span, ctxt, stmts } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BlockStmt( + self, + self::fields::BlockStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BlockStmt( + self, + self::fields::BlockStmtField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BlockStmt( + self, + self::fields::BlockStmtField::Stmts(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + stmts, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_block_stmt_or_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_block_stmt_or_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BlockStmtOrExpr( + self, + self::fields::BlockStmtOrExprField::BlockStmt, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BlockStmtOrExpr( + self, + self::fields::BlockStmtOrExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Bool { + #[doc = "Calls [VisitAstPath`::visit_bool`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_bool(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Bool { span, value } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Bool(self, self::fields::BoolField::Span)); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BreakStmt { + #[doc = "Calls [VisitAstPath`::visit_break_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_break_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + BreakStmt { span, label } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BreakStmt( + self, + self::fields::BreakStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::BreakStmt( + self, + self::fields::BreakStmtField::Label, + )); + as VisitWithAstPath>::visit_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for CallExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_call_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_call_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CallExpr( + self, + self::fields::CallExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CallExpr( + self, + self::fields::CallExprField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CallExpr( + self, + self::fields::CallExprField::Callee, + )); + as VisitWithAstPath>::visit_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CallExpr( + self, + self::fields::CallExprField::Args(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CallExpr( + self, + self::fields::CallExprField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Callee<'a> { + #[doc = "Calls [VisitAstPath`::visit_callee`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_callee(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Callee::Super { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Callee( + self, + self::fields::CalleeField::Super, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Callee::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Callee( + self, + self::fields::CalleeField::Import, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Callee::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Callee( + self, + self::fields::CalleeField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for CatchClause<'a> { + #[doc = "Calls [VisitAstPath`::visit_catch_clause`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_catch_clause(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + CatchClause { span, param, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CatchClause( + self, + self::fields::CatchClauseField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CatchClause( + self, + self::fields::CatchClauseField::Param, + )); + > as VisitWithAstPath>::visit_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CatchClause( + self, + self::fields::CatchClauseField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Class<'a> { + #[doc = "Calls [VisitAstPath`::visit_class`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::Body(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::SuperClass, + )); + > as VisitWithAstPath>::visit_with_ast_path( + super_class, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::SuperTypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (super_type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Class( + self, + self::fields::ClassField::Implements(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + implements, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ClassDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_class_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ClassDecl { + ident, + declare, + class, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassDecl( + self, + self::fields::ClassDeclField::Ident, + )); + >::visit_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassDecl( + self, + self::fields::ClassDeclField::Class, + )); + > as VisitWithAstPath>::visit_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ClassExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_class_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ClassExpr { ident, class } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassExpr( + self, + self::fields::ClassExprField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassExpr( + self, + self::fields::ClassExprField::Class, + )); + > as VisitWithAstPath>::visit_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ClassMember<'a> { + #[doc = "Calls [VisitAstPath`::visit_class_member`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_member(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ClassMember::Constructor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::Constructor, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::Method { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::Method, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::PrivateMethod { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::PrivateMethod, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::ClassProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::ClassProp, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::PrivateProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::PrivateProp, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::TsIndexSignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::Empty { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::Empty, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::StaticBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::StaticBlock, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::AutoAccessor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMember( + self, + self::fields::ClassMemberField::AutoAccessor, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ClassMethod<'a> { + #[doc = "Calls [VisitAstPath`::visit_class_method`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_method(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMethod( + self, + self::fields::ClassMethodField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMethod( + self, + self::fields::ClassMethodField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMethod( + self, + self::fields::ClassMethodField::Function, + )); + > as VisitWithAstPath>::visit_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMethod( + self, + self::fields::ClassMethodField::Kind, + )); + >::visit_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassMethod( + self, + self::fields::ClassMethodField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ClassProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_class_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::Value, + )); + > as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ClassProp( + self, + self::fields::ClassPropField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [VisitAstPath`::visit_computed_prop_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_computed_prop_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ComputedPropName { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ComputedPropName( + self, + self::fields::ComputedPropNameField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ComputedPropName( + self, + self::fields::ComputedPropNameField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for CondExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_cond_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_cond_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CondExpr( + self, + self::fields::CondExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CondExpr( + self, + self::fields::CondExprField::Test, + )); + as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CondExpr( + self, + self::fields::CondExprField::Cons, + )); + as VisitWithAstPath>::visit_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::CondExpr( + self, + self::fields::CondExprField::Alt, + )); + as VisitWithAstPath>::visit_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Constructor<'a> { + #[doc = "Calls [VisitAstPath`::visit_constructor`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_constructor(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Constructor( + self, + self::fields::ConstructorField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ContinueStmt { + #[doc = "Calls [VisitAstPath`::visit_continue_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_continue_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ContinueStmt { span, label } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ContinueStmt( + self, + self::fields::ContinueStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ContinueStmt( + self, + self::fields::ContinueStmtField::Label, + )); + as VisitWithAstPath>::visit_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for DebuggerStmt { + #[doc = "Calls [VisitAstPath`::visit_debugger_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_debugger_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + DebuggerStmt { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DebuggerStmt( + self, + self::fields::DebuggerStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Decl<'a> { + #[doc = "Calls [VisitAstPath`::visit_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Decl::Class { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Decl(self, self::fields::DeclField::Class)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Fn { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Decl(self, self::fields::DeclField::Fn)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Var { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Decl(self, self::fields::DeclField::Var)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Using { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Decl(self, self::fields::DeclField::Using)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsInterface { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decl( + self, + self::fields::DeclField::TsInterface, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsTypeAlias { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decl( + self, + self::fields::DeclField::TsTypeAlias, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsEnum { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decl( + self, + self::fields::DeclField::TsEnum, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsModule { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decl( + self, + self::fields::DeclField::TsModule, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Decorator<'a> { + #[doc = "Calls [VisitAstPath`::visit_decorator`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorator(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Decorator { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decorator( + self, + self::fields::DecoratorField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Decorator( + self, + self::fields::DecoratorField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_default_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_default_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + DefaultDecl::Class { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DefaultDecl( + self, + self::fields::DefaultDeclField::Class, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + DefaultDecl::Fn { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DefaultDecl( + self, + self::fields::DefaultDeclField::Fn, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DefaultDecl( + self, + self::fields::DefaultDeclField::TsInterfaceDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_do_while_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_do_while_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + DoWhileStmt { span, test, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DoWhileStmt( + self, + self::fields::DoWhileStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DoWhileStmt( + self, + self::fields::DoWhileStmtField::Test, + )); + as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::DoWhileStmt( + self, + self::fields::DoWhileStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for EmptyStmt { + #[doc = "Calls [VisitAstPath`::visit_empty_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_empty_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + EmptyStmt { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::EmptyStmt( + self, + self::fields::EmptyStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportAll<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_all`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_all(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportAll( + self, + self::fields::ExportAllField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportAll( + self, + self::fields::ExportAllField::Src, + )); + as VisitWithAstPath>::visit_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportAll( + self, + self::fields::ExportAllField::With, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportDecl { span, decl } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportDecl( + self, + self::fields::ExportDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportDecl( + self, + self::fields::ExportDeclField::Decl, + )); + as VisitWithAstPath>::visit_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_default_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportDefaultDecl { span, decl } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportDefaultDecl( + self, + self::fields::ExportDefaultDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportDefaultDecl( + self, + self::fields::ExportDefaultDeclField::Decl, + )); + as VisitWithAstPath>::visit_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_default_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportDefaultExpr { span, expr } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportDefaultExpr( + self, + self::fields::ExportDefaultExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportDefaultExpr( + self, + self::fields::ExportDefaultExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [VisitAstPath`::visit_export_default_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_default_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportDefaultSpecifier { exported } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportDefaultSpecifier( + self, + self::fields::ExportDefaultSpecifierField::Exported, + )); + >::visit_with_ast_path( + exported, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_named_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_named_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportNamedSpecifier( + self, + self::fields::ExportNamedSpecifierField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportNamedSpecifier( + self, + self::fields::ExportNamedSpecifierField::Orig, + )); + as VisitWithAstPath>::visit_with_ast_path( + orig, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportNamedSpecifier( + self, + self::fields::ExportNamedSpecifierField::Exported, + )); + > as VisitWithAstPath>::visit_with_ast_path( + exported, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportNamespaceSpecifier<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_namespace_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_namespace_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportNamespaceSpecifier { span, name } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportNamespaceSpecifier( + self, + self::fields::ExportNamespaceSpecifierField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ExportNamespaceSpecifier( + self, + self::fields::ExportNamespaceSpecifierField::Name, + )); + as VisitWithAstPath>::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [VisitAstPath`::visit_export_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportSpecifier( + self, + self::fields::ExportSpecifierField::Namespace, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ExportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportSpecifier( + self, + self::fields::ExportSpecifierField::Default, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ExportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExportSpecifier( + self, + self::fields::ExportSpecifierField::Named, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Expr<'a> { + #[doc = "Calls [VisitAstPath`::visit_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Expr::This { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::This)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Array)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Object, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Fn { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Fn)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Unary { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Unary)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Update { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Update, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Bin { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Bin)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Assign, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Member, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::SuperProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::SuperProp, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Cond { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Cond)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Call { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Call)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::New { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::New)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Seq { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Seq)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Ident)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Lit { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Lit)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Tpl { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Tpl)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TaggedTpl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TaggedTpl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Arrow { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Arrow)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Class { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Class)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Yield { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Yield)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::MetaProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::MetaProp, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Await { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Await)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Paren { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::Paren)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXMember { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Jsxmember, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::JsxnamespacedName, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXEmpty { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Jsxempty, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Jsxelement, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Jsxfragment, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TsTypeAssertion, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsConstAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TsConstAssertion, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsNonNull { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TsNonNull, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsAs { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Expr(self, self::fields::ExprField::TsAs)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TsInstantiation, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::TsSatisfies, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::PrivateName, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::OptChain { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::OptChain, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Expr( + self, + self::fields::ExprField::Invalid, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [VisitAstPath`::visit_expr_or_spread`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spread(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExprOrSpread { spread, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExprOrSpread( + self, + self::fields::ExprOrSpreadField::Spread, + )); + as VisitWithAstPath>::visit_with_ast_path( + spread, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExprOrSpread( + self, + self::fields::ExprOrSpreadField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ExprStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_expr_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ExprStmt { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExprStmt( + self, + self::fields::ExprStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ExprStmt( + self, + self::fields::ExprStmtField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for FnDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_fn_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + FnDecl { + ident, + declare, + function, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::FnDecl( + self, + self::fields::FnDeclField::Ident, + )); + >::visit_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::FnDecl( + self, + self::fields::FnDeclField::Function, + )); + > as VisitWithAstPath>::visit_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for FnExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_fn_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_fn_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + FnExpr { ident, function } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::FnExpr( + self, + self::fields::FnExprField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::FnExpr( + self, + self::fields::FnExprField::Function, + )); + > as VisitWithAstPath>::visit_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ForHead<'a> { + #[doc = "Calls [VisitAstPath`::visit_for_head`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_head(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ForHead::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForHead( + self, + self::fields::ForHeadField::VarDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ForHead::UsingDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForHead( + self, + self::fields::ForHeadField::UsingDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ForHead::Pat { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForHead( + self, + self::fields::ForHeadField::Pat, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ForInStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_for_in_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_in_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForInStmt( + self, + self::fields::ForInStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForInStmt( + self, + self::fields::ForInStmtField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForInStmt( + self, + self::fields::ForInStmtField::Right, + )); + as VisitWithAstPath>::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForInStmt( + self, + self::fields::ForInStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_for_of_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_of_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForOfStmt( + self, + self::fields::ForOfStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForOfStmt( + self, + self::fields::ForOfStmtField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForOfStmt( + self, + self::fields::ForOfStmtField::Right, + )); + as VisitWithAstPath>::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForOfStmt( + self, + self::fields::ForOfStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ForStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_for_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_for_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForStmt( + self, + self::fields::ForStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForStmt( + self, + self::fields::ForStmtField::Init, + )); + > as VisitWithAstPath>::visit_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForStmt( + self, + self::fields::ForStmtField::Test, + )); + > as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForStmt( + self, + self::fields::ForStmtField::Update, + )); + > as VisitWithAstPath>::visit_with_ast_path( + update, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ForStmt( + self, + self::fields::ForStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Function<'a> { + #[doc = "Calls [VisitAstPath`::visit_function`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_function(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Function( + self, + self::fields::FunctionField::ReturnType, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + return_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for GetterProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_getter_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_getter_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::GetterProp( + self, + self::fields::GetterPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::GetterProp( + self, + self::fields::GetterPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::GetterProp( + self, + self::fields::GetterPropField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::GetterProp( + self, + self::fields::GetterPropField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Ident { + #[doc = "Calls [VisitAstPath`::visit_ident`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ident(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Ident( + self, + self::fields::IdentField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Ident( + self, + self::fields::IdentField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Ident(self, self::fields::IdentField::Sym)); + >::visit_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for IdentName { + #[doc = "Calls [VisitAstPath`::visit_ident_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ident_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + IdentName { span, sym } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IdentName( + self, + self::fields::IdentNameField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IdentName( + self, + self::fields::IdentNameField::Sym, + )); + >::visit_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for IfStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_if_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_if_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IfStmt( + self, + self::fields::IfStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IfStmt( + self, + self::fields::IfStmtField::Test, + )); + as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IfStmt( + self, + self::fields::IfStmtField::Cons, + )); + as VisitWithAstPath>::visit_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::IfStmt( + self, + self::fields::IfStmtField::Alt, + )); + > as VisitWithAstPath>::visit_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Import { + #[doc = "Calls [VisitAstPath`::visit_import`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Import { span, phase } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Import( + self, + self::fields::ImportField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Import( + self, + self::fields::ImportField::Phase, + )); + >::visit_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_import_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportDecl( + self, + self::fields::ImportDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportDecl( + self, + self::fields::ImportDeclField::Specifiers(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + specifiers, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportDecl( + self, + self::fields::ImportDeclField::Src, + )); + as VisitWithAstPath>::visit_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportDecl( + self, + self::fields::ImportDeclField::With, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportDecl( + self, + self::fields::ImportDeclField::Phase, + )); + >::visit_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [VisitAstPath`::visit_import_default_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_default_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportDefaultSpecifier { span, local } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportDefaultSpecifier( + self, + self::fields::ImportDefaultSpecifierField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportDefaultSpecifier( + self, + self::fields::ImportDefaultSpecifierField::Local, + )); + >::visit_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [VisitAstPath`::visit_import_named_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_named_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportNamedSpecifier( + self, + self::fields::ImportNamedSpecifierField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportNamedSpecifier( + self, + self::fields::ImportNamedSpecifierField::Local, + )); + >::visit_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportNamedSpecifier( + self, + self::fields::ImportNamedSpecifierField::Imported, + )); + > as VisitWithAstPath>::visit_with_ast_path( + imported, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportPhase { + #[doc = "Calls [VisitAstPath`::visit_import_phase`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_phase(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportPhase::Evaluation => {} + ImportPhase::Source => {} + ImportPhase::Defer => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [VisitAstPath`::visit_import_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportSpecifier( + self, + self::fields::ImportSpecifierField::Named, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ImportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportSpecifier( + self, + self::fields::ImportSpecifierField::Default, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ImportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportSpecifier( + self, + self::fields::ImportSpecifierField::Namespace, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [VisitAstPath`::visit_import_star_as_specifier`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_star_as_specifier(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportStarAsSpecifier { span, local } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportStarAsSpecifier( + self, + self::fields::ImportStarAsSpecifierField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::ImportStarAsSpecifier( + self, + self::fields::ImportStarAsSpecifierField::Local, + )); + >::visit_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportWith<'a> { + #[doc = "Calls [VisitAstPath`::visit_import_with`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportWith { span, values } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportWith( + self, + self::fields::ImportWithField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportWith( + self, + self::fields::ImportWithField::Values(usize::MAX), + )); + as VisitWithAstPath>::visit_with_ast_path( + values, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ImportWithItem { + #[doc = "Calls [VisitAstPath`::visit_import_with_item`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_item(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ImportWithItem { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportWithItem( + self, + self::fields::ImportWithItemField::Key, + )); + >::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ImportWithItem( + self, + self::fields::ImportWithItemField::Value, + )); + >::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Invalid { + #[doc = "Calls [VisitAstPath`::visit_invalid`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_invalid(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Invalid { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Invalid( + self, + self::fields::InvalidField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXAttr<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_attr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXAttr { span, name, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttr( + self, + self::fields::JSXAttrField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttr( + self, + self::fields::JSXAttrField::Name, + )); + as VisitWithAstPath>::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttr( + self, + self::fields::JSXAttrField::Value, + )); + > as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_attr_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrName( + self, + self::fields::JSXAttrNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrName( + self, + self::fields::JSXAttrNameField::JsxnamespacedName, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_attr_or_spread`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spread(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrOrSpread( + self, + self::fields::JSXAttrOrSpreadField::Jsxattr, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrOrSpread( + self, + self::fields::JSXAttrOrSpreadField::SpreadElement, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_attr_value`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_value(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrValue( + self, + self::fields::JSXAttrValueField::Lit, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrValue( + self, + self::fields::JSXAttrValueField::JsxexprContainer, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrValue( + self, + self::fields::JSXAttrValueField::Jsxelement, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXAttrValue( + self, + self::fields::JSXAttrValueField::Jsxfragment, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_closing_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXClosingElement { span, name } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXClosingElement( + self, + self::fields::JSXClosingElementField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXClosingElement( + self, + self::fields::JSXClosingElementField::Name, + )); + as VisitWithAstPath>::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXClosingFragment { + #[doc = "Calls [VisitAstPath`::visit_jsx_closing_fragment`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_closing_fragment(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXClosingFragment { span } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXClosingFragment( + self, + self::fields::JSXClosingFragmentField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElement( + self, + self::fields::JSXElementField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElement( + self, + self::fields::JSXElementField::Opening, + )); + as VisitWithAstPath>::visit_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElement( + self, + self::fields::JSXElementField::Children(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + children, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElement( + self, + self::fields::JSXElementField::Closing, + )); + > as VisitWithAstPath>::visit_with_ast_path( + closing, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_element_child`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_child(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementChild( + self, + self::fields::JSXElementChildField::Jsxtext, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementChild( + self, + self::fields::JSXElementChildField::JsxexprContainer, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementChild( + self, + self::fields::JSXElementChildField::JsxspreadChild, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementChild( + self, + self::fields::JSXElementChildField::Jsxelement, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementChild( + self, + self::fields::JSXElementChildField::Jsxfragment, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXElementName<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_element_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXElementName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementName( + self, + self::fields::JSXElementNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementName( + self, + self::fields::JSXElementNameField::JsxmemberExpr, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXElementName( + self, + self::fields::JSXElementNameField::JsxnamespacedName, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXEmptyExpr { + #[doc = "Calls [VisitAstPath`::visit_jsx_empty_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_empty_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXEmptyExpr { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXEmptyExpr( + self, + self::fields::JSXEmptyExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXExpr( + self, + self::fields::JSXExprField::JsxemptyExpr, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXExpr( + self, + self::fields::JSXExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_expr_container`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_expr_container(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXExprContainer { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXExprContainer( + self, + self::fields::JSXExprContainerField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXExprContainer( + self, + self::fields::JSXExprContainerField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXFragment<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_fragment`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_fragment(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXFragment( + self, + self::fields::JSXFragmentField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXFragment( + self, + self::fields::JSXFragmentField::Opening, + )); + >::visit_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXFragment( + self, + self::fields::JSXFragmentField::Children(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + children, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXFragment( + self, + self::fields::JSXFragmentField::Closing, + )); + >::visit_with_ast_path( + closing, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_member_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_member_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXMemberExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXMemberExpr( + self, + self::fields::JSXMemberExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXMemberExpr( + self, + self::fields::JSXMemberExprField::Obj, + )); + as VisitWithAstPath>::visit_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXMemberExpr( + self, + self::fields::JSXMemberExprField::Prop, + )); + >::visit_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXNamespacedName { + #[doc = "Calls [VisitAstPath`::visit_jsx_namespaced_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_namespaced_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXNamespacedName { span, ns, name } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXNamespacedName( + self, + self::fields::JSXNamespacedNameField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXNamespacedName( + self, + self::fields::JSXNamespacedNameField::Ns, + )); + >::visit_with_ast_path( + ns, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXNamespacedName( + self, + self::fields::JSXNamespacedNameField::Name, + )); + >::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXObject<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_object`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_object(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXObject( + self, + self::fields::JSXObjectField::JsxmemberExpr, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXObject::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXObject( + self, + self::fields::JSXObjectField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_opening_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXOpeningElement( + self, + self::fields::JSXOpeningElementField::Name, + )); + as VisitWithAstPath>::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXOpeningElement( + self, + self::fields::JSXOpeningElementField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXOpeningElement( + self, + self::fields::JSXOpeningElementField::Attrs(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + attrs, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXOpeningElement( + self, + self::fields::JSXOpeningElementField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXOpeningFragment { + #[doc = "Calls [VisitAstPath`::visit_jsx_opening_fragment`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_opening_fragment(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXOpeningFragment { span } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::JSXOpeningFragment( + self, + self::fields::JSXOpeningFragmentField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [VisitAstPath`::visit_jsx_spread_child`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_spread_child(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXSpreadChild { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXSpreadChild( + self, + self::fields::JSXSpreadChildField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXSpreadChild( + self, + self::fields::JSXSpreadChildField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for JSXText { + #[doc = "Calls [VisitAstPath`::visit_jsx_text`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_text(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + JSXText { span, value, raw } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXText( + self, + self::fields::JSXTextField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXText( + self, + self::fields::JSXTextField::Value, + )); + >::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::JSXText( + self, + self::fields::JSXTextField::Raw, + )); + >::visit_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Key<'a> { + #[doc = "Calls [VisitAstPath`::visit_key`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Key::Private { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Key(self, self::fields::KeyField::Private)); + >::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Key::Public { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Key(self, self::fields::KeyField::Public)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_key_value_pat_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_pat_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + KeyValuePatProp { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::KeyValuePatProp( + self, + self::fields::KeyValuePatPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::KeyValuePatProp( + self, + self::fields::KeyValuePatPropField::Value, + )); + as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_key_value_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_key_value_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + KeyValueProp { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::KeyValueProp( + self, + self::fields::KeyValuePropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::KeyValueProp( + self, + self::fields::KeyValuePropField::Value, + )); + as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_labeled_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_labeled_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + LabeledStmt { span, label, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::LabeledStmt( + self, + self::fields::LabeledStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::LabeledStmt( + self, + self::fields::LabeledStmtField::Label, + )); + >::visit_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::LabeledStmt( + self, + self::fields::LabeledStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Lit<'a> { + #[doc = "Calls [VisitAstPath`::visit_lit`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_lit(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Lit::Str { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Str)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Bool { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Bool)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Null { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Null)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Num { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Num)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::BigInt { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::BigInt)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Regex { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Regex)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::JSXText { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Lit(self, self::fields::LitField::Jsxtext)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MemberExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_member_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MemberExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberExpr( + self, + self::fields::MemberExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberExpr( + self, + self::fields::MemberExprField::Obj, + )); + as VisitWithAstPath>::visit_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberExpr( + self, + self::fields::MemberExprField::Prop, + )); + as VisitWithAstPath>::visit_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MemberProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_member_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_member_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MemberProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberProp( + self, + self::fields::MemberPropField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + MemberProp::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberProp( + self, + self::fields::MemberPropField::PrivateName, + )); + >::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + MemberProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MemberProp( + self, + self::fields::MemberPropField::Computed, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MetaPropExpr { + #[doc = "Calls [VisitAstPath`::visit_meta_prop_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MetaPropExpr { span, kind } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MetaPropExpr( + self, + self::fields::MetaPropExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MetaPropExpr( + self, + self::fields::MetaPropExprField::Kind, + )); + >::visit_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MetaPropKind { + #[doc = "Calls [VisitAstPath`::visit_meta_prop_kind`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_meta_prop_kind(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MetaPropKind::NewTarget => {} + MetaPropKind::ImportMeta => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MethodKind { + #[doc = "Calls [VisitAstPath`::visit_method_kind`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_kind(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MethodKind::Method => {} + MethodKind::Getter => {} + MethodKind::Setter => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for MethodProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_method_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_method_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + MethodProp { key, function } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MethodProp( + self, + self::fields::MethodPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::MethodProp( + self, + self::fields::MethodPropField::Function, + )); + > as VisitWithAstPath>::visit_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Module<'a> { + #[doc = "Calls [VisitAstPath`::visit_module`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Module { + span, + body, + shebang, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Module( + self, + self::fields::ModuleField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Module( + self, + self::fields::ModuleField::Body(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Module( + self, + self::fields::ModuleField::Shebang, + )); + as VisitWithAstPath>::visit_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_module_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ModuleDecl::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::Import, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::ExportDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::ExportNamed, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::ExportDefaultDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::ExportDefaultExpr, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportAll { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::ExportAll, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::TsImportEquals, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::TsExportAssignment, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleDecl( + self, + self::fields::ModuleDeclField::TsNamespaceExport, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [VisitAstPath`::visit_module_export_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_export_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleExportName( + self, + self::fields::ModuleExportNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleExportName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleExportName( + self, + self::fields::ModuleExportNameField::Str, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ModuleItem<'a> { + #[doc = "Calls [VisitAstPath`::visit_module_item`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_item(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleItem( + self, + self::fields::ModuleItemField::ModuleDecl, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleItem::Stmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ModuleItem( + self, + self::fields::ModuleItemField::Stmt, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for NamedExport<'a> { + #[doc = "Calls [VisitAstPath`::visit_named_export`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_named_export(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NamedExport( + self, + self::fields::NamedExportField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NamedExport( + self, + self::fields::NamedExportField::Specifiers(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + specifiers, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NamedExport( + self, + self::fields::NamedExportField::Src, + )); + > as VisitWithAstPath>::visit_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NamedExport( + self, + self::fields::NamedExportField::With, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for NewExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_new_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_new_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NewExpr( + self, + self::fields::NewExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NewExpr( + self, + self::fields::NewExprField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NewExpr( + self, + self::fields::NewExprField::Callee, + )); + as VisitWithAstPath>::visit_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NewExpr( + self, + self::fields::NewExprField::Args(usize::MAX), + )); + >> as VisitWithAstPath>::visit_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::NewExpr( + self, + self::fields::NewExprField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Null { + #[doc = "Calls [VisitAstPath`::visit_null`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_null(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Null { span } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Null(self, self::fields::NullField::Span)); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Number { + #[doc = "Calls [VisitAstPath`::visit_number`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_number(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Number { span, value, raw } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Number( + self, + self::fields::NumberField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Number( + self, + self::fields::NumberField::Raw, + )); + as VisitWithAstPath>::visit_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ObjectLit<'a> { + #[doc = "Calls [VisitAstPath`::visit_object_lit`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_lit(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ObjectLit { span, props } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectLit( + self, + self::fields::ObjectLitField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectLit( + self, + self::fields::ObjectLitField::Props(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ObjectPat<'a> { + #[doc = "Calls [VisitAstPath`::visit_object_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPat( + self, + self::fields::ObjectPatField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPat( + self, + self::fields::ObjectPatField::Props(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPat( + self, + self::fields::ObjectPatField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_object_pat_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPatProp( + self, + self::fields::ObjectPatPropField::KeyValue, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ObjectPatProp::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPatProp( + self, + self::fields::ObjectPatPropField::Assign, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ObjectPatProp::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ObjectPatProp( + self, + self::fields::ObjectPatPropField::Rest, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for OptCall<'a> { + #[doc = "Calls [VisitAstPath`::visit_opt_call`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_call(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptCall( + self, + self::fields::OptCallField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptCall( + self, + self::fields::OptCallField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptCall( + self, + self::fields::OptCallField::Callee, + )); + as VisitWithAstPath>::visit_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptCall( + self, + self::fields::OptCallField::Args(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptCall( + self, + self::fields::OptCallField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for OptChainBase<'a> { + #[doc = "Calls [VisitAstPath`::visit_opt_chain_base`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_base(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + OptChainBase::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptChainBase( + self, + self::fields::OptChainBaseField::Member, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + OptChainBase::Call { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptChainBase( + self, + self::fields::OptChainBaseField::Call, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_opt_chain_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_chain_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + OptChainExpr { + span, + optional, + base, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptChainExpr( + self, + self::fields::OptChainExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::OptChainExpr( + self, + self::fields::OptChainExprField::Base, + )); + as VisitWithAstPath>::visit_with_ast_path( + base, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Param<'a> { + #[doc = "Calls [VisitAstPath`::visit_param`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Param { + span, + decorators, + pat, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Param( + self, + self::fields::ParamField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Param( + self, + self::fields::ParamField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Param(self, self::fields::ParamField::Pat)); + as VisitWithAstPath>::visit_with_ast_path( + pat, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_param_or_ts_param_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ParamOrTsParamProp( + self, + self::fields::ParamOrTsParamPropField::TsParamProp, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ParamOrTsParamProp( + self, + self::fields::ParamOrTsParamPropField::Param, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ParenExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_paren_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_paren_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ParenExpr { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ParenExpr( + self, + self::fields::ParenExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ParenExpr( + self, + self::fields::ParenExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Pat<'a> { + #[doc = "Calls [VisitAstPath`::visit_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Pat::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Ident)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Array)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Rest)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Object)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Assign)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Invalid)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Pat(self, self::fields::PatField::Expr)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [VisitAstPath`::visit_private_method`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_method(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateMethod( + self, + self::fields::PrivateMethodField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateMethod( + self, + self::fields::PrivateMethodField::Key, + )); + >::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateMethod( + self, + self::fields::PrivateMethodField::Function, + )); + > as VisitWithAstPath>::visit_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateMethod( + self, + self::fields::PrivateMethodField::Kind, + )); + >::visit_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateMethod( + self, + self::fields::PrivateMethodField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for PrivateName { + #[doc = "Calls [VisitAstPath`::visit_private_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + PrivateName { span, name } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateName( + self, + self::fields::PrivateNameField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateName( + self, + self::fields::PrivateNameField::Name, + )); + >::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for PrivateProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_private_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_private_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Key, + )); + >::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Value, + )); + > as VisitWithAstPath>::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PrivateProp( + self, + self::fields::PrivatePropField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Program<'a> { + #[doc = "Calls [VisitAstPath`::visit_program`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_program(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Program::Module { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Program( + self, + self::fields::ProgramField::Module, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Program::Script { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Program( + self, + self::fields::ProgramField::Script, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Prop<'a> { + #[doc = "Calls [VisitAstPath`::visit_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Prop::Shorthand { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::Shorthand, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::KeyValue { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::KeyValue, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::Assign, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Getter { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::Getter, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Setter { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::Setter, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Method { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Prop( + self, + self::fields::PropField::Method, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for PropName<'a> { + #[doc = "Calls [VisitAstPath`::visit_prop_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + PropName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropName( + self, + self::fields::PropNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropName( + self, + self::fields::PropNameField::Str, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Num { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropName( + self, + self::fields::PropNameField::Num, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropName( + self, + self::fields::PropNameField::Computed, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::BigInt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropName( + self, + self::fields::PropNameField::BigInt, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [VisitAstPath`::visit_prop_or_spread`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spread(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropOrSpread( + self, + self::fields::PropOrSpreadField::Spread, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropOrSpread::Prop { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::PropOrSpread( + self, + self::fields::PropOrSpreadField::Prop, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Regex { + #[doc = "Calls [VisitAstPath`::visit_regex`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_regex(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Regex { span, exp, flags } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Regex( + self, + self::fields::RegexField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Regex(self, self::fields::RegexField::Exp)); + >::visit_with_ast_path( + exp, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Regex( + self, + self::fields::RegexField::Flags, + )); + >::visit_with_ast_path( + flags, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for RestPat<'a> { + #[doc = "Calls [VisitAstPath`::visit_rest_pat`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_rest_pat(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::RestPat( + self, + self::fields::RestPatField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::RestPat( + self, + self::fields::RestPatField::Dot3Token, + )); + >::visit_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::RestPat( + self, + self::fields::RestPatField::Arg, + )); + as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::RestPat( + self, + self::fields::RestPatField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_return_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_return_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ReturnStmt { span, arg } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ReturnStmt( + self, + self::fields::ReturnStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ReturnStmt( + self, + self::fields::ReturnStmtField::Arg, + )); + > as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Script<'a> { + #[doc = "Calls [VisitAstPath`::visit_script`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_script(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Script { + span, + body, + shebang, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Script( + self, + self::fields::ScriptField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Script( + self, + self::fields::ScriptField::Body(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Script( + self, + self::fields::ScriptField::Shebang, + )); + as VisitWithAstPath>::visit_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SeqExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_seq_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_seq_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SeqExpr { span, exprs } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SeqExpr( + self, + self::fields::SeqExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SeqExpr( + self, + self::fields::SeqExprField::Exprs(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SetterProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_setter_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_setter_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SetterProp( + self, + self::fields::SetterPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SetterProp( + self, + self::fields::SetterPropField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SetterProp( + self, + self::fields::SetterPropField::ThisParam, + )); + > as VisitWithAstPath>::visit_with_ast_path( + this_param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SetterProp( + self, + self::fields::SetterPropField::Param, + )); + as VisitWithAstPath>::visit_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SetterProp( + self, + self::fields::SetterPropField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [VisitAstPath`::visit_simple_assign_target`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_simple_assign_target(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::Ident, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::Member, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::SuperProp, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::Paren, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::OptChain, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::TsAs, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::TsSatisfies, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::TsNonNull, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::TsTypeAssertion, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::TsInstantiation, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SimpleAssignTarget( + self, + self::fields::SimpleAssignTargetField::Invalid, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SpreadElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_spread_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_spread_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SpreadElement { dot3_token, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SpreadElement( + self, + self::fields::SpreadElementField::Dot3Token, + )); + >::visit_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SpreadElement( + self, + self::fields::SpreadElementField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for StaticBlock<'a> { + #[doc = "Calls [VisitAstPath`::visit_static_block`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_static_block(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + StaticBlock { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::StaticBlock( + self, + self::fields::StaticBlockField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::StaticBlock( + self, + self::fields::StaticBlockField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Stmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Stmt::Block { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Block)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Empty { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Empty)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Debugger { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::Debugger, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::With { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::With)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Return { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::Return, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Labeled { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::Labeled, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Break { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Break)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Continue { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::Continue, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::If { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::If)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Switch { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::Switch, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Throw { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Throw)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Try { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Try)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::While { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::While)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::DoWhile { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Stmt( + self, + self::fields::StmtField::DoWhile, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::For { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::For)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::ForIn { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::ForIn)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::ForOf { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::ForOf)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Decl { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Decl)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Stmt(self, self::fields::StmtField::Expr)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Str { + #[doc = "Calls [VisitAstPath`::visit_str`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_str(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Str { span, value, raw } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Str(self, self::fields::StrField::Span)); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Str(self, self::fields::StrField::Value)); + >::visit_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Str(self, self::fields::StrField::Raw)); + as VisitWithAstPath>::visit_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Super { + #[doc = "Calls [VisitAstPath`::visit_super`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Super { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Super( + self, + self::fields::SuperField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SuperProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_super_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SuperProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SuperProp( + self, + self::fields::SuperPropField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SuperProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SuperProp( + self, + self::fields::SuperPropField::Computed, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_super_prop_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_super_prop_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SuperPropExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SuperPropExpr( + self, + self::fields::SuperPropExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SuperPropExpr( + self, + self::fields::SuperPropExprField::Obj, + )); + >::visit_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SuperPropExpr( + self, + self::fields::SuperPropExprField::Prop, + )); + as VisitWithAstPath>::visit_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SwitchCase<'a> { + #[doc = "Calls [VisitAstPath`::visit_switch_case`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_case(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SwitchCase { span, test, cons } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchCase( + self, + self::fields::SwitchCaseField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchCase( + self, + self::fields::SwitchCaseField::Test, + )); + > as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchCase( + self, + self::fields::SwitchCaseField::Cons(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_switch_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchStmt( + self, + self::fields::SwitchStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchStmt( + self, + self::fields::SwitchStmtField::Discriminant, + )); + as VisitWithAstPath>::visit_with_ast_path( + discriminant, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::SwitchStmt( + self, + self::fields::SwitchStmtField::Cases(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + cases, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [VisitAstPath`::visit_tagged_tpl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tagged_tpl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TaggedTpl( + self, + self::fields::TaggedTplField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TaggedTpl( + self, + self::fields::TaggedTplField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TaggedTpl( + self, + self::fields::TaggedTplField::Tag, + )); + as VisitWithAstPath>::visit_with_ast_path( + tag, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TaggedTpl( + self, + self::fields::TaggedTplField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TaggedTpl( + self, + self::fields::TaggedTplField::Tpl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + tpl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ThisExpr { + #[doc = "Calls [VisitAstPath`::visit_this_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_this_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ThisExpr { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ThisExpr( + self, + self::fields::ThisExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_throw_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_throw_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + ThrowStmt { span, arg } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ThrowStmt( + self, + self::fields::ThrowStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::ThrowStmt( + self, + self::fields::ThrowStmtField::Arg, + )); + as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Tpl<'a> { + #[doc = "Calls [VisitAstPath`::visit_tpl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Tpl { + span, + exprs, + quasis, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::Tpl(self, self::fields::TplField::Span)); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Tpl( + self, + self::fields::TplField::Exprs(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::Tpl( + self, + self::fields::TplField::Quasis(usize::MAX), + )); + as VisitWithAstPath>::visit_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TplElement { + #[doc = "Calls [VisitAstPath`::visit_tpl_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TplElement( + self, + self::fields::TplElementField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TplElement( + self, + self::fields::TplElementField::Cooked, + )); + as VisitWithAstPath>::visit_with_ast_path( + cooked, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TplElement( + self, + self::fields::TplElementField::Raw, + )); + >::visit_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TruePlusMinus { + #[doc = "Calls [VisitAstPath`::visit_true_plus_minus`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_true_plus_minus(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TruePlusMinus::True => {} + TruePlusMinus::Plus => {} + TruePlusMinus::Minus => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TryStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_try_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_try_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TryStmt( + self, + self::fields::TryStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TryStmt( + self, + self::fields::TryStmtField::Block, + )); + as VisitWithAstPath>::visit_with_ast_path( + block, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TryStmt( + self, + self::fields::TryStmtField::Handler, + )); + > as VisitWithAstPath>::visit_with_ast_path( + handler, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TryStmt( + self, + self::fields::TryStmtField::Finalizer, + )); + > as VisitWithAstPath>::visit_with_ast_path( + finalizer, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsArrayType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_array_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_array_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsArrayType { span, elem_type } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsArrayType( + self, + self::fields::TsArrayTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsArrayType( + self, + self::fields::TsArrayTypeField::ElemType, + )); + as VisitWithAstPath>::visit_with_ast_path( + elem_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_as_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_as_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsAsExpr( + self, + self::fields::TsAsExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsAsExpr( + self, + self::fields::TsAsExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsAsExpr( + self, + self::fields::TsAsExprField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_call_signature_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_call_signature_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsCallSignatureDecl( + self, + self::fields::TsCallSignatureDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsCallSignatureDecl( + self, + self::fields::TsCallSignatureDeclField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsCallSignatureDecl( + self, + self::fields::TsCallSignatureDeclField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsCallSignatureDecl( + self, + self::fields::TsCallSignatureDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_conditional_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_conditional_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConditionalType( + self, + self::fields::TsConditionalTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConditionalType( + self, + self::fields::TsConditionalTypeField::CheckType, + )); + as VisitWithAstPath>::visit_with_ast_path( + check_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConditionalType( + self, + self::fields::TsConditionalTypeField::ExtendsType, + )); + as VisitWithAstPath>::visit_with_ast_path( + extends_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConditionalType( + self, + self::fields::TsConditionalTypeField::TrueType, + )); + as VisitWithAstPath>::visit_with_ast_path( + true_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConditionalType( + self, + self::fields::TsConditionalTypeField::FalseType, + )); + as VisitWithAstPath>::visit_with_ast_path( + false_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_const_assertion`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_const_assertion(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsConstAssertion { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsConstAssertion( + self, + self::fields::TsConstAssertionField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsConstAssertion( + self, + self::fields::TsConstAssertionField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsConstructSignatureDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_construct_signature_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_construct_signature_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructSignatureDecl( + self, + self::fields::TsConstructSignatureDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructSignatureDecl( + self, + self::fields::TsConstructSignatureDeclField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructSignatureDecl( + self, + self::fields::TsConstructSignatureDeclField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructSignatureDecl( + self, + self::fields::TsConstructSignatureDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_constructor_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_constructor_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructorType( + self, + self::fields::TsConstructorTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructorType( + self, + self::fields::TsConstructorTypeField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructorType( + self, + self::fields::TsConstructorTypeField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsConstructorType( + self, + self::fields::TsConstructorTypeField::TypeAnn, + )); + > as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsEntityName<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_entity_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_entity_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEntityName( + self, + self::fields::TsEntityNameField::TsQualifiedName, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsEntityName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEntityName( + self, + self::fields::TsEntityNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_enum_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumDecl( + self, + self::fields::TsEnumDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumDecl( + self, + self::fields::TsEnumDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumDecl( + self, + self::fields::TsEnumDeclField::Members(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_enum_member`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsEnumMember { span, id, init } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumMember( + self, + self::fields::TsEnumMemberField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumMember( + self, + self::fields::TsEnumMemberField::Id, + )); + as VisitWithAstPath>::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumMember( + self, + self::fields::TsEnumMemberField::Init, + )); + > as VisitWithAstPath>::visit_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_enum_member_id`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_member_id(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumMemberId( + self, + self::fields::TsEnumMemberIdField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsEnumMemberId::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsEnumMemberId( + self, + self::fields::TsEnumMemberIdField::Str, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_export_assignment`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_export_assignment(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsExportAssignment { span, expr } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExportAssignment( + self, + self::fields::TsExportAssignmentField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExportAssignment( + self, + self::fields::TsExportAssignmentField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_expr_with_type_args`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_args(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExprWithTypeArgs( + self, + self::fields::TsExprWithTypeArgsField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExprWithTypeArgs( + self, + self::fields::TsExprWithTypeArgsField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExprWithTypeArgs( + self, + self::fields::TsExprWithTypeArgsField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsExternalModuleRef { + #[doc = "Calls [VisitAstPath`::visit_ts_external_module_ref`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_external_module_ref(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsExternalModuleRef { span, expr } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExternalModuleRef( + self, + self::fields::TsExternalModuleRefField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsExternalModuleRef( + self, + self::fields::TsExternalModuleRefField::Expr, + )); + >::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_fn_or_constructor_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_or_constructor_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsFnOrConstructorType( + self, + self::fields::TsFnOrConstructorTypeField::TsFnType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsFnOrConstructorType( + self, + self::fields::TsFnOrConstructorTypeField::TsConstructorType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsFnParam<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_fn_param`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_param(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsFnParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnParam( + self, + self::fields::TsFnParamField::Ident, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnParam( + self, + self::fields::TsFnParamField::Array, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnParam( + self, + self::fields::TsFnParamField::Rest, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnParam( + self, + self::fields::TsFnParamField::Object, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsFnType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_fn_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnType( + self, + self::fields::TsFnTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnType( + self, + self::fields::TsFnTypeField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnType( + self, + self::fields::TsFnTypeField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsFnType( + self, + self::fields::TsFnTypeField::TypeAnn, + )); + > as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_getter_signature`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_getter_signature(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsGetterSignature( + self, + self::fields::TsGetterSignatureField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsGetterSignature( + self, + self::fields::TsGetterSignatureField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsGetterSignature( + self, + self::fields::TsGetterSignatureField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_import_equals_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_equals_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsImportEqualsDecl( + self, + self::fields::TsImportEqualsDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsImportEqualsDecl( + self, + self::fields::TsImportEqualsDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsImportEqualsDecl( + self, + self::fields::TsImportEqualsDeclField::ModuleRef, + )); + as VisitWithAstPath>::visit_with_ast_path( + module_ref, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsImportType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_import_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_import_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsImportType( + self, + self::fields::TsImportTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsImportType( + self, + self::fields::TsImportTypeField::Arg, + )); + >::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsImportType( + self, + self::fields::TsImportTypeField::Qualifier, + )); + > as VisitWithAstPath>::visit_with_ast_path( + qualifier, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsImportType( + self, + self::fields::TsImportTypeField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_index_signature`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_index_signature(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsIndexSignature( + self, + self::fields::TsIndexSignatureField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsIndexSignature( + self, + self::fields::TsIndexSignatureField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsIndexSignature( + self, + self::fields::TsIndexSignatureField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_indexed_access_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_indexed_access_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsIndexedAccessType( + self, + self::fields::TsIndexedAccessTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsIndexedAccessType( + self, + self::fields::TsIndexedAccessTypeField::ObjType, + )); + as VisitWithAstPath>::visit_with_ast_path( + obj_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsIndexedAccessType( + self, + self::fields::TsIndexedAccessTypeField::IndexType, + )); + as VisitWithAstPath>::visit_with_ast_path( + index_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsInferType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_infer_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_infer_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsInferType { span, type_param } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInferType( + self, + self::fields::TsInferTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInferType( + self, + self::fields::TsInferTypeField::TypeParam, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_instantiation`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_instantiation(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInstantiation( + self, + self::fields::TsInstantiationField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInstantiation( + self, + self::fields::TsInstantiationField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInstantiation( + self, + self::fields::TsInstantiationField::TypeArgs, + )); + < Box < 'a , TsTypeParamInstantiation < 'a > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_interface_body`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_body(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsInterfaceBody { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceBody( + self, + self::fields::TsInterfaceBodyField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceBody( + self, + self::fields::TsInterfaceBodyField::Body(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_interface_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_interface_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceDecl( + self, + self::fields::TsInterfaceDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceDecl( + self, + self::fields::TsInterfaceDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceDecl( + self, + self::fields::TsInterfaceDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceDecl( + self, + self::fields::TsInterfaceDeclField::Extends(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + extends, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsInterfaceDecl( + self, + self::fields::TsInterfaceDeclField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_intersection_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_intersection_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsIntersectionType { span, types } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsIntersectionType( + self, + self::fields::TsIntersectionTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsIntersectionType( + self, + self::fields::TsIntersectionTypeField::Types(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsKeywordType { + #[doc = "Calls [VisitAstPath`::visit_ts_keyword_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsKeywordType { span, kind } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsKeywordType( + self, + self::fields::TsKeywordTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsKeywordType( + self, + self::fields::TsKeywordTypeField::Kind, + )); + >::visit_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [VisitAstPath`::visit_ts_keyword_type_kind`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_keyword_type_kind(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsKeywordTypeKind::TsAnyKeyword => {} + TsKeywordTypeKind::TsUnknownKeyword => {} + TsKeywordTypeKind::TsNumberKeyword => {} + TsKeywordTypeKind::TsObjectKeyword => {} + TsKeywordTypeKind::TsBooleanKeyword => {} + TsKeywordTypeKind::TsBigIntKeyword => {} + TsKeywordTypeKind::TsStringKeyword => {} + TsKeywordTypeKind::TsSymbolKeyword => {} + TsKeywordTypeKind::TsVoidKeyword => {} + TsKeywordTypeKind::TsUndefinedKeyword => {} + TsKeywordTypeKind::TsNullKeyword => {} + TsKeywordTypeKind::TsNeverKeyword => {} + TsKeywordTypeKind::TsIntrinsicKeyword => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsLit<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_lit`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsLit::Number { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsLit( + self, + self::fields::TsLitField::Number, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::TsLit(self, self::fields::TsLitField::Str)); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Bool { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsLit( + self, + self::fields::TsLitField::Bool, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::BigInt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsLit( + self, + self::fields::TsLitField::BigInt, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Tpl { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentNodeRef::TsLit(self, self::fields::TsLitField::Tpl)); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsLitType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_lit_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_lit_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsLitType { span, lit } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsLitType( + self, + self::fields::TsLitTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsLitType( + self, + self::fields::TsLitTypeField::Lit, + )); + as VisitWithAstPath>::visit_with_ast_path( + lit, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsMappedType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_mapped_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_mapped_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::Readonly, + )); + as VisitWithAstPath>::visit_with_ast_path( + readonly, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::TypeParam, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::NameType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + name_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::Optional, + )); + as VisitWithAstPath>::visit_with_ast_path( + optional, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsMappedType( + self, + self::fields::TsMappedTypeField::TypeAnn, + )); + > as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_method_signature`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_method_signature(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsMethodSignature( + self, + self::fields::TsMethodSignatureField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsMethodSignature( + self, + self::fields::TsMethodSignatureField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsMethodSignature( + self, + self::fields::TsMethodSignatureField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsMethodSignature( + self, + self::fields::TsMethodSignatureField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsMethodSignature( + self, + self::fields::TsMethodSignatureField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_module_block`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_block(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsModuleBlock { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleBlock( + self, + self::fields::TsModuleBlockField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleBlock( + self, + self::fields::TsModuleBlockField::Body(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_module_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleDecl( + self, + self::fields::TsModuleDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleDecl( + self, + self::fields::TsModuleDeclField::Id, + )); + as VisitWithAstPath>::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleDecl( + self, + self::fields::TsModuleDeclField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsModuleName<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_module_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsModuleName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleName( + self, + self::fields::TsModuleNameField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsModuleName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleName( + self, + self::fields::TsModuleNameField::Str, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_module_ref`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_module_ref(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleRef( + self, + self::fields::TsModuleRefField::TsEntityName, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsModuleRef( + self, + self::fields::TsModuleRefField::TsExternalModuleRef, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_namespace_body`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_body(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNamespaceBody( + self, + self::fields::TsNamespaceBodyField::TsModuleBlock, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNamespaceBody( + self, + self::fields::TsNamespaceBodyField::TsNamespaceDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_namespace_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNamespaceDecl( + self, + self::fields::TsNamespaceDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNamespaceDecl( + self, + self::fields::TsNamespaceDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNamespaceDecl( + self, + self::fields::TsNamespaceDeclField::Body, + )); + > as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [VisitAstPath`::visit_ts_namespace_export_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_namespace_export_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsNamespaceExportDecl { span, id } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsNamespaceExportDecl( + self, + self::fields::TsNamespaceExportDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsNamespaceExportDecl( + self, + self::fields::TsNamespaceExportDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_non_null_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_non_null_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsNonNullExpr { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNonNullExpr( + self, + self::fields::TsNonNullExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsNonNullExpr( + self, + self::fields::TsNonNullExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_optional_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_optional_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsOptionalType { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsOptionalType( + self, + self::fields::TsOptionalTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsOptionalType( + self, + self::fields::TsOptionalTypeField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsParamProp<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_param_prop`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamProp( + self, + self::fields::TsParamPropField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamProp( + self, + self::fields::TsParamPropField::Decorators(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamProp( + self, + self::fields::TsParamPropField::Accessibility, + )); + as VisitWithAstPath>::visit_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamProp( + self, + self::fields::TsParamPropField::Param, + )); + as VisitWithAstPath>::visit_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_param_prop_param`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_param_prop_param(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamPropParam( + self, + self::fields::TsParamPropParamField::Ident, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsParamPropParam::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsParamPropParam( + self, + self::fields::TsParamPropParamField::Assign, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_parenthesized_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_parenthesized_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsParenthesizedType { span, type_ann } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsParenthesizedType( + self, + self::fields::TsParenthesizedTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsParenthesizedType( + self, + self::fields::TsParenthesizedTypeField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_property_signature`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_property_signature(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsPropertySignature( + self, + self::fields::TsPropertySignatureField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsPropertySignature( + self, + self::fields::TsPropertySignatureField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsPropertySignature( + self, + self::fields::TsPropertySignatureField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_qualified_name`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_qualified_name(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsQualifiedName { span, left, right } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsQualifiedName( + self, + self::fields::TsQualifiedNameField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsQualifiedName( + self, + self::fields::TsQualifiedNameField::Left, + )); + as VisitWithAstPath>::visit_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsQualifiedName( + self, + self::fields::TsQualifiedNameField::Right, + )); + >::visit_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsRestType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_rest_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_rest_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsRestType { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsRestType( + self, + self::fields::TsRestTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsRestType( + self, + self::fields::TsRestTypeField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_satisfies_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_satisfies_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsSatisfiesExpr( + self, + self::fields::TsSatisfiesExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsSatisfiesExpr( + self, + self::fields::TsSatisfiesExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsSatisfiesExpr( + self, + self::fields::TsSatisfiesExprField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_setter_signature`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_setter_signature(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsSetterSignature( + self, + self::fields::TsSetterSignatureField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsSetterSignature( + self, + self::fields::TsSetterSignatureField::Key, + )); + as VisitWithAstPath>::visit_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsSetterSignature( + self, + self::fields::TsSetterSignatureField::Param, + )); + as VisitWithAstPath>::visit_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsThisType { + #[doc = "Calls [VisitAstPath`::visit_ts_this_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsThisType { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsThisType( + self, + self::fields::TsThisTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_this_type_or_ident`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_this_type_or_ident(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsThisTypeOrIdent( + self, + self::fields::TsThisTypeOrIdentField::TsThisType, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsThisTypeOrIdent( + self, + self::fields::TsThisTypeOrIdentField::Ident, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_tpl_lit_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tpl_lit_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTplLitType( + self, + self::fields::TsTplLitTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTplLitType( + self, + self::fields::TsTplLitTypeField::Types(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTplLitType( + self, + self::fields::TsTplLitTypeField::Quasis(usize::MAX), + )); + as VisitWithAstPath>::visit_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_tuple_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTupleElement { span, label, ty } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTupleElement( + self, + self::fields::TsTupleElementField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTupleElement( + self, + self::fields::TsTupleElementField::Label, + )); + > as VisitWithAstPath>::visit_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTupleElement( + self, + self::fields::TsTupleElementField::Ty, + )); + as VisitWithAstPath>::visit_with_ast_path( + ty, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTupleType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_tuple_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTupleType { span, elem_types } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTupleType( + self, + self::fields::TsTupleTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTupleType( + self, + self::fields::TsTupleTypeField::ElemTypes(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + elem_types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsKeywordType, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsThisType, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsFnOrConstructorType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeRef { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTypeRef, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeQuery { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTypeQuery, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeLit { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTypeLit, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsArrayType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsArrayType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTupleType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTupleType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsOptionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsOptionalType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsRestType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsRestType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsUnionOrIntersectionType, + )); + < Box < 'a , TsUnionOrIntersectionType < 'a > > as VisitWithAstPath < V > > :: visit_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsType::TsConditionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsConditionalType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsInferType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsInferType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsParenthesizedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsParenthesizedType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeOperator { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTypeOperator, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsIndexedAccessType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsMappedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsMappedType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsLitType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsLitType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypePredicate { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsTypePredicate, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsImportType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsType( + self, + self::fields::TsTypeField::TsImportType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_alias_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_alias_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAliasDecl( + self, + self::fields::TsTypeAliasDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAliasDecl( + self, + self::fields::TsTypeAliasDeclField::Id, + )); + >::visit_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAliasDecl( + self, + self::fields::TsTypeAliasDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAliasDecl( + self, + self::fields::TsTypeAliasDeclField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_ann`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ann(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeAnn { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAnn( + self, + self::fields::TsTypeAnnField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAnn( + self, + self::fields::TsTypeAnnField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_assertion`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_assertion(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAssertion( + self, + self::fields::TsTypeAssertionField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAssertion( + self, + self::fields::TsTypeAssertionField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeAssertion( + self, + self::fields::TsTypeAssertionField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_element`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_element(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsCallSignatureDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsConstructSignatureDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsPropertySignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsGetterSignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsSetterSignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsMethodSignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeElement( + self, + self::fields::TsTypeElementField::TsIndexSignature, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_lit`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_lit(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeLit { span, members } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeLit( + self, + self::fields::TsTypeLitField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeLit( + self, + self::fields::TsTypeLitField::Members(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_operator`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeOperator { span, op, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeOperator( + self, + self::fields::TsTypeOperatorField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeOperator( + self, + self::fields::TsTypeOperatorField::Op, + )); + >::visit_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeOperator( + self, + self::fields::TsTypeOperatorField::TypeAnn, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [VisitAstPath`::visit_ts_type_operator_op`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_operator_op(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeOperatorOp::KeyOf => {} + TsTypeOperatorOp::Unique => {} + TsTypeOperatorOp::ReadOnly => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_param`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParam( + self, + self::fields::TsTypeParamField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParam( + self, + self::fields::TsTypeParamField::Name, + )); + >::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParam( + self, + self::fields::TsTypeParamField::Constraint, + )); + > as VisitWithAstPath>::visit_with_ast_path( + constraint, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParam( + self, + self::fields::TsTypeParamField::Default, + )); + > as VisitWithAstPath>::visit_with_ast_path( + default, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_param_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeParamDecl { span, params } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParamDecl( + self, + self::fields::TsTypeParamDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeParamDecl( + self, + self::fields::TsTypeParamDeclField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeParamInstantiation<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_param_instantiation`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_param_instantiation(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeParamInstantiation { span, params } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsTypeParamInstantiation( + self, + self::fields::TsTypeParamInstantiationField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsTypeParamInstantiation( + self, + self::fields::TsTypeParamInstantiationField::Params(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_predicate`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_predicate(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypePredicate( + self, + self::fields::TsTypePredicateField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypePredicate( + self, + self::fields::TsTypePredicateField::ParamName, + )); + as VisitWithAstPath>::visit_with_ast_path( + param_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypePredicate( + self, + self::fields::TsTypePredicateField::TypeAnn, + )); + >> as VisitWithAstPath>::visit_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_query`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeQuery( + self, + self::fields::TsTypeQueryField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeQuery( + self, + self::fields::TsTypeQueryField::ExprName, + )); + as VisitWithAstPath>::visit_with_ast_path( + expr_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeQuery( + self, + self::fields::TsTypeQueryField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_query_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_query_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeQueryExpr( + self, + self::fields::TsTypeQueryExprField::TsEntityName, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeQueryExpr( + self, + self::fields::TsTypeQueryExprField::Import, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_type_ref`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_ref(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeRef( + self, + self::fields::TsTypeRefField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeRef( + self, + self::fields::TsTypeRefField::TypeName, + )); + as VisitWithAstPath>::visit_with_ast_path( + type_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsTypeRef( + self, + self::fields::TsTypeRefField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitWithAstPath < V > > :: visit_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsUnionOrIntersectionType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_union_or_intersection_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_or_intersection_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsUnionOrIntersectionType( + self, + self::fields::TsUnionOrIntersectionTypeField::TsUnionType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentNodeRef::TsUnionOrIntersectionType( + self, + self::fields::TsUnionOrIntersectionTypeField::TsIntersectionType, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for TsUnionType<'a> { + #[doc = "Calls [VisitAstPath`::visit_ts_union_type`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_union_type(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + TsUnionType { span, types } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsUnionType( + self, + self::fields::TsUnionTypeField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::TsUnionType( + self, + self::fields::TsUnionTypeField::Types(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_unary_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + UnaryExpr { span, op, arg } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UnaryExpr( + self, + self::fields::UnaryExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UnaryExpr( + self, + self::fields::UnaryExprField::Op, + )); + >::visit_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UnaryExpr( + self, + self::fields::UnaryExprField::Arg, + )); + as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_update_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UpdateExpr( + self, + self::fields::UpdateExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UpdateExpr( + self, + self::fields::UpdateExprField::Op, + )); + >::visit_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UpdateExpr( + self, + self::fields::UpdateExprField::Arg, + )); + as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for UsingDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_using_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_using_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UsingDecl( + self, + self::fields::UsingDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::UsingDecl( + self, + self::fields::UsingDeclField::Decls(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for VarDecl<'a> { + #[doc = "Calls [VisitAstPath`::visit_var_decl`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDecl( + self, + self::fields::VarDeclField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDecl( + self, + self::fields::VarDeclField::Ctxt, + )); + >::visit_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDecl( + self, + self::fields::VarDeclField::Kind, + )); + >::visit_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDecl( + self, + self::fields::VarDeclField::Decls(usize::MAX), + )); + > as VisitWithAstPath>::visit_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for VarDeclKind { + #[doc = "Calls [VisitAstPath`::visit_var_decl_kind`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_kind(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + VarDeclKind::Var => {} + VarDeclKind::Let => {} + VarDeclKind::Const => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_var_decl_or_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_decl_or_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDeclOrExpr( + self, + self::fields::VarDeclOrExprField::VarDecl, + )); + > as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDeclOrExpr( + self, + self::fields::VarDeclOrExprField::Expr, + )); + as VisitWithAstPath>::visit_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [VisitAstPath`::visit_var_declarator`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarator(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDeclarator( + self, + self::fields::VarDeclaratorField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDeclarator( + self, + self::fields::VarDeclaratorField::Name, + )); + as VisitWithAstPath>::visit_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::VarDeclarator( + self, + self::fields::VarDeclaratorField::Init, + )); + > as VisitWithAstPath>::visit_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for WhileStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_while_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_while_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + WhileStmt { span, test, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WhileStmt( + self, + self::fields::WhileStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WhileStmt( + self, + self::fields::WhileStmtField::Test, + )); + as VisitWithAstPath>::visit_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WhileStmt( + self, + self::fields::WhileStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for WithStmt<'a> { + #[doc = "Calls [VisitAstPath`::visit_with_stmt`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_with_stmt(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + WithStmt { span, obj, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WithStmt( + self, + self::fields::WithStmtField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WithStmt( + self, + self::fields::WithStmtField::Obj, + )); + as VisitWithAstPath>::visit_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::WithStmt( + self, + self::fields::WithStmtField::Body, + )); + as VisitWithAstPath>::visit_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for YieldExpr<'a> { + #[doc = "Calls [VisitAstPath`::visit_yield_expr`] with `self`."] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_yield_expr(visitor, self, __ast_path) + } + + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::YieldExpr( + self, + self::fields::YieldExprField::Span, + )); + >::visit_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentNodeRef::YieldExpr( + self, + self::fields::YieldExprField::Arg, + )); + > as VisitWithAstPath>::visit_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for AssignOp { + #[doc = "Calls [VisitAstPath`::visit_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_assign_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for swc_atoms::Atom { + #[doc = "Calls [VisitAstPath`::visit_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_atom(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BigIntValue { + #[doc = "Calls [VisitAstPath`::visit_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_big_int_value(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for BinaryOp { + #[doc = "Calls [VisitAstPath`::visit_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_binary_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ClassMember<'a>] { + #[doc = "Calls [VisitAstPath`::visit_class_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_class_members(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Decorator<'a>] { + #[doc = "Calls [VisitAstPath`::visit_decorators`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_decorators(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ExportSpecifier<'a>] { + #[doc = "Calls [VisitAstPath`::visit_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_export_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ExprOrSpread<'a>] { + #[doc = "Calls [VisitAstPath`::visit_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Expr<'a>] { + #[doc = "Calls [VisitAstPath`::visit_exprs`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_exprs(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path(item, visitor, &mut *__ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ImportSpecifier<'a>] { + #[doc = "Calls [VisitAstPath`::visit_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ImportWithItem] { + #[doc = "Calls [VisitAstPath`::visit_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_import_with_items(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [JSXAttrOrSpread<'a>] { + #[doc = "Calls [VisitAstPath`::visit_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_attr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [JSXElementChild<'a>] { + #[doc = "Calls [VisitAstPath`::visit_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_jsx_element_childs(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ModuleItem<'a>] { + #[doc = "Calls [VisitAstPath`::visit_module_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_module_items(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ObjectPatProp<'a>] { + #[doc = "Calls [VisitAstPath`::visit_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_object_pat_props(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitAstPath`::visit_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_accessibility(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => >::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitAstPath`::visit_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_atom(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => >::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_block_stmt(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_catch_clause(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + as VisitWithAstPath>::visit_with_ast_path(inner, visitor, __ast_path) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spread(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitAstPath`::visit_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => > as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitAstPath`::visit_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ident(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + >::visit_with_ast_path(inner, visitor, __ast_path) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_attr_value(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_jsx_closing_element(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_module_export_name(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option>> { + #[doc = "Calls [VisitAstPath`::visit_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_object_lit(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => > as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_pat(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + as VisitWithAstPath>::visit_with_ast_path(inner, visitor, __ast_path) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitAstPath`::visit_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_span(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => >::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_stmt(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + as VisitWithAstPath>::visit_with_ast_path(inner, visitor, __ast_path) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_str(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitAstPath`::visit_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_true_plus_minus(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => >::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_entity_name(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_namespace_body(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + as VisitWithAstPath>::visit_with_ast_path(inner, visitor, __ast_path) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option>> { + #[doc = "Calls [VisitAstPath`::visit_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_ann(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => > as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitAstPath`::visit_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_decl(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + > as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitAstPath`::visit_opt_ts_type_param_instantiation`] with `self`. (Extra \ + impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_ts_type_param_instantiation(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => { + > as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitAstPath`::visit_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_var_decl_or_expr(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + match self { + Some(inner) => as VisitWithAstPath>::visit_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Option>] { + #[doc = "Calls [VisitAstPath`::visit_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Option>] { + #[doc = "Calls [VisitAstPath`::visit_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_opt_vec_pats(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [ParamOrTsParamProp<'a>] { + #[doc = "Calls [VisitAstPath`::visit_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_param_or_ts_param_props(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Param<'a>] { + #[doc = "Calls [VisitAstPath`::visit_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path(item, visitor, &mut *__ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Pat<'a>] { + #[doc = "Calls [VisitAstPath`::visit_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_pats(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path(item, visitor, &mut *__ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [PropOrSpread<'a>] { + #[doc = "Calls [VisitAstPath`::visit_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_prop_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for swc_common::Span { + #[doc = "Calls [VisitAstPath`::visit_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_span(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [Stmt<'a>] { + #[doc = "Calls [VisitAstPath`::visit_stmts`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_stmts(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path(item, visitor, &mut *__ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [SwitchCase<'a>] { + #[doc = "Calls [VisitAstPath`::visit_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_switch_cases(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [VisitAstPath`::visit_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_syntax_context(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TplElement] { + #[doc = "Calls [VisitAstPath`::visit_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_tpl_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsEnumMember<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_enum_members(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsExprWithTypeArgs<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_expr_with_type_argss(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsFnParam<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_fn_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsTupleElement<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_tuple_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsTypeElement<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsTypeParam<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_type_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [TsType<'a>] { + #[doc = "Calls [VisitAstPath`::visit_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_ts_types(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for UnaryOp { + #[doc = "Calls [VisitAstPath`::visit_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_unary_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for UpdateOp { + #[doc = "Calls [VisitAstPath`::visit_update_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_update_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitAstPath<'a>> VisitWithAstPath<'a, V> for [VarDeclarator<'a>] { + #[doc = "Calls [VisitAstPath`::visit_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + ::visit_var_declarators(visitor, self, __ast_path) + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitWithAstPath>::visit_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V, T> VisitWithAstPath<'a, V> for Box<'a, T> +where + V: ?Sized + VisitAstPath<'a>, + T: VisitWithAstPath<'a, V>, +{ + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + let v = >::visit_with_ast_path(&**self, visitor, __ast_path); + v + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + let v = + >::visit_children_with_ast_path(&**self, visitor, __ast_path); + v + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V, T> VisitWithAstPath<'a, V> for Vec<'a, T> +where + V: ?Sized + VisitAstPath<'a>, + [T]: VisitWithAstPath<'a, V>, +{ + #[inline] + fn visit_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + let v = <[T] as VisitWithAstPath>::visit_with_ast_path(self, visitor, __ast_path); + v + } + + #[inline] + fn visit_children_with_ast_path<'ast: 'r, 'r>( + &'ast self, + visitor: &mut V, + __ast_path: &mut AstNodePath<'r>, + ) { + let v = + <[T] as VisitWithAstPath>::visit_children_with_ast_path(self, visitor, __ast_path); + v + } +} +#[doc = r" A visitor trait for traversing the AST."] +pub trait VisitMut<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_assign_pat_prop(&mut self, node: &mut AssignPatProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_assign_target(&mut self, node: &mut AssignTarget<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_assign_target_pat(&mut self, node: &mut AssignTargetPat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_auto_accessor(&mut self, node: &mut AutoAccessor<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_binding_ident(&mut self, node: &mut BindingIdent<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_block_stmt_or_expr(&mut self, node: &mut BlockStmtOrExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_class_members(&mut self, node: &mut Vec<'a, ClassMember<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_computed_prop_name(&mut self, node: &mut ComputedPropName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_decorators(&mut self, node: &mut Vec<'a, Decorator<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_do_while_stmt(&mut self, node: &mut DoWhileStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_export_default_decl(&mut self, node: &mut ExportDefaultDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_export_default_expr(&mut self, node: &mut ExportDefaultExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_export_default_specifier(&mut self, node: &mut ExportDefaultSpecifier) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_export_named_specifier(&mut self, node: &mut ExportNamedSpecifier<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_namespace_specifier(&mut self, node: &mut ExportNamespaceSpecifier<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_export_specifier(&mut self, node: &mut ExportSpecifier<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > >::visit_mut_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_specifiers(&mut self, node: &mut Vec<'a, ExportSpecifier<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_expr_or_spread(&mut self, node: &mut ExprOrSpread<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_expr_or_spreads(&mut self, node: &mut Vec<'a, ExprOrSpread<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_import(&mut self, node: &mut Import) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_import_default_specifier(&mut self, node: &mut ImportDefaultSpecifier) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_import_named_specifier(&mut self, node: &mut ImportNamedSpecifier<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_import_specifier(&mut self, node: &mut ImportSpecifier<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > >::visit_mut_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_import_specifiers(&mut self, node: &mut Vec<'a, ImportSpecifier<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_import_star_as_specifier(&mut self, node: &mut ImportStarAsSpecifier) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_import_with_item(&mut self, node: &mut ImportWithItem) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_import_with_items(&mut self, node: &mut Vec<'a, ImportWithItem>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_attr_name(&mut self, node: &mut JSXAttrName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_attr_or_spread(&mut self, node: &mut JSXAttrOrSpread<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > >::visit_mut_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_attr_or_spreads(&mut self, node: &mut Vec<'a, JSXAttrOrSpread<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_attr_value(&mut self, node: &mut JSXAttrValue<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_closing_element(&mut self, node: &mut JSXClosingElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_closing_fragment(&mut self, node: &mut JSXClosingFragment) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_element_child(&mut self, node: &mut JSXElementChild<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > >::visit_mut_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_element_childs(&mut self, node: &mut Vec<'a, JSXElementChild<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_element_name(&mut self, node: &mut JSXElementName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_expr_container(&mut self, node: &mut JSXExprContainer<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_member_expr(&mut self, node: &mut JSXMemberExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_namespaced_name(&mut self, node: &mut JSXNamespacedName) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_opening_fragment(&mut self, node: &mut JSXOpeningFragment) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_spread_child(&mut self, node: &mut JSXSpreadChild<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_key_value_pat_prop(&mut self, node: &mut KeyValuePatProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_key_value_prop(&mut self, node: &mut KeyValueProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_module_export_name(&mut self, node: &mut ModuleExportName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_module_items(&mut self, node: &mut Vec<'a, ModuleItem<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_null(&mut self, node: &mut Null) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_number(&mut self, node: &mut Number) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_object_pat_prop(&mut self, node: &mut ObjectPatProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_object_pat_props(&mut self, node: &mut Vec<'a, ObjectPatProp<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_opt_accessibility(&mut self, node: &mut Option) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::visit_mut_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_atom(&mut self, node: &mut Option) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_opt_block_stmt(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_catch_clause(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_opt_chain_base(&mut self, node: &mut OptChainBase<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_opt_chain_expr(&mut self, node: &mut OptChainExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_expr_or_spread(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_expr_or_spreads(&mut self, node: &mut Option>>) { + >> as VisitMutWith>::visit_mut_children_with( + node, self, + ) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_jsx_attr_value(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > >::visit_mut_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_jsx_closing_element(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_module_export_name(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > >::visit_mut_children_with`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_object_lit(&mut self, node: &mut Option>>) { + >> as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_span(&mut self, node: &mut Option) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_opt_true_plus_minus(&mut self, node: &mut Option) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_entity_name(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_namespace_body(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_opt_ts_type(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > >::visit_mut_children_with`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_type_ann(&mut self, node: &mut Option>>) { + >> as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + ) { + >> as VisitMutWith>::visit_mut_children_with( + node, self, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + ) { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < Self > > :: visit_mut_children_with (node , self) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_var_decl_or_expr(&mut self, node: &mut Option>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_vec_expr_or_spreads(&mut self, node: &mut Vec<'a, Option>>) { + >> as VisitMutWith>::visit_mut_children_with( + node, self, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_vec_pats(&mut self, node: &mut Vec<'a, Option>>) { + >> as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_param_or_ts_param_prop(&mut self, node: &mut ParamOrTsParamProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > >::visit_mut_children_with`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_param_or_ts_param_props(&mut self, node: &mut Vec<'a, ParamOrTsParamProp<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_private_method(&mut self, node: &mut PrivateMethod<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_prop_or_spread(&mut self, node: &mut PropOrSpread<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_prop_or_spreads(&mut self, node: &mut Vec<'a, PropOrSpread<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_simple_assign_target(&mut self, node: &mut SimpleAssignTarget<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_spread_element(&mut self, node: &mut SpreadElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_str(&mut self, node: &mut Str) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_super(&mut self, node: &mut Super) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_super_prop_expr(&mut self, node: &mut SuperPropExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_switch_cases(&mut self, node: &mut Vec<'a, SwitchCase<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_syntax_context(&mut self, node: &mut swc_common::SyntaxContext) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_tpl_elements(&mut self, node: &mut Vec<'a, TplElement>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_true_plus_minus(&mut self, node: &mut TruePlusMinus) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_array_type(&mut self, node: &mut TsArrayType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_call_signature_decl(&mut self, node: &mut TsCallSignatureDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_conditional_type(&mut self, node: &mut TsConditionalType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_const_assertion(&mut self, node: &mut TsConstAssertion<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_construct_signature_decl(&mut self, node: &mut TsConstructSignatureDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_constructor_type(&mut self, node: &mut TsConstructorType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_entity_name(&mut self, node: &mut TsEntityName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_enum_member(&mut self, node: &mut TsEnumMember<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_enum_member_id(&mut self, node: &mut TsEnumMemberId<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_enum_members(&mut self, node: &mut Vec<'a, TsEnumMember<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_export_assignment(&mut self, node: &mut TsExportAssignment<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_expr_with_type_args(&mut self, node: &mut TsExprWithTypeArgs<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > >::visit_mut_children_with`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_expr_with_type_argss(&mut self, node: &mut Vec<'a, TsExprWithTypeArgs<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_external_module_ref(&mut self, node: &mut TsExternalModuleRef) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::visit_mut_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_fn_or_constructor_type(&mut self, node: &mut TsFnOrConstructorType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_fn_params(&mut self, node: &mut Vec<'a, TsFnParam<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_getter_signature(&mut self, node: &mut TsGetterSignature<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_import_equals_decl(&mut self, node: &mut TsImportEqualsDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_import_type(&mut self, node: &mut TsImportType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_index_signature(&mut self, node: &mut TsIndexSignature<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_indexed_access_type(&mut self, node: &mut TsIndexedAccessType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_infer_type(&mut self, node: &mut TsInferType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_instantiation(&mut self, node: &mut TsInstantiation<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_interface_body(&mut self, node: &mut TsInterfaceBody<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_interface_decl(&mut self, node: &mut TsInterfaceDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_intersection_type(&mut self, node: &mut TsIntersectionType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::visit_mut_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_keyword_type(&mut self, node: &mut TsKeywordType) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_keyword_type_kind(&mut self, node: &mut TsKeywordTypeKind) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_mapped_type(&mut self, node: &mut TsMappedType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_method_signature(&mut self, node: &mut TsMethodSignature<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_module_block(&mut self, node: &mut TsModuleBlock<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_module_decl(&mut self, node: &mut TsModuleDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_module_name(&mut self, node: &mut TsModuleName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_module_ref(&mut self, node: &mut TsModuleRef<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_namespace_body(&mut self, node: &mut TsNamespaceBody<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_namespace_decl(&mut self, node: &mut TsNamespaceDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_namespace_export_decl(&mut self, node: &mut TsNamespaceExportDecl) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_non_null_expr(&mut self, node: &mut TsNonNullExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_optional_type(&mut self, node: &mut TsOptionalType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_param_prop(&mut self, node: &mut TsParamProp<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_param_prop_param(&mut self, node: &mut TsParamPropParam<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_parenthesized_type(&mut self, node: &mut TsParenthesizedType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_property_signature(&mut self, node: &mut TsPropertySignature<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_qualified_name(&mut self, node: &mut TsQualifiedName<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_satisfies_expr(&mut self, node: &mut TsSatisfiesExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_setter_signature(&mut self, node: &mut TsSetterSignature<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_this_type_or_ident(&mut self, node: &mut TsThisTypeOrIdent<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_tpl_lit_type(&mut self, node: &mut TsTplLitType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_tuple_element(&mut self, node: &mut TsTupleElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_tuple_elements(&mut self, node: &mut Vec<'a, TsTupleElement<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_tuple_type(&mut self, node: &mut TsTupleType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_alias_decl(&mut self, node: &mut TsTypeAliasDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_assertion(&mut self, node: &mut TsTypeAssertion<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_element(&mut self, node: &mut TsTypeElement<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_elements(&mut self, node: &mut Vec<'a, TsTypeElement<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_operator(&mut self, node: &mut TsTypeOperator<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_type_operator_op(&mut self, node: &mut TsTypeOperatorOp) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_type_param(&mut self, node: &mut TsTypeParam<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_param_decl(&mut self, node: &mut TsTypeParamDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_param_instantiation(&mut self, node: &mut TsTypeParamInstantiation<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_params(&mut self, node: &mut Vec<'a, TsTypeParam<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_predicate(&mut self, node: &mut TsTypePredicate<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_type_query(&mut self, node: &mut TsTypeQuery<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_type_query_expr(&mut self, node: &mut TsTypeQueryExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::visit_mut_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + ) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_union_type(&mut self, node: &mut TsUnionType<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind) { + >::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_var_decl_or_expr(&mut self, node: &mut VarDeclOrExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::visit_mut_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_var_declarator(&mut self, node: &mut VarDeclarator<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::visit_mut_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_var_declarators(&mut self, node: &mut Vec<'a, VarDeclarator<'a>>) { + > as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::visit_mut_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>) { + as VisitMutWith>::visit_mut_children_with(node, self) + } +} +impl<'a, V> VisitMut<'a> for &mut V +where + V: ?Sized + VisitMut<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility) { + ::visit_mut_accessibility(&mut **self, node) + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>) { + ::visit_mut_array_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>) { + ::visit_mut_array_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>) { + ::visit_mut_arrow_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>) { + ::visit_mut_assign_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp) { + ::visit_mut_assign_op(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>) { + ::visit_mut_assign_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_pat_prop(&mut self, node: &mut AssignPatProp<'a>) { + ::visit_mut_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>) { + ::visit_mut_assign_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_target(&mut self, node: &mut AssignTarget<'a>) { + ::visit_mut_assign_target(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_target_pat(&mut self, node: &mut AssignTargetPat<'a>) { + ::visit_mut_assign_target_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom) { + ::visit_mut_atom(&mut **self, node) + } + + #[inline] + fn visit_mut_auto_accessor(&mut self, node: &mut AutoAccessor<'a>) { + ::visit_mut_auto_accessor(&mut **self, node) + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>) { + ::visit_mut_await_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>) { + ::visit_mut_big_int(&mut **self, node) + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue) { + ::visit_mut_big_int_value(&mut **self, node) + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>) { + ::visit_mut_bin_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp) { + ::visit_mut_binary_op(&mut **self, node) + } + + #[inline] + fn visit_mut_binding_ident(&mut self, node: &mut BindingIdent<'a>) { + ::visit_mut_binding_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>) { + ::visit_mut_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_block_stmt_or_expr(&mut self, node: &mut BlockStmtOrExpr<'a>) { + ::visit_mut_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool) { + ::visit_mut_bool(&mut **self, node) + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt) { + ::visit_mut_break_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>) { + ::visit_mut_call_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>) { + ::visit_mut_callee(&mut **self, node) + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>) { + ::visit_mut_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>) { + ::visit_mut_class(&mut **self, node) + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>) { + ::visit_mut_class_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>) { + ::visit_mut_class_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>) { + ::visit_mut_class_member(&mut **self, node) + } + + #[inline] + fn visit_mut_class_members(&mut self, node: &mut Vec<'a, ClassMember<'a>>) { + ::visit_mut_class_members(&mut **self, node) + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>) { + ::visit_mut_class_method(&mut **self, node) + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>) { + ::visit_mut_class_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_computed_prop_name(&mut self, node: &mut ComputedPropName<'a>) { + ::visit_mut_computed_prop_name(&mut **self, node) + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>) { + ::visit_mut_cond_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>) { + ::visit_mut_constructor(&mut **self, node) + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt) { + ::visit_mut_continue_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt) { + ::visit_mut_debugger_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>) { + ::visit_mut_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>) { + ::visit_mut_decorator(&mut **self, node) + } + + #[inline] + fn visit_mut_decorators(&mut self, node: &mut Vec<'a, Decorator<'a>>) { + ::visit_mut_decorators(&mut **self, node) + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>) { + ::visit_mut_default_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_do_while_stmt(&mut self, node: &mut DoWhileStmt<'a>) { + ::visit_mut_do_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt) { + ::visit_mut_empty_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>) { + ::visit_mut_export_all(&mut **self, node) + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>) { + ::visit_mut_export_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_decl(&mut self, node: &mut ExportDefaultDecl<'a>) { + ::visit_mut_export_default_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_expr(&mut self, node: &mut ExportDefaultExpr<'a>) { + ::visit_mut_export_default_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_specifier(&mut self, node: &mut ExportDefaultSpecifier) { + ::visit_mut_export_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_named_specifier(&mut self, node: &mut ExportNamedSpecifier<'a>) { + ::visit_mut_export_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_namespace_specifier(&mut self, node: &mut ExportNamespaceSpecifier<'a>) { + ::visit_mut_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_specifier(&mut self, node: &mut ExportSpecifier<'a>) { + ::visit_mut_export_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_specifiers(&mut self, node: &mut Vec<'a, ExportSpecifier<'a>>) { + ::visit_mut_export_specifiers(&mut **self, node) + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>) { + ::visit_mut_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_or_spread(&mut self, node: &mut ExprOrSpread<'a>) { + ::visit_mut_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_or_spreads(&mut self, node: &mut Vec<'a, ExprOrSpread<'a>>) { + ::visit_mut_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>) { + ::visit_mut_expr_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>) { + ::visit_mut_exprs(&mut **self, node) + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>) { + ::visit_mut_fn_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>) { + ::visit_mut_fn_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>) { + ::visit_mut_for_head(&mut **self, node) + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>) { + ::visit_mut_for_in_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>) { + ::visit_mut_for_of_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>) { + ::visit_mut_for_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>) { + ::visit_mut_function(&mut **self, node) + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>) { + ::visit_mut_getter_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident) { + ::visit_mut_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName) { + ::visit_mut_ident_name(&mut **self, node) + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>) { + ::visit_mut_if_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import) { + ::visit_mut_import(&mut **self, node) + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>) { + ::visit_mut_import_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_import_default_specifier(&mut self, node: &mut ImportDefaultSpecifier) { + ::visit_mut_import_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_named_specifier(&mut self, node: &mut ImportNamedSpecifier<'a>) { + ::visit_mut_import_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase) { + ::visit_mut_import_phase(&mut **self, node) + } + + #[inline] + fn visit_mut_import_specifier(&mut self, node: &mut ImportSpecifier<'a>) { + ::visit_mut_import_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_specifiers(&mut self, node: &mut Vec<'a, ImportSpecifier<'a>>) { + ::visit_mut_import_specifiers(&mut **self, node) + } + + #[inline] + fn visit_mut_import_star_as_specifier(&mut self, node: &mut ImportStarAsSpecifier) { + ::visit_mut_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>) { + ::visit_mut_import_with(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with_item(&mut self, node: &mut ImportWithItem) { + ::visit_mut_import_with_item(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with_items(&mut self, node: &mut Vec<'a, ImportWithItem>) { + ::visit_mut_import_with_items(&mut **self, node) + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid) { + ::visit_mut_invalid(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>) { + ::visit_mut_jsx_attr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_name(&mut self, node: &mut JSXAttrName<'a>) { + ::visit_mut_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_or_spread(&mut self, node: &mut JSXAttrOrSpread<'a>) { + ::visit_mut_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads(&mut self, node: &mut Vec<'a, JSXAttrOrSpread<'a>>) { + ::visit_mut_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_value(&mut self, node: &mut JSXAttrValue<'a>) { + ::visit_mut_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_closing_element(&mut self, node: &mut JSXClosingElement<'a>) { + ::visit_mut_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_closing_fragment(&mut self, node: &mut JSXClosingFragment) { + ::visit_mut_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>) { + ::visit_mut_jsx_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_child(&mut self, node: &mut JSXElementChild<'a>) { + ::visit_mut_jsx_element_child(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_childs(&mut self, node: &mut Vec<'a, JSXElementChild<'a>>) { + ::visit_mut_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_name(&mut self, node: &mut JSXElementName<'a>) { + ::visit_mut_jsx_element_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr) { + ::visit_mut_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>) { + ::visit_mut_jsx_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_expr_container(&mut self, node: &mut JSXExprContainer<'a>) { + ::visit_mut_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>) { + ::visit_mut_jsx_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_member_expr(&mut self, node: &mut JSXMemberExpr<'a>) { + ::visit_mut_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_namespaced_name(&mut self, node: &mut JSXNamespacedName) { + ::visit_mut_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>) { + ::visit_mut_jsx_object(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement<'a>) { + ::visit_mut_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_opening_fragment(&mut self, node: &mut JSXOpeningFragment) { + ::visit_mut_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_spread_child(&mut self, node: &mut JSXSpreadChild<'a>) { + ::visit_mut_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText) { + ::visit_mut_jsx_text(&mut **self, node) + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>) { + ::visit_mut_key(&mut **self, node) + } + + #[inline] + fn visit_mut_key_value_pat_prop(&mut self, node: &mut KeyValuePatProp<'a>) { + ::visit_mut_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_key_value_prop(&mut self, node: &mut KeyValueProp<'a>) { + ::visit_mut_key_value_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>) { + ::visit_mut_labeled_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>) { + ::visit_mut_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>) { + ::visit_mut_member_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>) { + ::visit_mut_member_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr) { + ::visit_mut_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind) { + ::visit_mut_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind) { + ::visit_mut_method_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>) { + ::visit_mut_method_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + ::visit_mut_module(&mut **self, node) + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>) { + ::visit_mut_module_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_module_export_name(&mut self, node: &mut ModuleExportName<'a>) { + ::visit_mut_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>) { + ::visit_mut_module_item(&mut **self, node) + } + + #[inline] + fn visit_mut_module_items(&mut self, node: &mut Vec<'a, ModuleItem<'a>>) { + ::visit_mut_module_items(&mut **self, node) + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>) { + ::visit_mut_named_export(&mut **self, node) + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>) { + ::visit_mut_new_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null) { + ::visit_mut_null(&mut **self, node) + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number) { + ::visit_mut_number(&mut **self, node) + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>) { + ::visit_mut_object_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>) { + ::visit_mut_object_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat_prop(&mut self, node: &mut ObjectPatProp<'a>) { + ::visit_mut_object_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat_props(&mut self, node: &mut Vec<'a, ObjectPatProp<'a>>) { + ::visit_mut_object_pat_props(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_accessibility(&mut self, node: &mut Option) { + ::visit_mut_opt_accessibility(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_atom(&mut self, node: &mut Option) { + ::visit_mut_opt_atom(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_block_stmt(&mut self, node: &mut Option>) { + ::visit_mut_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>) { + ::visit_mut_opt_call(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_catch_clause(&mut self, node: &mut Option>) { + ::visit_mut_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_chain_base(&mut self, node: &mut OptChainBase<'a>) { + ::visit_mut_opt_chain_base(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_chain_expr(&mut self, node: &mut OptChainExpr<'a>) { + ::visit_mut_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>) { + ::visit_mut_opt_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr_or_spread(&mut self, node: &mut Option>) { + ::visit_mut_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr_or_spreads(&mut self, node: &mut Option>>) { + ::visit_mut_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option) { + ::visit_mut_opt_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_jsx_attr_value(&mut self, node: &mut Option>) { + ::visit_mut_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_jsx_closing_element(&mut self, node: &mut Option>) { + ::visit_mut_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_module_export_name(&mut self, node: &mut Option>) { + ::visit_mut_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_object_lit(&mut self, node: &mut Option>>) { + ::visit_mut_opt_object_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>) { + ::visit_mut_opt_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_span(&mut self, node: &mut Option) { + ::visit_mut_opt_span(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>) { + ::visit_mut_opt_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>) { + ::visit_mut_opt_str(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_true_plus_minus(&mut self, node: &mut Option) { + ::visit_mut_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_entity_name(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_namespace_body(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_type(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_ann(&mut self, node: &mut Option>>) { + ::visit_mut_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + ) { + ::visit_mut_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + ) { + ::visit_mut_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr(&mut self, node: &mut Option>) { + ::visit_mut_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads(&mut self, node: &mut Vec<'a, Option>>) { + ::visit_mut_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_vec_pats(&mut self, node: &mut Vec<'a, Option>>) { + ::visit_mut_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>) { + ::visit_mut_param(&mut **self, node) + } + + #[inline] + fn visit_mut_param_or_ts_param_prop(&mut self, node: &mut ParamOrTsParamProp<'a>) { + ::visit_mut_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_param_or_ts_param_props(&mut self, node: &mut Vec<'a, ParamOrTsParamProp<'a>>) { + ::visit_mut_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>) { + ::visit_mut_params(&mut **self, node) + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>) { + ::visit_mut_paren_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>) { + ::visit_mut_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>) { + ::visit_mut_pats(&mut **self, node) + } + + #[inline] + fn visit_mut_private_method(&mut self, node: &mut PrivateMethod<'a>) { + ::visit_mut_private_method(&mut **self, node) + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName) { + ::visit_mut_private_name(&mut **self, node) + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>) { + ::visit_mut_private_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + ::visit_mut_program(&mut **self, node) + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>) { + ::visit_mut_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>) { + ::visit_mut_prop_name(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_or_spread(&mut self, node: &mut PropOrSpread<'a>) { + ::visit_mut_prop_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_or_spreads(&mut self, node: &mut Vec<'a, PropOrSpread<'a>>) { + ::visit_mut_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex) { + ::visit_mut_regex(&mut **self, node) + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>) { + ::visit_mut_rest_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>) { + ::visit_mut_return_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + ::visit_mut_script(&mut **self, node) + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>) { + ::visit_mut_seq_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>) { + ::visit_mut_setter_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_simple_assign_target(&mut self, node: &mut SimpleAssignTarget<'a>) { + ::visit_mut_simple_assign_target(&mut **self, node) + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span) { + ::visit_mut_span(&mut **self, node) + } + + #[inline] + fn visit_mut_spread_element(&mut self, node: &mut SpreadElement<'a>) { + ::visit_mut_spread_element(&mut **self, node) + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>) { + ::visit_mut_static_block(&mut **self, node) + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>) { + ::visit_mut_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>) { + ::visit_mut_stmts(&mut **self, node) + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str) { + ::visit_mut_str(&mut **self, node) + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super) { + ::visit_mut_super(&mut **self, node) + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>) { + ::visit_mut_super_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_super_prop_expr(&mut self, node: &mut SuperPropExpr<'a>) { + ::visit_mut_super_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>) { + ::visit_mut_switch_case(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_cases(&mut self, node: &mut Vec<'a, SwitchCase<'a>>) { + ::visit_mut_switch_cases(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>) { + ::visit_mut_switch_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_syntax_context(&mut self, node: &mut swc_common::SyntaxContext) { + ::visit_mut_syntax_context(&mut **self, node) + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>) { + ::visit_mut_tagged_tpl(&mut **self, node) + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr) { + ::visit_mut_this_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>) { + ::visit_mut_throw_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>) { + ::visit_mut_tpl(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement) { + ::visit_mut_tpl_element(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl_elements(&mut self, node: &mut Vec<'a, TplElement>) { + ::visit_mut_tpl_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_true_plus_minus(&mut self, node: &mut TruePlusMinus) { + ::visit_mut_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>) { + ::visit_mut_try_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_array_type(&mut self, node: &mut TsArrayType<'a>) { + ::visit_mut_ts_array_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>) { + ::visit_mut_ts_as_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_call_signature_decl(&mut self, node: &mut TsCallSignatureDecl<'a>) { + ::visit_mut_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_conditional_type(&mut self, node: &mut TsConditionalType<'a>) { + ::visit_mut_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_const_assertion(&mut self, node: &mut TsConstAssertion<'a>) { + ::visit_mut_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_construct_signature_decl(&mut self, node: &mut TsConstructSignatureDecl<'a>) { + ::visit_mut_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_constructor_type(&mut self, node: &mut TsConstructorType<'a>) { + ::visit_mut_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_entity_name(&mut self, node: &mut TsEntityName<'a>) { + ::visit_mut_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>) { + ::visit_mut_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_member(&mut self, node: &mut TsEnumMember<'a>) { + ::visit_mut_ts_enum_member(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_member_id(&mut self, node: &mut TsEnumMemberId<'a>) { + ::visit_mut_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_members(&mut self, node: &mut Vec<'a, TsEnumMember<'a>>) { + ::visit_mut_ts_enum_members(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_export_assignment(&mut self, node: &mut TsExportAssignment<'a>) { + ::visit_mut_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_expr_with_type_args(&mut self, node: &mut TsExprWithTypeArgs<'a>) { + ::visit_mut_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss(&mut self, node: &mut Vec<'a, TsExprWithTypeArgs<'a>>) { + ::visit_mut_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_external_module_ref(&mut self, node: &mut TsExternalModuleRef) { + ::visit_mut_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type(&mut self, node: &mut TsFnOrConstructorType<'a>) { + ::visit_mut_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>) { + ::visit_mut_ts_fn_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_params(&mut self, node: &mut Vec<'a, TsFnParam<'a>>) { + ::visit_mut_ts_fn_params(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>) { + ::visit_mut_ts_fn_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_getter_signature(&mut self, node: &mut TsGetterSignature<'a>) { + ::visit_mut_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_import_equals_decl(&mut self, node: &mut TsImportEqualsDecl<'a>) { + ::visit_mut_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_import_type(&mut self, node: &mut TsImportType<'a>) { + ::visit_mut_ts_import_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_index_signature(&mut self, node: &mut TsIndexSignature<'a>) { + ::visit_mut_ts_index_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_indexed_access_type(&mut self, node: &mut TsIndexedAccessType<'a>) { + ::visit_mut_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_infer_type(&mut self, node: &mut TsInferType<'a>) { + ::visit_mut_ts_infer_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_instantiation(&mut self, node: &mut TsInstantiation<'a>) { + ::visit_mut_ts_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_interface_body(&mut self, node: &mut TsInterfaceBody<'a>) { + ::visit_mut_ts_interface_body(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_interface_decl(&mut self, node: &mut TsInterfaceDecl<'a>) { + ::visit_mut_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_intersection_type(&mut self, node: &mut TsIntersectionType<'a>) { + ::visit_mut_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_keyword_type(&mut self, node: &mut TsKeywordType) { + ::visit_mut_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_keyword_type_kind(&mut self, node: &mut TsKeywordTypeKind) { + ::visit_mut_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>) { + ::visit_mut_ts_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>) { + ::visit_mut_ts_lit_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_mapped_type(&mut self, node: &mut TsMappedType<'a>) { + ::visit_mut_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_method_signature(&mut self, node: &mut TsMethodSignature<'a>) { + ::visit_mut_ts_method_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_block(&mut self, node: &mut TsModuleBlock<'a>) { + ::visit_mut_ts_module_block(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_decl(&mut self, node: &mut TsModuleDecl<'a>) { + ::visit_mut_ts_module_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_name(&mut self, node: &mut TsModuleName<'a>) { + ::visit_mut_ts_module_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_ref(&mut self, node: &mut TsModuleRef<'a>) { + ::visit_mut_ts_module_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_body(&mut self, node: &mut TsNamespaceBody<'a>) { + ::visit_mut_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_decl(&mut self, node: &mut TsNamespaceDecl<'a>) { + ::visit_mut_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_export_decl(&mut self, node: &mut TsNamespaceExportDecl) { + ::visit_mut_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_non_null_expr(&mut self, node: &mut TsNonNullExpr<'a>) { + ::visit_mut_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_optional_type(&mut self, node: &mut TsOptionalType<'a>) { + ::visit_mut_ts_optional_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_param_prop(&mut self, node: &mut TsParamProp<'a>) { + ::visit_mut_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_param_prop_param(&mut self, node: &mut TsParamPropParam<'a>) { + ::visit_mut_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_parenthesized_type(&mut self, node: &mut TsParenthesizedType<'a>) { + ::visit_mut_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_property_signature(&mut self, node: &mut TsPropertySignature<'a>) { + ::visit_mut_ts_property_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_qualified_name(&mut self, node: &mut TsQualifiedName<'a>) { + ::visit_mut_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>) { + ::visit_mut_ts_rest_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_satisfies_expr(&mut self, node: &mut TsSatisfiesExpr<'a>) { + ::visit_mut_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_setter_signature(&mut self, node: &mut TsSetterSignature<'a>) { + ::visit_mut_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType) { + ::visit_mut_ts_this_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_this_type_or_ident(&mut self, node: &mut TsThisTypeOrIdent<'a>) { + ::visit_mut_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tpl_lit_type(&mut self, node: &mut TsTplLitType<'a>) { + ::visit_mut_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_element(&mut self, node: &mut TsTupleElement<'a>) { + ::visit_mut_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_elements(&mut self, node: &mut Vec<'a, TsTupleElement<'a>>) { + ::visit_mut_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_type(&mut self, node: &mut TsTupleType<'a>) { + ::visit_mut_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>) { + ::visit_mut_ts_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_alias_decl(&mut self, node: &mut TsTypeAliasDecl<'a>) { + ::visit_mut_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>) { + ::visit_mut_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_assertion(&mut self, node: &mut TsTypeAssertion<'a>) { + ::visit_mut_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_element(&mut self, node: &mut TsTypeElement<'a>) { + ::visit_mut_ts_type_element(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_elements(&mut self, node: &mut Vec<'a, TsTypeElement<'a>>) { + ::visit_mut_ts_type_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>) { + ::visit_mut_ts_type_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_operator(&mut self, node: &mut TsTypeOperator<'a>) { + ::visit_mut_ts_type_operator(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_operator_op(&mut self, node: &mut TsTypeOperatorOp) { + ::visit_mut_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param(&mut self, node: &mut TsTypeParam<'a>) { + ::visit_mut_ts_type_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param_decl(&mut self, node: &mut TsTypeParamDecl<'a>) { + ::visit_mut_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param_instantiation(&mut self, node: &mut TsTypeParamInstantiation<'a>) { + ::visit_mut_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_params(&mut self, node: &mut Vec<'a, TsTypeParam<'a>>) { + ::visit_mut_ts_type_params(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_predicate(&mut self, node: &mut TsTypePredicate<'a>) { + ::visit_mut_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_query(&mut self, node: &mut TsTypeQuery<'a>) { + ::visit_mut_ts_type_query(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_query_expr(&mut self, node: &mut TsTypeQueryExpr<'a>) { + ::visit_mut_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>) { + ::visit_mut_ts_type_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>) { + ::visit_mut_ts_types(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + ) { + ::visit_mut_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_union_type(&mut self, node: &mut TsUnionType<'a>) { + ::visit_mut_ts_union_type(&mut **self, node) + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>) { + ::visit_mut_unary_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp) { + ::visit_mut_unary_op(&mut **self, node) + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>) { + ::visit_mut_update_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp) { + ::visit_mut_update_op(&mut **self, node) + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>) { + ::visit_mut_using_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>) { + ::visit_mut_var_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind) { + ::visit_mut_var_decl_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl_or_expr(&mut self, node: &mut VarDeclOrExpr<'a>) { + ::visit_mut_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_var_declarator(&mut self, node: &mut VarDeclarator<'a>) { + ::visit_mut_var_declarator(&mut **self, node) + } + + #[inline] + fn visit_mut_var_declarators(&mut self, node: &mut Vec<'a, VarDeclarator<'a>>) { + ::visit_mut_var_declarators(&mut **self, node) + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>) { + ::visit_mut_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>) { + ::visit_mut_with_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>) { + ::visit_mut_yield_expr(&mut **self, node) + } +} +impl<'a, V> VisitMut<'a> for Box<'a, V> +where + V: ?Sized + VisitMut<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility) { + ::visit_mut_accessibility(&mut **self, node) + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>) { + ::visit_mut_array_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>) { + ::visit_mut_array_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>) { + ::visit_mut_arrow_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>) { + ::visit_mut_assign_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp) { + ::visit_mut_assign_op(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>) { + ::visit_mut_assign_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_pat_prop(&mut self, node: &mut AssignPatProp<'a>) { + ::visit_mut_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>) { + ::visit_mut_assign_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_target(&mut self, node: &mut AssignTarget<'a>) { + ::visit_mut_assign_target(&mut **self, node) + } + + #[inline] + fn visit_mut_assign_target_pat(&mut self, node: &mut AssignTargetPat<'a>) { + ::visit_mut_assign_target_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom) { + ::visit_mut_atom(&mut **self, node) + } + + #[inline] + fn visit_mut_auto_accessor(&mut self, node: &mut AutoAccessor<'a>) { + ::visit_mut_auto_accessor(&mut **self, node) + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>) { + ::visit_mut_await_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>) { + ::visit_mut_big_int(&mut **self, node) + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue) { + ::visit_mut_big_int_value(&mut **self, node) + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>) { + ::visit_mut_bin_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp) { + ::visit_mut_binary_op(&mut **self, node) + } + + #[inline] + fn visit_mut_binding_ident(&mut self, node: &mut BindingIdent<'a>) { + ::visit_mut_binding_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>) { + ::visit_mut_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_block_stmt_or_expr(&mut self, node: &mut BlockStmtOrExpr<'a>) { + ::visit_mut_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool) { + ::visit_mut_bool(&mut **self, node) + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt) { + ::visit_mut_break_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>) { + ::visit_mut_call_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>) { + ::visit_mut_callee(&mut **self, node) + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>) { + ::visit_mut_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>) { + ::visit_mut_class(&mut **self, node) + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>) { + ::visit_mut_class_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>) { + ::visit_mut_class_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>) { + ::visit_mut_class_member(&mut **self, node) + } + + #[inline] + fn visit_mut_class_members(&mut self, node: &mut Vec<'a, ClassMember<'a>>) { + ::visit_mut_class_members(&mut **self, node) + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>) { + ::visit_mut_class_method(&mut **self, node) + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>) { + ::visit_mut_class_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_computed_prop_name(&mut self, node: &mut ComputedPropName<'a>) { + ::visit_mut_computed_prop_name(&mut **self, node) + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>) { + ::visit_mut_cond_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>) { + ::visit_mut_constructor(&mut **self, node) + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt) { + ::visit_mut_continue_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt) { + ::visit_mut_debugger_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>) { + ::visit_mut_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>) { + ::visit_mut_decorator(&mut **self, node) + } + + #[inline] + fn visit_mut_decorators(&mut self, node: &mut Vec<'a, Decorator<'a>>) { + ::visit_mut_decorators(&mut **self, node) + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>) { + ::visit_mut_default_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_do_while_stmt(&mut self, node: &mut DoWhileStmt<'a>) { + ::visit_mut_do_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt) { + ::visit_mut_empty_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>) { + ::visit_mut_export_all(&mut **self, node) + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>) { + ::visit_mut_export_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_decl(&mut self, node: &mut ExportDefaultDecl<'a>) { + ::visit_mut_export_default_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_expr(&mut self, node: &mut ExportDefaultExpr<'a>) { + ::visit_mut_export_default_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_export_default_specifier(&mut self, node: &mut ExportDefaultSpecifier) { + ::visit_mut_export_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_named_specifier(&mut self, node: &mut ExportNamedSpecifier<'a>) { + ::visit_mut_export_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_namespace_specifier(&mut self, node: &mut ExportNamespaceSpecifier<'a>) { + ::visit_mut_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_specifier(&mut self, node: &mut ExportSpecifier<'a>) { + ::visit_mut_export_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_export_specifiers(&mut self, node: &mut Vec<'a, ExportSpecifier<'a>>) { + ::visit_mut_export_specifiers(&mut **self, node) + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>) { + ::visit_mut_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_or_spread(&mut self, node: &mut ExprOrSpread<'a>) { + ::visit_mut_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_or_spreads(&mut self, node: &mut Vec<'a, ExprOrSpread<'a>>) { + ::visit_mut_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>) { + ::visit_mut_expr_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>) { + ::visit_mut_exprs(&mut **self, node) + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>) { + ::visit_mut_fn_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>) { + ::visit_mut_fn_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>) { + ::visit_mut_for_head(&mut **self, node) + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>) { + ::visit_mut_for_in_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>) { + ::visit_mut_for_of_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>) { + ::visit_mut_for_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>) { + ::visit_mut_function(&mut **self, node) + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>) { + ::visit_mut_getter_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident) { + ::visit_mut_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName) { + ::visit_mut_ident_name(&mut **self, node) + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>) { + ::visit_mut_if_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import) { + ::visit_mut_import(&mut **self, node) + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>) { + ::visit_mut_import_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_import_default_specifier(&mut self, node: &mut ImportDefaultSpecifier) { + ::visit_mut_import_default_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_named_specifier(&mut self, node: &mut ImportNamedSpecifier<'a>) { + ::visit_mut_import_named_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase) { + ::visit_mut_import_phase(&mut **self, node) + } + + #[inline] + fn visit_mut_import_specifier(&mut self, node: &mut ImportSpecifier<'a>) { + ::visit_mut_import_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_specifiers(&mut self, node: &mut Vec<'a, ImportSpecifier<'a>>) { + ::visit_mut_import_specifiers(&mut **self, node) + } + + #[inline] + fn visit_mut_import_star_as_specifier(&mut self, node: &mut ImportStarAsSpecifier) { + ::visit_mut_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>) { + ::visit_mut_import_with(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with_item(&mut self, node: &mut ImportWithItem) { + ::visit_mut_import_with_item(&mut **self, node) + } + + #[inline] + fn visit_mut_import_with_items(&mut self, node: &mut Vec<'a, ImportWithItem>) { + ::visit_mut_import_with_items(&mut **self, node) + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid) { + ::visit_mut_invalid(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>) { + ::visit_mut_jsx_attr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_name(&mut self, node: &mut JSXAttrName<'a>) { + ::visit_mut_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_or_spread(&mut self, node: &mut JSXAttrOrSpread<'a>) { + ::visit_mut_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads(&mut self, node: &mut Vec<'a, JSXAttrOrSpread<'a>>) { + ::visit_mut_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_attr_value(&mut self, node: &mut JSXAttrValue<'a>) { + ::visit_mut_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_closing_element(&mut self, node: &mut JSXClosingElement<'a>) { + ::visit_mut_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_closing_fragment(&mut self, node: &mut JSXClosingFragment) { + ::visit_mut_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>) { + ::visit_mut_jsx_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_child(&mut self, node: &mut JSXElementChild<'a>) { + ::visit_mut_jsx_element_child(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_childs(&mut self, node: &mut Vec<'a, JSXElementChild<'a>>) { + ::visit_mut_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_element_name(&mut self, node: &mut JSXElementName<'a>) { + ::visit_mut_jsx_element_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr) { + ::visit_mut_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>) { + ::visit_mut_jsx_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_expr_container(&mut self, node: &mut JSXExprContainer<'a>) { + ::visit_mut_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>) { + ::visit_mut_jsx_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_member_expr(&mut self, node: &mut JSXMemberExpr<'a>) { + ::visit_mut_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_namespaced_name(&mut self, node: &mut JSXNamespacedName) { + ::visit_mut_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>) { + ::visit_mut_jsx_object(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement<'a>) { + ::visit_mut_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_opening_fragment(&mut self, node: &mut JSXOpeningFragment) { + ::visit_mut_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_spread_child(&mut self, node: &mut JSXSpreadChild<'a>) { + ::visit_mut_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText) { + ::visit_mut_jsx_text(&mut **self, node) + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>) { + ::visit_mut_key(&mut **self, node) + } + + #[inline] + fn visit_mut_key_value_pat_prop(&mut self, node: &mut KeyValuePatProp<'a>) { + ::visit_mut_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_key_value_prop(&mut self, node: &mut KeyValueProp<'a>) { + ::visit_mut_key_value_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>) { + ::visit_mut_labeled_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>) { + ::visit_mut_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>) { + ::visit_mut_member_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>) { + ::visit_mut_member_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr) { + ::visit_mut_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind) { + ::visit_mut_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind) { + ::visit_mut_method_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>) { + ::visit_mut_method_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + ::visit_mut_module(&mut **self, node) + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>) { + ::visit_mut_module_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_module_export_name(&mut self, node: &mut ModuleExportName<'a>) { + ::visit_mut_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>) { + ::visit_mut_module_item(&mut **self, node) + } + + #[inline] + fn visit_mut_module_items(&mut self, node: &mut Vec<'a, ModuleItem<'a>>) { + ::visit_mut_module_items(&mut **self, node) + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>) { + ::visit_mut_named_export(&mut **self, node) + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>) { + ::visit_mut_new_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null) { + ::visit_mut_null(&mut **self, node) + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number) { + ::visit_mut_number(&mut **self, node) + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>) { + ::visit_mut_object_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>) { + ::visit_mut_object_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat_prop(&mut self, node: &mut ObjectPatProp<'a>) { + ::visit_mut_object_pat_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_object_pat_props(&mut self, node: &mut Vec<'a, ObjectPatProp<'a>>) { + ::visit_mut_object_pat_props(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_accessibility(&mut self, node: &mut Option) { + ::visit_mut_opt_accessibility(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_atom(&mut self, node: &mut Option) { + ::visit_mut_opt_atom(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_block_stmt(&mut self, node: &mut Option>) { + ::visit_mut_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>) { + ::visit_mut_opt_call(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_catch_clause(&mut self, node: &mut Option>) { + ::visit_mut_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_chain_base(&mut self, node: &mut OptChainBase<'a>) { + ::visit_mut_opt_chain_base(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_chain_expr(&mut self, node: &mut OptChainExpr<'a>) { + ::visit_mut_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>) { + ::visit_mut_opt_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr_or_spread(&mut self, node: &mut Option>) { + ::visit_mut_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_expr_or_spreads(&mut self, node: &mut Option>>) { + ::visit_mut_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option) { + ::visit_mut_opt_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_jsx_attr_value(&mut self, node: &mut Option>) { + ::visit_mut_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_jsx_closing_element(&mut self, node: &mut Option>) { + ::visit_mut_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_module_export_name(&mut self, node: &mut Option>) { + ::visit_mut_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_object_lit(&mut self, node: &mut Option>>) { + ::visit_mut_opt_object_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>) { + ::visit_mut_opt_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_span(&mut self, node: &mut Option) { + ::visit_mut_opt_span(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>) { + ::visit_mut_opt_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>) { + ::visit_mut_opt_str(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_true_plus_minus(&mut self, node: &mut Option) { + ::visit_mut_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_entity_name(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_namespace_body(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type(&mut self, node: &mut Option>) { + ::visit_mut_opt_ts_type(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_ann(&mut self, node: &mut Option>>) { + ::visit_mut_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + ) { + ::visit_mut_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + ) { + ::visit_mut_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr(&mut self, node: &mut Option>) { + ::visit_mut_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads(&mut self, node: &mut Vec<'a, Option>>) { + ::visit_mut_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_opt_vec_pats(&mut self, node: &mut Vec<'a, Option>>) { + ::visit_mut_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>) { + ::visit_mut_param(&mut **self, node) + } + + #[inline] + fn visit_mut_param_or_ts_param_prop(&mut self, node: &mut ParamOrTsParamProp<'a>) { + ::visit_mut_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_param_or_ts_param_props(&mut self, node: &mut Vec<'a, ParamOrTsParamProp<'a>>) { + ::visit_mut_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>) { + ::visit_mut_params(&mut **self, node) + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>) { + ::visit_mut_paren_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>) { + ::visit_mut_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>) { + ::visit_mut_pats(&mut **self, node) + } + + #[inline] + fn visit_mut_private_method(&mut self, node: &mut PrivateMethod<'a>) { + ::visit_mut_private_method(&mut **self, node) + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName) { + ::visit_mut_private_name(&mut **self, node) + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>) { + ::visit_mut_private_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + ::visit_mut_program(&mut **self, node) + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>) { + ::visit_mut_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>) { + ::visit_mut_prop_name(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_or_spread(&mut self, node: &mut PropOrSpread<'a>) { + ::visit_mut_prop_or_spread(&mut **self, node) + } + + #[inline] + fn visit_mut_prop_or_spreads(&mut self, node: &mut Vec<'a, PropOrSpread<'a>>) { + ::visit_mut_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex) { + ::visit_mut_regex(&mut **self, node) + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>) { + ::visit_mut_rest_pat(&mut **self, node) + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>) { + ::visit_mut_return_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + ::visit_mut_script(&mut **self, node) + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>) { + ::visit_mut_seq_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>) { + ::visit_mut_setter_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_simple_assign_target(&mut self, node: &mut SimpleAssignTarget<'a>) { + ::visit_mut_simple_assign_target(&mut **self, node) + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span) { + ::visit_mut_span(&mut **self, node) + } + + #[inline] + fn visit_mut_spread_element(&mut self, node: &mut SpreadElement<'a>) { + ::visit_mut_spread_element(&mut **self, node) + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>) { + ::visit_mut_static_block(&mut **self, node) + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>) { + ::visit_mut_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>) { + ::visit_mut_stmts(&mut **self, node) + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str) { + ::visit_mut_str(&mut **self, node) + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super) { + ::visit_mut_super(&mut **self, node) + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>) { + ::visit_mut_super_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_super_prop_expr(&mut self, node: &mut SuperPropExpr<'a>) { + ::visit_mut_super_prop_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>) { + ::visit_mut_switch_case(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_cases(&mut self, node: &mut Vec<'a, SwitchCase<'a>>) { + ::visit_mut_switch_cases(&mut **self, node) + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>) { + ::visit_mut_switch_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_syntax_context(&mut self, node: &mut swc_common::SyntaxContext) { + ::visit_mut_syntax_context(&mut **self, node) + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>) { + ::visit_mut_tagged_tpl(&mut **self, node) + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr) { + ::visit_mut_this_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>) { + ::visit_mut_throw_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>) { + ::visit_mut_tpl(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement) { + ::visit_mut_tpl_element(&mut **self, node) + } + + #[inline] + fn visit_mut_tpl_elements(&mut self, node: &mut Vec<'a, TplElement>) { + ::visit_mut_tpl_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_true_plus_minus(&mut self, node: &mut TruePlusMinus) { + ::visit_mut_true_plus_minus(&mut **self, node) + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>) { + ::visit_mut_try_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_array_type(&mut self, node: &mut TsArrayType<'a>) { + ::visit_mut_ts_array_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>) { + ::visit_mut_ts_as_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_call_signature_decl(&mut self, node: &mut TsCallSignatureDecl<'a>) { + ::visit_mut_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_conditional_type(&mut self, node: &mut TsConditionalType<'a>) { + ::visit_mut_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_const_assertion(&mut self, node: &mut TsConstAssertion<'a>) { + ::visit_mut_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_construct_signature_decl(&mut self, node: &mut TsConstructSignatureDecl<'a>) { + ::visit_mut_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_constructor_type(&mut self, node: &mut TsConstructorType<'a>) { + ::visit_mut_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_entity_name(&mut self, node: &mut TsEntityName<'a>) { + ::visit_mut_ts_entity_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>) { + ::visit_mut_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_member(&mut self, node: &mut TsEnumMember<'a>) { + ::visit_mut_ts_enum_member(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_member_id(&mut self, node: &mut TsEnumMemberId<'a>) { + ::visit_mut_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_enum_members(&mut self, node: &mut Vec<'a, TsEnumMember<'a>>) { + ::visit_mut_ts_enum_members(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_export_assignment(&mut self, node: &mut TsExportAssignment<'a>) { + ::visit_mut_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_expr_with_type_args(&mut self, node: &mut TsExprWithTypeArgs<'a>) { + ::visit_mut_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss(&mut self, node: &mut Vec<'a, TsExprWithTypeArgs<'a>>) { + ::visit_mut_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_external_module_ref(&mut self, node: &mut TsExternalModuleRef) { + ::visit_mut_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type(&mut self, node: &mut TsFnOrConstructorType<'a>) { + ::visit_mut_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>) { + ::visit_mut_ts_fn_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_params(&mut self, node: &mut Vec<'a, TsFnParam<'a>>) { + ::visit_mut_ts_fn_params(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>) { + ::visit_mut_ts_fn_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_getter_signature(&mut self, node: &mut TsGetterSignature<'a>) { + ::visit_mut_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_import_equals_decl(&mut self, node: &mut TsImportEqualsDecl<'a>) { + ::visit_mut_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_import_type(&mut self, node: &mut TsImportType<'a>) { + ::visit_mut_ts_import_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_index_signature(&mut self, node: &mut TsIndexSignature<'a>) { + ::visit_mut_ts_index_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_indexed_access_type(&mut self, node: &mut TsIndexedAccessType<'a>) { + ::visit_mut_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_infer_type(&mut self, node: &mut TsInferType<'a>) { + ::visit_mut_ts_infer_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_instantiation(&mut self, node: &mut TsInstantiation<'a>) { + ::visit_mut_ts_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_interface_body(&mut self, node: &mut TsInterfaceBody<'a>) { + ::visit_mut_ts_interface_body(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_interface_decl(&mut self, node: &mut TsInterfaceDecl<'a>) { + ::visit_mut_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_intersection_type(&mut self, node: &mut TsIntersectionType<'a>) { + ::visit_mut_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_keyword_type(&mut self, node: &mut TsKeywordType) { + ::visit_mut_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_keyword_type_kind(&mut self, node: &mut TsKeywordTypeKind) { + ::visit_mut_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>) { + ::visit_mut_ts_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>) { + ::visit_mut_ts_lit_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_mapped_type(&mut self, node: &mut TsMappedType<'a>) { + ::visit_mut_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_method_signature(&mut self, node: &mut TsMethodSignature<'a>) { + ::visit_mut_ts_method_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_block(&mut self, node: &mut TsModuleBlock<'a>) { + ::visit_mut_ts_module_block(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_decl(&mut self, node: &mut TsModuleDecl<'a>) { + ::visit_mut_ts_module_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_name(&mut self, node: &mut TsModuleName<'a>) { + ::visit_mut_ts_module_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_module_ref(&mut self, node: &mut TsModuleRef<'a>) { + ::visit_mut_ts_module_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_body(&mut self, node: &mut TsNamespaceBody<'a>) { + ::visit_mut_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_decl(&mut self, node: &mut TsNamespaceDecl<'a>) { + ::visit_mut_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_namespace_export_decl(&mut self, node: &mut TsNamespaceExportDecl) { + ::visit_mut_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_non_null_expr(&mut self, node: &mut TsNonNullExpr<'a>) { + ::visit_mut_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_optional_type(&mut self, node: &mut TsOptionalType<'a>) { + ::visit_mut_ts_optional_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_param_prop(&mut self, node: &mut TsParamProp<'a>) { + ::visit_mut_ts_param_prop(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_param_prop_param(&mut self, node: &mut TsParamPropParam<'a>) { + ::visit_mut_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_parenthesized_type(&mut self, node: &mut TsParenthesizedType<'a>) { + ::visit_mut_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_property_signature(&mut self, node: &mut TsPropertySignature<'a>) { + ::visit_mut_ts_property_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_qualified_name(&mut self, node: &mut TsQualifiedName<'a>) { + ::visit_mut_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>) { + ::visit_mut_ts_rest_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_satisfies_expr(&mut self, node: &mut TsSatisfiesExpr<'a>) { + ::visit_mut_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_setter_signature(&mut self, node: &mut TsSetterSignature<'a>) { + ::visit_mut_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType) { + ::visit_mut_ts_this_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_this_type_or_ident(&mut self, node: &mut TsThisTypeOrIdent<'a>) { + ::visit_mut_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tpl_lit_type(&mut self, node: &mut TsTplLitType<'a>) { + ::visit_mut_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_element(&mut self, node: &mut TsTupleElement<'a>) { + ::visit_mut_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_elements(&mut self, node: &mut Vec<'a, TsTupleElement<'a>>) { + ::visit_mut_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_tuple_type(&mut self, node: &mut TsTupleType<'a>) { + ::visit_mut_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>) { + ::visit_mut_ts_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_alias_decl(&mut self, node: &mut TsTypeAliasDecl<'a>) { + ::visit_mut_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>) { + ::visit_mut_ts_type_ann(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_assertion(&mut self, node: &mut TsTypeAssertion<'a>) { + ::visit_mut_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_element(&mut self, node: &mut TsTypeElement<'a>) { + ::visit_mut_ts_type_element(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_elements(&mut self, node: &mut Vec<'a, TsTypeElement<'a>>) { + ::visit_mut_ts_type_elements(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>) { + ::visit_mut_ts_type_lit(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_operator(&mut self, node: &mut TsTypeOperator<'a>) { + ::visit_mut_ts_type_operator(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_operator_op(&mut self, node: &mut TsTypeOperatorOp) { + ::visit_mut_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param(&mut self, node: &mut TsTypeParam<'a>) { + ::visit_mut_ts_type_param(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param_decl(&mut self, node: &mut TsTypeParamDecl<'a>) { + ::visit_mut_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_param_instantiation(&mut self, node: &mut TsTypeParamInstantiation<'a>) { + ::visit_mut_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_params(&mut self, node: &mut Vec<'a, TsTypeParam<'a>>) { + ::visit_mut_ts_type_params(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_predicate(&mut self, node: &mut TsTypePredicate<'a>) { + ::visit_mut_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_query(&mut self, node: &mut TsTypeQuery<'a>) { + ::visit_mut_ts_type_query(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_query_expr(&mut self, node: &mut TsTypeQueryExpr<'a>) { + ::visit_mut_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>) { + ::visit_mut_ts_type_ref(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>) { + ::visit_mut_ts_types(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + ) { + ::visit_mut_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn visit_mut_ts_union_type(&mut self, node: &mut TsUnionType<'a>) { + ::visit_mut_ts_union_type(&mut **self, node) + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>) { + ::visit_mut_unary_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp) { + ::visit_mut_unary_op(&mut **self, node) + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>) { + ::visit_mut_update_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp) { + ::visit_mut_update_op(&mut **self, node) + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>) { + ::visit_mut_using_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>) { + ::visit_mut_var_decl(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind) { + ::visit_mut_var_decl_kind(&mut **self, node) + } + + #[inline] + fn visit_mut_var_decl_or_expr(&mut self, node: &mut VarDeclOrExpr<'a>) { + ::visit_mut_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn visit_mut_var_declarator(&mut self, node: &mut VarDeclarator<'a>) { + ::visit_mut_var_declarator(&mut **self, node) + } + + #[inline] + fn visit_mut_var_declarators(&mut self, node: &mut Vec<'a, VarDeclarator<'a>>) { + ::visit_mut_var_declarators(&mut **self, node) + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>) { + ::visit_mut_while_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>) { + ::visit_mut_with_stmt(&mut **self, node) + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>) { + ::visit_mut_yield_expr(&mut **self, node) + } +} +impl<'a, A, B> VisitMut<'a> for ::swc_visit::Either +where + A: VisitMut<'a>, + B: VisitMut<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_accessibility(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_accessibility(visitor, node), + } + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_array_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_array_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_array_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_array_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_arrow_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_arrow_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_op(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_op(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_pat_prop(&mut self, node: &mut AssignPatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_pat_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_target(&mut self, node: &mut AssignTarget<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_assign_target(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_assign_target(visitor, node), + } + } + + #[inline] + fn visit_mut_assign_target_pat(&mut self, node: &mut AssignTargetPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_assign_target_pat(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_assign_target_pat(visitor, node) + } + } + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_atom(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_atom(visitor, node), + } + } + + #[inline] + fn visit_mut_auto_accessor(&mut self, node: &mut AutoAccessor<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_auto_accessor(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_auto_accessor(visitor, node), + } + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_await_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_await_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_big_int(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_big_int(visitor, node), + } + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_big_int_value(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_big_int_value(visitor, node), + } + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_bin_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_bin_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_binary_op(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_binary_op(visitor, node), + } + } + + #[inline] + fn visit_mut_binding_ident(&mut self, node: &mut BindingIdent<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_binding_ident(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_binding_ident(visitor, node), + } + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_block_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_block_stmt_or_expr(&mut self, node: &mut BlockStmtOrExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_block_stmt_or_expr(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_block_stmt_or_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_bool(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_bool(visitor, node), + } + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_break_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_break_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_call_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_call_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_callee(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_callee(visitor, node), + } + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_catch_clause(visitor, node), + } + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class(visitor, node), + } + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_member(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_member(visitor, node), + } + } + + #[inline] + fn visit_mut_class_members(&mut self, node: &mut Vec<'a, ClassMember<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_members(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_members(visitor, node), + } + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_method(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_method(visitor, node), + } + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_class_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_class_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_computed_prop_name(&mut self, node: &mut ComputedPropName<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_computed_prop_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_computed_prop_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_cond_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_cond_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_constructor(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_constructor(visitor, node), + } + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_continue_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_continue_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_debugger_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_debugger_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_decorator(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_decorator(visitor, node), + } + } + + #[inline] + fn visit_mut_decorators(&mut self, node: &mut Vec<'a, Decorator<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_decorators(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_decorators(visitor, node), + } + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_default_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_default_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_do_while_stmt(&mut self, node: &mut DoWhileStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_do_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_do_while_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_empty_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_empty_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_export_all(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_export_all(visitor, node), + } + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_export_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_export_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_export_default_decl(&mut self, node: &mut ExportDefaultDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_default_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_default_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_default_expr(&mut self, node: &mut ExportDefaultExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_default_expr(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_default_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_default_specifier(&mut self, node: &mut ExportDefaultSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_default_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_default_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_named_specifier(&mut self, node: &mut ExportNamedSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_named_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_named_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_namespace_specifier(&mut self, node: &mut ExportNamespaceSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_namespace_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_namespace_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_specifier(&mut self, node: &mut ExportSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_export_specifier(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_export_specifiers(&mut self, node: &mut Vec<'a, ExportSpecifier<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_export_specifiers(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_export_specifiers(visitor, node) + } + } + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_expr_or_spread(&mut self, node: &mut ExprOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_expr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_expr_or_spread(visitor, node), + } + } + + #[inline] + fn visit_mut_expr_or_spreads(&mut self, node: &mut Vec<'a, ExprOrSpread<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_expr_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_expr_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_exprs(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_exprs(visitor, node), + } + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_fn_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_fn_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_fn_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_fn_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_for_head(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_for_head(visitor, node), + } + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_for_in_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_for_in_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_for_of_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_for_of_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_for_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_for_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_function(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_function(visitor, node), + } + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_getter_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_getter_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ident(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ident(visitor, node), + } + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ident_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ident_name(visitor, node), + } + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_if_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_if_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_import(visitor, node), + } + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_import_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_import_default_specifier(&mut self, node: &mut ImportDefaultSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_import_default_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_default_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_named_specifier(&mut self, node: &mut ImportNamedSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_import_named_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_named_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import_phase(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_import_phase(visitor, node), + } + } + + #[inline] + fn visit_mut_import_specifier(&mut self, node: &mut ImportSpecifier<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import_specifier(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_specifiers(&mut self, node: &mut Vec<'a, ImportSpecifier<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_import_specifiers(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_specifiers(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_star_as_specifier(&mut self, node: &mut ImportStarAsSpecifier) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_import_star_as_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_star_as_specifier(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import_with(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_import_with(visitor, node), + } + } + + #[inline] + fn visit_mut_import_with_item(&mut self, node: &mut ImportWithItem) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_import_with_item(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_with_item(visitor, node) + } + } + } + + #[inline] + fn visit_mut_import_with_items(&mut self, node: &mut Vec<'a, ImportWithItem>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_import_with_items(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_import_with_items(visitor, node) + } + } + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_invalid(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_invalid(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_attr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_attr(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_attr_name(&mut self, node: &mut JSXAttrName<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_attr_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_attr_name(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spread(&mut self, node: &mut JSXAttrOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_attr_or_spread(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_attr_or_spread(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads(&mut self, node: &mut Vec<'a, JSXAttrOrSpread<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_attr_or_spreads(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_attr_or_spreads(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_value(&mut self, node: &mut JSXAttrValue<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_attr_value(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_attr_value(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_closing_element(&mut self, node: &mut JSXClosingElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_closing_element(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_closing_element(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_closing_fragment(&mut self, node: &mut JSXClosingFragment) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_closing_fragment(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_closing_fragment(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_element(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_element(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_element_child(&mut self, node: &mut JSXElementChild<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_element_child(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_element_child(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_element_childs(&mut self, node: &mut Vec<'a, JSXElementChild<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_element_childs(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_element_childs(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_element_name(&mut self, node: &mut JSXElementName<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_element_name(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_element_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_empty_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_empty_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_expr_container(&mut self, node: &mut JSXExprContainer<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_expr_container(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_expr_container(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_fragment(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_fragment(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_member_expr(&mut self, node: &mut JSXMemberExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_member_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_namespaced_name(&mut self, node: &mut JSXNamespacedName) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_namespaced_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_namespaced_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_object(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_object(visitor, node), + } + } + + #[inline] + fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_opening_element(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_opening_element(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_opening_fragment(&mut self, node: &mut JSXOpeningFragment) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_jsx_opening_fragment(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_opening_fragment(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_spread_child(&mut self, node: &mut JSXSpreadChild<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_spread_child(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_jsx_spread_child(visitor, node) + } + } + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_jsx_text(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_jsx_text(visitor, node), + } + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_key(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_key(visitor, node), + } + } + + #[inline] + fn visit_mut_key_value_pat_prop(&mut self, node: &mut KeyValuePatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_key_value_pat_prop(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_key_value_pat_prop(visitor, node) + } + } + } + + #[inline] + fn visit_mut_key_value_prop(&mut self, node: &mut KeyValueProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_key_value_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_key_value_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_labeled_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_labeled_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_member_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_member_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_member_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_meta_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_meta_prop_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_meta_prop_kind(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_meta_prop_kind(visitor, node), + } + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_method_kind(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_method_kind(visitor, node), + } + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_method_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_method_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_module(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_module(visitor, node), + } + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_module_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_module_export_name(&mut self, node: &mut ModuleExportName<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_module_export_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_module_export_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_module_item(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_module_item(visitor, node), + } + } + + #[inline] + fn visit_mut_module_items(&mut self, node: &mut Vec<'a, ModuleItem<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_module_items(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_module_items(visitor, node), + } + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_named_export(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_named_export(visitor, node), + } + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_new_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_new_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_null(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_null(visitor, node), + } + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_number(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_number(visitor, node), + } + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_object_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_object_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_object_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_object_pat_prop(&mut self, node: &mut ObjectPatProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_object_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_object_pat_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_object_pat_props(&mut self, node: &mut Vec<'a, ObjectPatProp<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_object_pat_props(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_object_pat_props(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_accessibility(&mut self, node: &mut Option) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_accessibility(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_accessibility(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_atom(&mut self, node: &mut Option) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_atom(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_atom(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_block_stmt(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_block_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_call(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_call(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_catch_clause(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_catch_clause(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_chain_base(&mut self, node: &mut OptChainBase<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_chain_base(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_chain_base(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_chain_expr(&mut self, node: &mut OptChainExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_chain_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_chain_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_expr_or_spread(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_expr_or_spread(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_expr_or_spread(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_expr_or_spreads(&mut self, node: &mut Option>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_expr_or_spreads(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_expr_or_spreads(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_ident(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_ident(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_jsx_attr_value(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_jsx_attr_value(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_jsx_attr_value(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_jsx_closing_element(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_jsx_closing_element(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_jsx_closing_element(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_module_export_name(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_module_export_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_module_export_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_object_lit(&mut self, node: &mut Option>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_object_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_span(&mut self, node: &mut Option) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_span(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_span(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_str(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_str(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_true_plus_minus(&mut self, node: &mut Option) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_true_plus_minus(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_true_plus_minus(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_ts_entity_name(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_ts_entity_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_ts_entity_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_ts_namespace_body(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_ts_namespace_body(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_ts_namespace_body(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_ts_type(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_ts_type_ann(&mut self, node: &mut Option>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_ts_type_ann(visitor, node), + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_ts_type_param_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_ts_type_param_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr(&mut self, node: &mut Option>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_var_decl_or_expr(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_var_decl_or_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads(&mut self, node: &mut Vec<'a, Option>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_opt_vec_expr_or_spreads(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_opt_vec_expr_or_spreads(visitor, node) + } + } + } + + #[inline] + fn visit_mut_opt_vec_pats(&mut self, node: &mut Vec<'a, Option>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_opt_vec_pats(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_opt_vec_pats(visitor, node), + } + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_param(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_param(visitor, node), + } + } + + #[inline] + fn visit_mut_param_or_ts_param_prop(&mut self, node: &mut ParamOrTsParamProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_param_or_ts_param_prop(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_param_or_ts_param_prop(visitor, node) + } + } + } + + #[inline] + fn visit_mut_param_or_ts_param_props(&mut self, node: &mut Vec<'a, ParamOrTsParamProp<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_param_or_ts_param_props(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_param_or_ts_param_props(visitor, node) + } + } + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_params(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_params(visitor, node), + } + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_paren_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_paren_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_pats(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_pats(visitor, node), + } + } + + #[inline] + fn visit_mut_private_method(&mut self, node: &mut PrivateMethod<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_private_method(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_private_method(visitor, node), + } + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_private_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_private_name(visitor, node), + } + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_private_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_private_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_program(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_program(visitor, node), + } + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_prop_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_prop_name(visitor, node), + } + } + + #[inline] + fn visit_mut_prop_or_spread(&mut self, node: &mut PropOrSpread<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_prop_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_prop_or_spread(visitor, node), + } + } + + #[inline] + fn visit_mut_prop_or_spreads(&mut self, node: &mut Vec<'a, PropOrSpread<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_prop_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_prop_or_spreads(visitor, node), + } + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_regex(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_regex(visitor, node), + } + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_rest_pat(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_rest_pat(visitor, node), + } + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_return_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_return_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_script(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_script(visitor, node), + } + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_seq_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_seq_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_setter_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_setter_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_simple_assign_target(&mut self, node: &mut SimpleAssignTarget<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_simple_assign_target(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_simple_assign_target(visitor, node) + } + } + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_span(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_span(visitor, node), + } + } + + #[inline] + fn visit_mut_spread_element(&mut self, node: &mut SpreadElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_spread_element(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_spread_element(visitor, node), + } + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_static_block(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_static_block(visitor, node), + } + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_stmts(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_stmts(visitor, node), + } + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_str(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_str(visitor, node), + } + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_super(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_super(visitor, node), + } + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_super_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_super_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_super_prop_expr(&mut self, node: &mut SuperPropExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_super_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_super_prop_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_switch_case(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_switch_case(visitor, node), + } + } + + #[inline] + fn visit_mut_switch_cases(&mut self, node: &mut Vec<'a, SwitchCase<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_switch_cases(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_switch_cases(visitor, node), + } + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_switch_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_switch_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_syntax_context(&mut self, node: &mut swc_common::SyntaxContext) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_syntax_context(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_syntax_context(visitor, node), + } + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_tagged_tpl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_tagged_tpl(visitor, node), + } + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_this_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_this_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_throw_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_throw_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_tpl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_tpl(visitor, node), + } + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_tpl_element(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_tpl_element(visitor, node), + } + } + + #[inline] + fn visit_mut_tpl_elements(&mut self, node: &mut Vec<'a, TplElement>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_tpl_elements(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_tpl_elements(visitor, node), + } + } + + #[inline] + fn visit_mut_true_plus_minus(&mut self, node: &mut TruePlusMinus) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_true_plus_minus(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_true_plus_minus(visitor, node), + } + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_try_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_try_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_array_type(&mut self, node: &mut TsArrayType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_array_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_array_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_as_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_as_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_call_signature_decl(&mut self, node: &mut TsCallSignatureDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_call_signature_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_call_signature_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_conditional_type(&mut self, node: &mut TsConditionalType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_conditional_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_conditional_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_const_assertion(&mut self, node: &mut TsConstAssertion<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_const_assertion(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_const_assertion(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_construct_signature_decl(&mut self, node: &mut TsConstructSignatureDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_construct_signature_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_construct_signature_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_constructor_type(&mut self, node: &mut TsConstructorType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_constructor_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_constructor_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_entity_name(&mut self, node: &mut TsEntityName<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_entity_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_entity_name(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_enum_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_enum_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_enum_member(&mut self, node: &mut TsEnumMember<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_enum_member(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_enum_member(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_enum_member_id(&mut self, node: &mut TsEnumMemberId<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_enum_member_id(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_enum_member_id(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_enum_members(&mut self, node: &mut Vec<'a, TsEnumMember<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_enum_members(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_enum_members(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_export_assignment(&mut self, node: &mut TsExportAssignment<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_export_assignment(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_export_assignment(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_args(&mut self, node: &mut TsExprWithTypeArgs<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_expr_with_type_args(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_expr_with_type_args(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss(&mut self, node: &mut Vec<'a, TsExprWithTypeArgs<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_expr_with_type_argss(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_expr_with_type_argss(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_external_module_ref(&mut self, node: &mut TsExternalModuleRef) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_external_module_ref(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_external_module_ref(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type(&mut self, node: &mut TsFnOrConstructorType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_fn_or_constructor_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_fn_or_constructor_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_fn_param(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_fn_param(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_fn_params(&mut self, node: &mut Vec<'a, TsFnParam<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_fn_params(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_fn_params(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_fn_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_fn_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_getter_signature(&mut self, node: &mut TsGetterSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_getter_signature(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_getter_signature(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_import_equals_decl(&mut self, node: &mut TsImportEqualsDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_import_equals_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_import_equals_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_import_type(&mut self, node: &mut TsImportType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_import_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_import_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_index_signature(&mut self, node: &mut TsIndexSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_index_signature(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_index_signature(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_indexed_access_type(&mut self, node: &mut TsIndexedAccessType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_indexed_access_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_indexed_access_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_infer_type(&mut self, node: &mut TsInferType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_infer_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_infer_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_instantiation(&mut self, node: &mut TsInstantiation<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_instantiation(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_instantiation(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_interface_body(&mut self, node: &mut TsInterfaceBody<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_interface_body(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_interface_body(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_interface_decl(&mut self, node: &mut TsInterfaceDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_interface_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_interface_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_intersection_type(&mut self, node: &mut TsIntersectionType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_intersection_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_intersection_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_keyword_type(&mut self, node: &mut TsKeywordType) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_keyword_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_keyword_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_keyword_type_kind(&mut self, node: &mut TsKeywordTypeKind) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_keyword_type_kind(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_keyword_type_kind(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_lit_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_mapped_type(&mut self, node: &mut TsMappedType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_mapped_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_mapped_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_method_signature(&mut self, node: &mut TsMethodSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_method_signature(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_method_signature(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_module_block(&mut self, node: &mut TsModuleBlock<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_module_block(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_module_block(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_module_decl(&mut self, node: &mut TsModuleDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_module_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_module_name(&mut self, node: &mut TsModuleName<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_module_name(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_module_name(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_module_ref(&mut self, node: &mut TsModuleRef<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_module_ref(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_module_ref(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_namespace_body(&mut self, node: &mut TsNamespaceBody<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_namespace_body(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_namespace_body(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_namespace_decl(&mut self, node: &mut TsNamespaceDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_namespace_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_namespace_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_namespace_export_decl(&mut self, node: &mut TsNamespaceExportDecl) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_namespace_export_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_namespace_export_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_non_null_expr(&mut self, node: &mut TsNonNullExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_non_null_expr(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_non_null_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_optional_type(&mut self, node: &mut TsOptionalType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_optional_type(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_optional_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_param_prop(&mut self, node: &mut TsParamProp<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_param_prop(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_param_prop(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_param_prop_param(&mut self, node: &mut TsParamPropParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_param_prop_param(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_param_prop_param(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_parenthesized_type(&mut self, node: &mut TsParenthesizedType<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_parenthesized_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_parenthesized_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_property_signature(&mut self, node: &mut TsPropertySignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_property_signature(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_property_signature(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_qualified_name(&mut self, node: &mut TsQualifiedName<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_qualified_name(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_qualified_name(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_rest_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_rest_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_satisfies_expr(&mut self, node: &mut TsSatisfiesExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_satisfies_expr(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_satisfies_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_setter_signature(&mut self, node: &mut TsSetterSignature<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_setter_signature(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_setter_signature(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_this_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_this_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_this_type_or_ident(&mut self, node: &mut TsThisTypeOrIdent<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_this_type_or_ident(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_this_type_or_ident(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_tpl_lit_type(&mut self, node: &mut TsTplLitType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_tpl_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_tpl_lit_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_tuple_element(&mut self, node: &mut TsTupleElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_tuple_element(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_tuple_element(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_tuple_elements(&mut self, node: &mut Vec<'a, TsTupleElement<'a>>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_tuple_elements(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_tuple_elements(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_tuple_type(&mut self, node: &mut TsTupleType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_tuple_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_tuple_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_alias_decl(&mut self, node: &mut TsTypeAliasDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_alias_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_alias_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_ann(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_assertion(&mut self, node: &mut TsTypeAssertion<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_assertion(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_assertion(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_element(&mut self, node: &mut TsTypeElement<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_element(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_element(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_elements(&mut self, node: &mut Vec<'a, TsTypeElement<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_elements(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_elements(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_lit(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_lit(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_operator(&mut self, node: &mut TsTypeOperator<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_operator(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_operator(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_operator_op(&mut self, node: &mut TsTypeOperatorOp) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_operator_op(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_operator_op(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_param(&mut self, node: &mut TsTypeParam<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_param(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_param(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_param_decl(&mut self, node: &mut TsTypeParamDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_param_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_param_decl(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_param_instantiation(&mut self, node: &mut TsTypeParamInstantiation<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_params(&mut self, node: &mut Vec<'a, TsTypeParam<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_params(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_params(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_predicate(&mut self, node: &mut TsTypePredicate<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_predicate(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_predicate(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_query(&mut self, node: &mut TsTypeQuery<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_query(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_query(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_type_query_expr(&mut self, node: &mut TsTypeQueryExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_type_query_expr(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_type_query_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_type_ref(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_type_ref(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_types(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_types(visitor, node), + } + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMut::visit_mut_ts_union_or_intersection_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_ts_union_or_intersection_type(visitor, node) + } + } + } + + #[inline] + fn visit_mut_ts_union_type(&mut self, node: &mut TsUnionType<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_ts_union_type(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_ts_union_type(visitor, node), + } + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_unary_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_unary_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_unary_op(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_unary_op(visitor, node), + } + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_update_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_update_expr(visitor, node), + } + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_update_op(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_update_op(visitor, node), + } + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_using_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_using_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_var_decl(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_var_decl(visitor, node), + } + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_var_decl_kind(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_var_decl_kind(visitor, node), + } + } + + #[inline] + fn visit_mut_var_decl_or_expr(&mut self, node: &mut VarDeclOrExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_var_decl_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => { + VisitMut::visit_mut_var_decl_or_expr(visitor, node) + } + } + } + + #[inline] + fn visit_mut_var_declarator(&mut self, node: &mut VarDeclarator<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_var_declarator(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_var_declarator(visitor, node), + } + } + + #[inline] + fn visit_mut_var_declarators(&mut self, node: &mut Vec<'a, VarDeclarator<'a>>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_var_declarators(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_var_declarators(visitor, node), + } + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_while_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_with_stmt(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_with_stmt(visitor, node), + } + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>) { + match self { + swc_visit::Either::Left(visitor) => VisitMut::visit_mut_yield_expr(visitor, node), + swc_visit::Either::Right(visitor) => VisitMut::visit_mut_yield_expr(visitor, node), + } + } +} +impl<'a, V> VisitMut<'a> for ::swc_visit::Optional +where + V: VisitMut<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility) { + if self.enabled { + ::visit_mut_accessibility(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>) { + if self.enabled { + ::visit_mut_array_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>) { + if self.enabled { + ::visit_mut_array_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>) { + if self.enabled { + ::visit_mut_arrow_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>) { + if self.enabled { + ::visit_mut_assign_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp) { + if self.enabled { + ::visit_mut_assign_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>) { + if self.enabled { + ::visit_mut_assign_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_pat_prop(&mut self, node: &mut AssignPatProp<'a>) { + if self.enabled { + ::visit_mut_assign_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>) { + if self.enabled { + ::visit_mut_assign_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_target(&mut self, node: &mut AssignTarget<'a>) { + if self.enabled { + ::visit_mut_assign_target(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_assign_target_pat(&mut self, node: &mut AssignTargetPat<'a>) { + if self.enabled { + ::visit_mut_assign_target_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom) { + if self.enabled { + ::visit_mut_atom(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_auto_accessor(&mut self, node: &mut AutoAccessor<'a>) { + if self.enabled { + ::visit_mut_auto_accessor(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>) { + if self.enabled { + ::visit_mut_await_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>) { + if self.enabled { + ::visit_mut_big_int(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue) { + if self.enabled { + ::visit_mut_big_int_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>) { + if self.enabled { + ::visit_mut_bin_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp) { + if self.enabled { + ::visit_mut_binary_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_binding_ident(&mut self, node: &mut BindingIdent<'a>) { + if self.enabled { + ::visit_mut_binding_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>) { + if self.enabled { + ::visit_mut_block_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_block_stmt_or_expr(&mut self, node: &mut BlockStmtOrExpr<'a>) { + if self.enabled { + ::visit_mut_block_stmt_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool) { + if self.enabled { + ::visit_mut_bool(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt) { + if self.enabled { + ::visit_mut_break_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>) { + if self.enabled { + ::visit_mut_call_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>) { + if self.enabled { + ::visit_mut_callee(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>) { + if self.enabled { + ::visit_mut_catch_clause(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>) { + if self.enabled { + ::visit_mut_class(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>) { + if self.enabled { + ::visit_mut_class_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>) { + if self.enabled { + ::visit_mut_class_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>) { + if self.enabled { + ::visit_mut_class_member(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_members(&mut self, node: &mut Vec<'a, ClassMember<'a>>) { + if self.enabled { + ::visit_mut_class_members(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>) { + if self.enabled { + ::visit_mut_class_method(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>) { + if self.enabled { + ::visit_mut_class_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_computed_prop_name(&mut self, node: &mut ComputedPropName<'a>) { + if self.enabled { + ::visit_mut_computed_prop_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>) { + if self.enabled { + ::visit_mut_cond_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>) { + if self.enabled { + ::visit_mut_constructor(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt) { + if self.enabled { + ::visit_mut_continue_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt) { + if self.enabled { + ::visit_mut_debugger_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>) { + if self.enabled { + ::visit_mut_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>) { + if self.enabled { + ::visit_mut_decorator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_decorators(&mut self, node: &mut Vec<'a, Decorator<'a>>) { + if self.enabled { + ::visit_mut_decorators(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>) { + if self.enabled { + ::visit_mut_default_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_do_while_stmt(&mut self, node: &mut DoWhileStmt<'a>) { + if self.enabled { + ::visit_mut_do_while_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt) { + if self.enabled { + ::visit_mut_empty_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>) { + if self.enabled { + ::visit_mut_export_all(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>) { + if self.enabled { + ::visit_mut_export_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_default_decl(&mut self, node: &mut ExportDefaultDecl<'a>) { + if self.enabled { + ::visit_mut_export_default_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_default_expr(&mut self, node: &mut ExportDefaultExpr<'a>) { + if self.enabled { + ::visit_mut_export_default_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_default_specifier(&mut self, node: &mut ExportDefaultSpecifier) { + if self.enabled { + ::visit_mut_export_default_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_named_specifier(&mut self, node: &mut ExportNamedSpecifier<'a>) { + if self.enabled { + ::visit_mut_export_named_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_namespace_specifier(&mut self, node: &mut ExportNamespaceSpecifier<'a>) { + if self.enabled { + ::visit_mut_export_namespace_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_specifier(&mut self, node: &mut ExportSpecifier<'a>) { + if self.enabled { + ::visit_mut_export_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_export_specifiers(&mut self, node: &mut Vec<'a, ExportSpecifier<'a>>) { + if self.enabled { + ::visit_mut_export_specifiers(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>) { + if self.enabled { + ::visit_mut_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_expr_or_spread(&mut self, node: &mut ExprOrSpread<'a>) { + if self.enabled { + ::visit_mut_expr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_expr_or_spreads(&mut self, node: &mut Vec<'a, ExprOrSpread<'a>>) { + if self.enabled { + ::visit_mut_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>) { + if self.enabled { + ::visit_mut_expr_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>) { + if self.enabled { + ::visit_mut_exprs(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>) { + if self.enabled { + ::visit_mut_fn_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>) { + if self.enabled { + ::visit_mut_fn_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>) { + if self.enabled { + ::visit_mut_for_head(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>) { + if self.enabled { + ::visit_mut_for_in_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>) { + if self.enabled { + ::visit_mut_for_of_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>) { + if self.enabled { + ::visit_mut_for_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>) { + if self.enabled { + ::visit_mut_function(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>) { + if self.enabled { + ::visit_mut_getter_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident) { + if self.enabled { + ::visit_mut_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName) { + if self.enabled { + ::visit_mut_ident_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>) { + if self.enabled { + ::visit_mut_if_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import) { + if self.enabled { + ::visit_mut_import(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>) { + if self.enabled { + ::visit_mut_import_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_default_specifier(&mut self, node: &mut ImportDefaultSpecifier) { + if self.enabled { + ::visit_mut_import_default_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_named_specifier(&mut self, node: &mut ImportNamedSpecifier<'a>) { + if self.enabled { + ::visit_mut_import_named_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase) { + if self.enabled { + ::visit_mut_import_phase(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_specifier(&mut self, node: &mut ImportSpecifier<'a>) { + if self.enabled { + ::visit_mut_import_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_specifiers(&mut self, node: &mut Vec<'a, ImportSpecifier<'a>>) { + if self.enabled { + ::visit_mut_import_specifiers(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_star_as_specifier(&mut self, node: &mut ImportStarAsSpecifier) { + if self.enabled { + ::visit_mut_import_star_as_specifier(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>) { + if self.enabled { + ::visit_mut_import_with(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_with_item(&mut self, node: &mut ImportWithItem) { + if self.enabled { + ::visit_mut_import_with_item(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_import_with_items(&mut self, node: &mut Vec<'a, ImportWithItem>) { + if self.enabled { + ::visit_mut_import_with_items(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid) { + if self.enabled { + ::visit_mut_invalid(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>) { + if self.enabled { + ::visit_mut_jsx_attr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_name(&mut self, node: &mut JSXAttrName<'a>) { + if self.enabled { + ::visit_mut_jsx_attr_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spread(&mut self, node: &mut JSXAttrOrSpread<'a>) { + if self.enabled { + ::visit_mut_jsx_attr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads(&mut self, node: &mut Vec<'a, JSXAttrOrSpread<'a>>) { + if self.enabled { + ::visit_mut_jsx_attr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_value(&mut self, node: &mut JSXAttrValue<'a>) { + if self.enabled { + ::visit_mut_jsx_attr_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_closing_element(&mut self, node: &mut JSXClosingElement<'a>) { + if self.enabled { + ::visit_mut_jsx_closing_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_closing_fragment(&mut self, node: &mut JSXClosingFragment) { + if self.enabled { + ::visit_mut_jsx_closing_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>) { + if self.enabled { + ::visit_mut_jsx_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_child(&mut self, node: &mut JSXElementChild<'a>) { + if self.enabled { + ::visit_mut_jsx_element_child(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_childs(&mut self, node: &mut Vec<'a, JSXElementChild<'a>>) { + if self.enabled { + ::visit_mut_jsx_element_childs(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_name(&mut self, node: &mut JSXElementName<'a>) { + if self.enabled { + ::visit_mut_jsx_element_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr) { + if self.enabled { + ::visit_mut_jsx_empty_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>) { + if self.enabled { + ::visit_mut_jsx_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_expr_container(&mut self, node: &mut JSXExprContainer<'a>) { + if self.enabled { + ::visit_mut_jsx_expr_container(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>) { + if self.enabled { + ::visit_mut_jsx_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_member_expr(&mut self, node: &mut JSXMemberExpr<'a>) { + if self.enabled { + ::visit_mut_jsx_member_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_namespaced_name(&mut self, node: &mut JSXNamespacedName) { + if self.enabled { + ::visit_mut_jsx_namespaced_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>) { + if self.enabled { + ::visit_mut_jsx_object(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement<'a>) { + if self.enabled { + ::visit_mut_jsx_opening_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_opening_fragment(&mut self, node: &mut JSXOpeningFragment) { + if self.enabled { + ::visit_mut_jsx_opening_fragment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_spread_child(&mut self, node: &mut JSXSpreadChild<'a>) { + if self.enabled { + ::visit_mut_jsx_spread_child(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText) { + if self.enabled { + ::visit_mut_jsx_text(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>) { + if self.enabled { + ::visit_mut_key(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_key_value_pat_prop(&mut self, node: &mut KeyValuePatProp<'a>) { + if self.enabled { + ::visit_mut_key_value_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_key_value_prop(&mut self, node: &mut KeyValueProp<'a>) { + if self.enabled { + ::visit_mut_key_value_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>) { + if self.enabled { + ::visit_mut_labeled_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>) { + if self.enabled { + ::visit_mut_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>) { + if self.enabled { + ::visit_mut_member_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>) { + if self.enabled { + ::visit_mut_member_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr) { + if self.enabled { + ::visit_mut_meta_prop_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind) { + if self.enabled { + ::visit_mut_meta_prop_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind) { + if self.enabled { + ::visit_mut_method_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>) { + if self.enabled { + ::visit_mut_method_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + if self.enabled { + ::visit_mut_module(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>) { + if self.enabled { + ::visit_mut_module_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_module_export_name(&mut self, node: &mut ModuleExportName<'a>) { + if self.enabled { + ::visit_mut_module_export_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>) { + if self.enabled { + ::visit_mut_module_item(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_module_items(&mut self, node: &mut Vec<'a, ModuleItem<'a>>) { + if self.enabled { + ::visit_mut_module_items(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>) { + if self.enabled { + ::visit_mut_named_export(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>) { + if self.enabled { + ::visit_mut_new_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null) { + if self.enabled { + ::visit_mut_null(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number) { + if self.enabled { + ::visit_mut_number(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>) { + if self.enabled { + ::visit_mut_object_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>) { + if self.enabled { + ::visit_mut_object_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_object_pat_prop(&mut self, node: &mut ObjectPatProp<'a>) { + if self.enabled { + ::visit_mut_object_pat_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_object_pat_props(&mut self, node: &mut Vec<'a, ObjectPatProp<'a>>) { + if self.enabled { + ::visit_mut_object_pat_props(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_accessibility(&mut self, node: &mut Option) { + if self.enabled { + ::visit_mut_opt_accessibility(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_atom(&mut self, node: &mut Option) { + if self.enabled { + ::visit_mut_opt_atom(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_block_stmt(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_block_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>) { + if self.enabled { + ::visit_mut_opt_call(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_catch_clause(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_catch_clause(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_chain_base(&mut self, node: &mut OptChainBase<'a>) { + if self.enabled { + ::visit_mut_opt_chain_base(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_chain_expr(&mut self, node: &mut OptChainExpr<'a>) { + if self.enabled { + ::visit_mut_opt_chain_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr_or_spread(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_expr_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr_or_spreads(&mut self, node: &mut Option>>) { + if self.enabled { + ::visit_mut_opt_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option) { + if self.enabled { + ::visit_mut_opt_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_jsx_attr_value(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_jsx_attr_value(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_jsx_closing_element(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_jsx_closing_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_module_export_name(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_module_export_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_object_lit(&mut self, node: &mut Option>>) { + if self.enabled { + ::visit_mut_opt_object_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_span(&mut self, node: &mut Option) { + if self.enabled { + ::visit_mut_opt_span(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_str(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_true_plus_minus(&mut self, node: &mut Option) { + if self.enabled { + ::visit_mut_opt_true_plus_minus(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_entity_name(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_ts_entity_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_namespace_body(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_ts_namespace_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_ts_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_ann(&mut self, node: &mut Option>>) { + if self.enabled { + ::visit_mut_opt_ts_type_ann(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + ) { + if self.enabled { + ::visit_mut_opt_ts_type_param_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + ) { + if self.enabled { + ::visit_mut_opt_ts_type_param_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr(&mut self, node: &mut Option>) { + if self.enabled { + ::visit_mut_opt_var_decl_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads(&mut self, node: &mut Vec<'a, Option>>) { + if self.enabled { + ::visit_mut_opt_vec_expr_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_opt_vec_pats(&mut self, node: &mut Vec<'a, Option>>) { + if self.enabled { + ::visit_mut_opt_vec_pats(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>) { + if self.enabled { + ::visit_mut_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_param_or_ts_param_prop(&mut self, node: &mut ParamOrTsParamProp<'a>) { + if self.enabled { + ::visit_mut_param_or_ts_param_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_param_or_ts_param_props(&mut self, node: &mut Vec<'a, ParamOrTsParamProp<'a>>) { + if self.enabled { + ::visit_mut_param_or_ts_param_props(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>) { + if self.enabled { + ::visit_mut_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>) { + if self.enabled { + ::visit_mut_paren_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>) { + if self.enabled { + ::visit_mut_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>) { + if self.enabled { + ::visit_mut_pats(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_private_method(&mut self, node: &mut PrivateMethod<'a>) { + if self.enabled { + ::visit_mut_private_method(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName) { + if self.enabled { + ::visit_mut_private_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>) { + if self.enabled { + ::visit_mut_private_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + if self.enabled { + ::visit_mut_program(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>) { + if self.enabled { + ::visit_mut_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>) { + if self.enabled { + ::visit_mut_prop_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_prop_or_spread(&mut self, node: &mut PropOrSpread<'a>) { + if self.enabled { + ::visit_mut_prop_or_spread(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_prop_or_spreads(&mut self, node: &mut Vec<'a, PropOrSpread<'a>>) { + if self.enabled { + ::visit_mut_prop_or_spreads(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex) { + if self.enabled { + ::visit_mut_regex(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>) { + if self.enabled { + ::visit_mut_rest_pat(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>) { + if self.enabled { + ::visit_mut_return_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + if self.enabled { + ::visit_mut_script(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>) { + if self.enabled { + ::visit_mut_seq_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>) { + if self.enabled { + ::visit_mut_setter_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_simple_assign_target(&mut self, node: &mut SimpleAssignTarget<'a>) { + if self.enabled { + ::visit_mut_simple_assign_target(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span) { + if self.enabled { + ::visit_mut_span(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_spread_element(&mut self, node: &mut SpreadElement<'a>) { + if self.enabled { + ::visit_mut_spread_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>) { + if self.enabled { + ::visit_mut_static_block(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>) { + if self.enabled { + ::visit_mut_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>) { + if self.enabled { + ::visit_mut_stmts(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str) { + if self.enabled { + ::visit_mut_str(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super) { + if self.enabled { + ::visit_mut_super(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>) { + if self.enabled { + ::visit_mut_super_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_super_prop_expr(&mut self, node: &mut SuperPropExpr<'a>) { + if self.enabled { + ::visit_mut_super_prop_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>) { + if self.enabled { + ::visit_mut_switch_case(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_switch_cases(&mut self, node: &mut Vec<'a, SwitchCase<'a>>) { + if self.enabled { + ::visit_mut_switch_cases(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>) { + if self.enabled { + ::visit_mut_switch_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_syntax_context(&mut self, node: &mut swc_common::SyntaxContext) { + if self.enabled { + ::visit_mut_syntax_context(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>) { + if self.enabled { + ::visit_mut_tagged_tpl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr) { + if self.enabled { + ::visit_mut_this_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>) { + if self.enabled { + ::visit_mut_throw_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>) { + if self.enabled { + ::visit_mut_tpl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement) { + if self.enabled { + ::visit_mut_tpl_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_tpl_elements(&mut self, node: &mut Vec<'a, TplElement>) { + if self.enabled { + ::visit_mut_tpl_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_true_plus_minus(&mut self, node: &mut TruePlusMinus) { + if self.enabled { + ::visit_mut_true_plus_minus(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>) { + if self.enabled { + ::visit_mut_try_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_array_type(&mut self, node: &mut TsArrayType<'a>) { + if self.enabled { + ::visit_mut_ts_array_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>) { + if self.enabled { + ::visit_mut_ts_as_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_call_signature_decl(&mut self, node: &mut TsCallSignatureDecl<'a>) { + if self.enabled { + ::visit_mut_ts_call_signature_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_conditional_type(&mut self, node: &mut TsConditionalType<'a>) { + if self.enabled { + ::visit_mut_ts_conditional_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_const_assertion(&mut self, node: &mut TsConstAssertion<'a>) { + if self.enabled { + ::visit_mut_ts_const_assertion(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_construct_signature_decl(&mut self, node: &mut TsConstructSignatureDecl<'a>) { + if self.enabled { + ::visit_mut_ts_construct_signature_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_constructor_type(&mut self, node: &mut TsConstructorType<'a>) { + if self.enabled { + ::visit_mut_ts_constructor_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_entity_name(&mut self, node: &mut TsEntityName<'a>) { + if self.enabled { + ::visit_mut_ts_entity_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>) { + if self.enabled { + ::visit_mut_ts_enum_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_member(&mut self, node: &mut TsEnumMember<'a>) { + if self.enabled { + ::visit_mut_ts_enum_member(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_member_id(&mut self, node: &mut TsEnumMemberId<'a>) { + if self.enabled { + ::visit_mut_ts_enum_member_id(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_members(&mut self, node: &mut Vec<'a, TsEnumMember<'a>>) { + if self.enabled { + ::visit_mut_ts_enum_members(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_export_assignment(&mut self, node: &mut TsExportAssignment<'a>) { + if self.enabled { + ::visit_mut_ts_export_assignment(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_args(&mut self, node: &mut TsExprWithTypeArgs<'a>) { + if self.enabled { + ::visit_mut_ts_expr_with_type_args(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss(&mut self, node: &mut Vec<'a, TsExprWithTypeArgs<'a>>) { + if self.enabled { + ::visit_mut_ts_expr_with_type_argss(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_external_module_ref(&mut self, node: &mut TsExternalModuleRef) { + if self.enabled { + ::visit_mut_ts_external_module_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type(&mut self, node: &mut TsFnOrConstructorType<'a>) { + if self.enabled { + ::visit_mut_ts_fn_or_constructor_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>) { + if self.enabled { + ::visit_mut_ts_fn_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_params(&mut self, node: &mut Vec<'a, TsFnParam<'a>>) { + if self.enabled { + ::visit_mut_ts_fn_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>) { + if self.enabled { + ::visit_mut_ts_fn_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_getter_signature(&mut self, node: &mut TsGetterSignature<'a>) { + if self.enabled { + ::visit_mut_ts_getter_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_import_equals_decl(&mut self, node: &mut TsImportEqualsDecl<'a>) { + if self.enabled { + ::visit_mut_ts_import_equals_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_import_type(&mut self, node: &mut TsImportType<'a>) { + if self.enabled { + ::visit_mut_ts_import_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_index_signature(&mut self, node: &mut TsIndexSignature<'a>) { + if self.enabled { + ::visit_mut_ts_index_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_indexed_access_type(&mut self, node: &mut TsIndexedAccessType<'a>) { + if self.enabled { + ::visit_mut_ts_indexed_access_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_infer_type(&mut self, node: &mut TsInferType<'a>) { + if self.enabled { + ::visit_mut_ts_infer_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_instantiation(&mut self, node: &mut TsInstantiation<'a>) { + if self.enabled { + ::visit_mut_ts_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_interface_body(&mut self, node: &mut TsInterfaceBody<'a>) { + if self.enabled { + ::visit_mut_ts_interface_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_interface_decl(&mut self, node: &mut TsInterfaceDecl<'a>) { + if self.enabled { + ::visit_mut_ts_interface_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_intersection_type(&mut self, node: &mut TsIntersectionType<'a>) { + if self.enabled { + ::visit_mut_ts_intersection_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_keyword_type(&mut self, node: &mut TsKeywordType) { + if self.enabled { + ::visit_mut_ts_keyword_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_keyword_type_kind(&mut self, node: &mut TsKeywordTypeKind) { + if self.enabled { + ::visit_mut_ts_keyword_type_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>) { + if self.enabled { + ::visit_mut_ts_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>) { + if self.enabled { + ::visit_mut_ts_lit_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_mapped_type(&mut self, node: &mut TsMappedType<'a>) { + if self.enabled { + ::visit_mut_ts_mapped_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_method_signature(&mut self, node: &mut TsMethodSignature<'a>) { + if self.enabled { + ::visit_mut_ts_method_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_block(&mut self, node: &mut TsModuleBlock<'a>) { + if self.enabled { + ::visit_mut_ts_module_block(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_decl(&mut self, node: &mut TsModuleDecl<'a>) { + if self.enabled { + ::visit_mut_ts_module_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_name(&mut self, node: &mut TsModuleName<'a>) { + if self.enabled { + ::visit_mut_ts_module_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_ref(&mut self, node: &mut TsModuleRef<'a>) { + if self.enabled { + ::visit_mut_ts_module_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_body(&mut self, node: &mut TsNamespaceBody<'a>) { + if self.enabled { + ::visit_mut_ts_namespace_body(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_decl(&mut self, node: &mut TsNamespaceDecl<'a>) { + if self.enabled { + ::visit_mut_ts_namespace_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_export_decl(&mut self, node: &mut TsNamespaceExportDecl) { + if self.enabled { + ::visit_mut_ts_namespace_export_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_non_null_expr(&mut self, node: &mut TsNonNullExpr<'a>) { + if self.enabled { + ::visit_mut_ts_non_null_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_optional_type(&mut self, node: &mut TsOptionalType<'a>) { + if self.enabled { + ::visit_mut_ts_optional_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_param_prop(&mut self, node: &mut TsParamProp<'a>) { + if self.enabled { + ::visit_mut_ts_param_prop(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_param_prop_param(&mut self, node: &mut TsParamPropParam<'a>) { + if self.enabled { + ::visit_mut_ts_param_prop_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_parenthesized_type(&mut self, node: &mut TsParenthesizedType<'a>) { + if self.enabled { + ::visit_mut_ts_parenthesized_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_property_signature(&mut self, node: &mut TsPropertySignature<'a>) { + if self.enabled { + ::visit_mut_ts_property_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_qualified_name(&mut self, node: &mut TsQualifiedName<'a>) { + if self.enabled { + ::visit_mut_ts_qualified_name(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>) { + if self.enabled { + ::visit_mut_ts_rest_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_satisfies_expr(&mut self, node: &mut TsSatisfiesExpr<'a>) { + if self.enabled { + ::visit_mut_ts_satisfies_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_setter_signature(&mut self, node: &mut TsSetterSignature<'a>) { + if self.enabled { + ::visit_mut_ts_setter_signature(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType) { + if self.enabled { + ::visit_mut_ts_this_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_this_type_or_ident(&mut self, node: &mut TsThisTypeOrIdent<'a>) { + if self.enabled { + ::visit_mut_ts_this_type_or_ident(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_tpl_lit_type(&mut self, node: &mut TsTplLitType<'a>) { + if self.enabled { + ::visit_mut_ts_tpl_lit_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_element(&mut self, node: &mut TsTupleElement<'a>) { + if self.enabled { + ::visit_mut_ts_tuple_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_elements(&mut self, node: &mut Vec<'a, TsTupleElement<'a>>) { + if self.enabled { + ::visit_mut_ts_tuple_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_type(&mut self, node: &mut TsTupleType<'a>) { + if self.enabled { + ::visit_mut_ts_tuple_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>) { + if self.enabled { + ::visit_mut_ts_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_alias_decl(&mut self, node: &mut TsTypeAliasDecl<'a>) { + if self.enabled { + ::visit_mut_ts_type_alias_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>) { + if self.enabled { + ::visit_mut_ts_type_ann(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_assertion(&mut self, node: &mut TsTypeAssertion<'a>) { + if self.enabled { + ::visit_mut_ts_type_assertion(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_element(&mut self, node: &mut TsTypeElement<'a>) { + if self.enabled { + ::visit_mut_ts_type_element(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_elements(&mut self, node: &mut Vec<'a, TsTypeElement<'a>>) { + if self.enabled { + ::visit_mut_ts_type_elements(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>) { + if self.enabled { + ::visit_mut_ts_type_lit(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_operator(&mut self, node: &mut TsTypeOperator<'a>) { + if self.enabled { + ::visit_mut_ts_type_operator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_operator_op(&mut self, node: &mut TsTypeOperatorOp) { + if self.enabled { + ::visit_mut_ts_type_operator_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param(&mut self, node: &mut TsTypeParam<'a>) { + if self.enabled { + ::visit_mut_ts_type_param(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param_decl(&mut self, node: &mut TsTypeParamDecl<'a>) { + if self.enabled { + ::visit_mut_ts_type_param_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param_instantiation(&mut self, node: &mut TsTypeParamInstantiation<'a>) { + if self.enabled { + ::visit_mut_ts_type_param_instantiation(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_params(&mut self, node: &mut Vec<'a, TsTypeParam<'a>>) { + if self.enabled { + ::visit_mut_ts_type_params(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_predicate(&mut self, node: &mut TsTypePredicate<'a>) { + if self.enabled { + ::visit_mut_ts_type_predicate(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_query(&mut self, node: &mut TsTypeQuery<'a>) { + if self.enabled { + ::visit_mut_ts_type_query(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_query_expr(&mut self, node: &mut TsTypeQueryExpr<'a>) { + if self.enabled { + ::visit_mut_ts_type_query_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>) { + if self.enabled { + ::visit_mut_ts_type_ref(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>) { + if self.enabled { + ::visit_mut_ts_types(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + ) { + if self.enabled { + ::visit_mut_ts_union_or_intersection_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_ts_union_type(&mut self, node: &mut TsUnionType<'a>) { + if self.enabled { + ::visit_mut_ts_union_type(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>) { + if self.enabled { + ::visit_mut_unary_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp) { + if self.enabled { + ::visit_mut_unary_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>) { + if self.enabled { + ::visit_mut_update_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp) { + if self.enabled { + ::visit_mut_update_op(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>) { + if self.enabled { + ::visit_mut_using_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>) { + if self.enabled { + ::visit_mut_var_decl(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind) { + if self.enabled { + ::visit_mut_var_decl_kind(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_var_decl_or_expr(&mut self, node: &mut VarDeclOrExpr<'a>) { + if self.enabled { + ::visit_mut_var_decl_or_expr(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_var_declarator(&mut self, node: &mut VarDeclarator<'a>) { + if self.enabled { + ::visit_mut_var_declarator(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_var_declarators(&mut self, node: &mut Vec<'a, VarDeclarator<'a>>) { + if self.enabled { + ::visit_mut_var_declarators(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>) { + if self.enabled { + ::visit_mut_while_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>) { + if self.enabled { + ::visit_mut_with_stmt(&mut self.visitor, node) + } else { + } + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>) { + if self.enabled { + ::visit_mut_yield_expr(&mut self.visitor, node) + } else { + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +pub trait VisitMutWith<'a, V: ?Sized + VisitMut<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn visit_mut_with(&mut self, visitor: &mut V); + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn visit_mut_children_with(&mut self, visitor: &mut V); +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Accessibility { + #[doc = "Calls [VisitMut`::visit_mut_accessibility`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_accessibility(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Accessibility::Public => {} + Accessibility::Protected => {} + Accessibility::Private => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ArrayLit<'a> { + #[doc = "Calls [VisitMut`::visit_mut_array_lit`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_array_lit(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ArrayLit { span, elems } => { + { + >::visit_mut_with(span, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + elems, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ArrayPat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_array_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_array_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with(elems, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_arrow_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_arrow_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + >> as VisitMutWith>::visit_mut_with( + return_type, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(op, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + as VisitMutWith>::visit_mut_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignPat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignPat { span, left, right } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + as VisitMutWith>::visit_mut_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_pat_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_pat_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignPatProp { span, key, value } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignProp { span, key, value } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(key, visitor) + }; + { + as VisitMutWith>::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignTarget<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_target`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_target(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignTarget::Simple { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + AssignTarget::Pat { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_assign_target_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_target_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + AssignTargetPat::Object { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + AssignTargetPat::Invalid { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [VisitMut`::visit_mut_auto_accessor`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_auto_accessor(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(value, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_await_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_await_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + AwaitExpr { span, arg } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BigInt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_big_int`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_big_int(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BigInt { span, value, raw } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(value, visitor) + }; + { + as VisitMutWith>::visit_mut_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BinExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_bin_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_bin_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BinExpr { + span, + op, + left, + right, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(op, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + as VisitMutWith>::visit_mut_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BindingIdent<'a> { + #[doc = "Calls [VisitMut`::visit_mut_binding_ident`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_binding_ident(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BindingIdent { id, type_ann } => { + { + >::visit_mut_with(id, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BlockStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_block_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_block_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BlockStmt { span, ctxt, stmts } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(stmts, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_block_stmt_or_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_block_stmt_or_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Bool { + #[doc = "Calls [VisitMut`::visit_mut_bool`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_bool(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Bool { span, value } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BreakStmt { + #[doc = "Calls [VisitMut`::visit_mut_break_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_break_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + BreakStmt { span, label } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(label, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for CallExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_call_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_call_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + as VisitMutWith>::visit_mut_with(callee, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(args, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Callee<'a> { + #[doc = "Calls [VisitMut`::visit_mut_callee`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_callee(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Callee::Super { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Callee::Import { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Callee::Expr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for CatchClause<'a> { + #[doc = "Calls [VisitMut`::visit_mut_catch_clause`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_catch_clause(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + CatchClause { span, param, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(param, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Class<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(super_class, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (super_type_params , visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + implements, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ClassDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ClassDecl { + ident, + declare, + class, + } => { + { + >::visit_mut_with(ident, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(class, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ClassExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ClassExpr { ident, class } => { + { + as VisitMutWith>::visit_mut_with(ident, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(class, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ClassMember<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class_member`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_member(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ClassMember::Constructor { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::Method { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::PrivateMethod { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::ClassProp { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::PrivateProp { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ClassMember::Empty { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::StaticBlock { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ClassMember::AutoAccessor { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ClassMethod<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class_method`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_method(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(function, visitor) + }; + { + >::visit_mut_with(kind, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ClassProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_class_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(value, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_computed_prop_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_computed_prop_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ComputedPropName { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for CondExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_cond_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_cond_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + as VisitMutWith>::visit_mut_with(cons, visitor) + }; + { + as VisitMutWith>::visit_mut_with(alt, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Constructor<'a> { + #[doc = "Calls [VisitMut`::visit_mut_constructor`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_constructor(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + params, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ContinueStmt { + #[doc = "Calls [VisitMut`::visit_mut_continue_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_continue_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ContinueStmt { span, label } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(label, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for DebuggerStmt { + #[doc = "Calls [VisitMut`::visit_mut_debugger_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_debugger_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + DebuggerStmt { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Decl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Decl::Class { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Decl::Fn { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Decl::Var { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Decl::Using { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Decl::TsInterface { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Decl::TsTypeAlias { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Decl::TsEnum { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Decl::TsModule { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Decorator<'a> { + #[doc = "Calls [VisitMut`::visit_mut_decorator`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_decorator(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Decorator { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_default_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_default_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + DefaultDecl::Class { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + DefaultDecl::Fn { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_do_while_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_do_while_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + DoWhileStmt { span, test, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for EmptyStmt { + #[doc = "Calls [VisitMut`::visit_mut_empty_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_empty_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + EmptyStmt { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportAll<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_all`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_all(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(src, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + with, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportDecl { span, decl } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(decl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_default_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_default_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportDefaultDecl { span, decl } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(decl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_default_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_default_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportDefaultExpr { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [VisitMut`::visit_mut_export_default_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_default_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportDefaultSpecifier { exported } => { + { + >::visit_mut_with(exported, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_named_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_named_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(orig, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + exported, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportNamespaceSpecifier<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_namespace_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_namespace_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportNamespaceSpecifier { span, name } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [VisitMut`::visit_mut_export_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ExportSpecifier::Default { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ExportSpecifier::Named { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Expr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Expr::This { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Array { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Object { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Fn { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Unary { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Update { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Bin { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Assign { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Member { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::SuperProp { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Cond { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Call { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::New { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Seq { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Lit { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Tpl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::TaggedTpl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Arrow { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Class { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Yield { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::MetaProp { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Await { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Paren { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::JSXMember { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::JSXNamespacedName { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::JSXEmpty { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::JSXElement { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::JSXFragment { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::TsTypeAssertion { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Expr::TsConstAssertion { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Expr::TsNonNull { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::TsAs { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::TsInstantiation { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Expr::TsSatisfies { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + Expr::PrivateName { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::OptChain { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Expr::Invalid { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [VisitMut`::visit_mut_expr_or_spread`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_expr_or_spread(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExprOrSpread { spread, expr } => { + { + as VisitMutWith>::visit_mut_with(spread, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ExprStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_expr_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_expr_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ExprStmt { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for FnDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_fn_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_fn_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + FnDecl { + ident, + declare, + function, + } => { + { + >::visit_mut_with(ident, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for FnExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_fn_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_fn_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + FnExpr { ident, function } => { + { + as VisitMutWith>::visit_mut_with(ident, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ForHead<'a> { + #[doc = "Calls [VisitMut`::visit_mut_for_head`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_for_head(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ForHead::VarDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ForHead::UsingDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ForHead::Pat { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ForInStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_for_in_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_for_in_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + as VisitMutWith>::visit_mut_with(right, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_for_of_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_for_of_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + as VisitMutWith>::visit_mut_with(right, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ForStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_for_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_for_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(init, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(update, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Function<'a> { + #[doc = "Calls [VisitMut`::visit_mut_function`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_function(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + >> as VisitMutWith>::visit_mut_with( + return_type, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for GetterProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_getter_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_getter_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Ident { + #[doc = "Calls [VisitMut`::visit_mut_ident`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ident(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + >::visit_mut_with(sym, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for IdentName { + #[doc = "Calls [VisitMut`::visit_mut_ident_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ident_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + IdentName { span, sym } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(sym, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for IfStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_if_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_if_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + as VisitMutWith>::visit_mut_with(cons, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(alt, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Import { + #[doc = "Calls [VisitMut`::visit_mut_import`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Import { span, phase } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(phase, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_import_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + specifiers, visitor, + ) + }; + { + as VisitMutWith>::visit_mut_with(src, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + with, visitor, + ) + }; + { + >::visit_mut_with(phase, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [VisitMut`::visit_mut_import_default_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_default_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportDefaultSpecifier { span, local } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(local, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [VisitMut`::visit_mut_import_named_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_named_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(local, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + imported, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportPhase { + #[doc = "Calls [VisitMut`::visit_mut_import_phase`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_phase(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportPhase::Evaluation => {} + ImportPhase::Source => {} + ImportPhase::Defer => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [VisitMut`::visit_mut_import_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ImportSpecifier::Default { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ImportSpecifier::Namespace { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [VisitMut`::visit_mut_import_star_as_specifier`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_star_as_specifier(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportStarAsSpecifier { span, local } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(local, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportWith<'a> { + #[doc = "Calls [VisitMut`::visit_mut_import_with`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_with(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportWith { span, values } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(values, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ImportWithItem { + #[doc = "Calls [VisitMut`::visit_mut_import_with_item`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_with_item(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ImportWithItem { key, value } => { + { + >::visit_mut_with(key, visitor) + }; + { + >::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Invalid { + #[doc = "Calls [VisitMut`::visit_mut_invalid`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_invalid(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Invalid { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXAttr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_attr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_attr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXAttr { span, name, value } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(name, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_attr_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_attr_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_attr_or_spread`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_attr_or_spread(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_attr_value`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_attr_value(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_closing_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_closing_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXClosingElement { span, name } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXClosingFragment { + #[doc = "Calls [VisitMut`::visit_mut_jsx_closing_fragment`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_closing_fragment(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXClosingFragment { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(opening, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + children, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with( + closing, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_element_child`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_element_child(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXElementChild::JSXElement { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXElementName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_element_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_element_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXElementName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXEmptyExpr { + #[doc = "Calls [VisitMut`::visit_mut_jsx_empty_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_empty_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXEmptyExpr { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXExpr::Expr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_expr_container`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_expr_container(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXExprContainer { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXFragment<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_fragment`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_fragment(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(opening, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + children, visitor, + ) + }; + { + >::visit_mut_with(closing, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_member_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_member_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXMemberExpr { span, obj, prop } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(obj, visitor) + }; + { + >::visit_mut_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXNamespacedName { + #[doc = "Calls [VisitMut`::visit_mut_jsx_namespaced_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_namespaced_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXNamespacedName { span, ns, name } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ns, visitor) + }; + { + >::visit_mut_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXObject<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_object`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_object(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + JSXObject::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_opening_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_opening_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + { + as VisitMutWith>::visit_mut_with(name, visitor) + }; + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + attrs, visitor, + ) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXOpeningFragment { + #[doc = "Calls [VisitMut`::visit_mut_jsx_opening_fragment`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_opening_fragment(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXOpeningFragment { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_spread_child`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_spread_child(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXSpreadChild { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for JSXText { + #[doc = "Calls [VisitMut`::visit_mut_jsx_text`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_text(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + JSXText { span, value, raw } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(value, visitor) + }; + { + >::visit_mut_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Key<'a> { + #[doc = "Calls [VisitMut`::visit_mut_key`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_key(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Key::Private { 0: _field_0 } => { + >::visit_mut_with(_field_0, visitor); + } + Key::Public { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_key_value_pat_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_key_value_pat_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + KeyValuePatProp { key, value } => { + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + as VisitMutWith>::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_key_value_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_key_value_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + KeyValueProp { key, value } => { + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + as VisitMutWith>::visit_mut_with(value, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_labeled_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_labeled_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + LabeledStmt { span, label, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(label, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Lit<'a> { + #[doc = "Calls [VisitMut`::visit_mut_lit`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_lit(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Lit::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::Bool { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::Null { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::Num { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::BigInt { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::Regex { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Lit::JSXText { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MemberExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_member_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_member_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MemberExpr { span, obj, prop } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(obj, visitor) + }; + { + as VisitMutWith>::visit_mut_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MemberProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_member_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_member_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MemberProp::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + MemberProp::PrivateName { 0: _field_0 } => { + >::visit_mut_with(_field_0, visitor); + } + MemberProp::Computed { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MetaPropExpr { + #[doc = "Calls [VisitMut`::visit_mut_meta_prop_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_meta_prop_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MetaPropExpr { span, kind } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(kind, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MetaPropKind { + #[doc = "Calls [VisitMut`::visit_mut_meta_prop_kind`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_meta_prop_kind(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MetaPropKind::NewTarget => {} + MetaPropKind::ImportMeta => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MethodKind { + #[doc = "Calls [VisitMut`::visit_mut_method_kind`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_method_kind(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MethodKind::Method => {} + MethodKind::Getter => {} + MethodKind::Setter => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for MethodProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_method_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_method_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + MethodProp { key, function } => { + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(function, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Module<'a> { + #[doc = "Calls [VisitMut`::visit_mut_module`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_module(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Module { + span, + body, + shebang, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + as VisitMutWith>::visit_mut_with(shebang, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_module_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_module_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ModuleDecl::Import { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ModuleDecl::ExportAll { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_module_export_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_module_export_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleExportName::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ModuleItem<'a> { + #[doc = "Calls [VisitMut`::visit_mut_module_item`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_module_item(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ModuleItem::Stmt { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for NamedExport<'a> { + #[doc = "Calls [VisitMut`::visit_mut_named_export`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_named_export(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + specifiers, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(src, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + with, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for NewExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_new_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_new_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + as VisitMutWith>::visit_mut_with(callee, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + args, visitor, + ) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Null { + #[doc = "Calls [VisitMut`::visit_mut_null`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_null(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Null { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Number { + #[doc = "Calls [VisitMut`::visit_mut_number`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_number(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Number { span, value, raw } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ObjectLit<'a> { + #[doc = "Calls [VisitMut`::visit_mut_object_lit`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_object_lit(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ObjectLit { span, props } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(props, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ObjectPat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_object_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_object_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(props, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_object_pat_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_object_pat_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + ObjectPatProp::Assign { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ObjectPatProp::Rest { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for OptCall<'a> { + #[doc = "Calls [VisitMut`::visit_mut_opt_call`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_call(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + as VisitMutWith>::visit_mut_with(callee, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(args, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for OptChainBase<'a> { + #[doc = "Calls [VisitMut`::visit_mut_opt_chain_base`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_chain_base(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + OptChainBase::Member { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + OptChainBase::Call { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_opt_chain_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_chain_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + OptChainExpr { + span, + optional, + base, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(base, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Param<'a> { + #[doc = "Calls [VisitMut`::visit_mut_param`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_param(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Param { + span, + decorators, + pat, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + as VisitMutWith>::visit_mut_with(pat, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_param_or_ts_param_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_param_or_ts_param_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ParenExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_paren_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_paren_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ParenExpr { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Pat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Pat::Ident { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Array { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Rest { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Object { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Assign { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Invalid { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Pat::Expr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [VisitMut`::visit_mut_private_method`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_private_method(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(function, visitor) + }; + { + >::visit_mut_with(kind, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for PrivateName { + #[doc = "Calls [VisitMut`::visit_mut_private_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_private_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + PrivateName { span, name } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(name, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for PrivateProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_private_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_private_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + >::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(value, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Program<'a> { + #[doc = "Calls [VisitMut`::visit_mut_program`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_program(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Program::Module { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Program::Script { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Prop<'a> { + #[doc = "Calls [VisitMut`::visit_mut_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Prop::Shorthand { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Prop::KeyValue { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Prop::Assign { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Prop::Getter { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Prop::Setter { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Prop::Method { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for PropName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_prop_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_prop_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + PropName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + PropName::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + PropName::Num { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + PropName::Computed { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + PropName::BigInt { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [VisitMut`::visit_mut_prop_or_spread`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_prop_or_spread(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + PropOrSpread::Prop { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Regex { + #[doc = "Calls [VisitMut`::visit_mut_regex`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_regex(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Regex { span, exp, flags } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(exp, visitor) + }; + { + >::visit_mut_with(flags, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for RestPat<'a> { + #[doc = "Calls [VisitMut`::visit_mut_rest_pat`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_rest_pat(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(dot3_token, visitor) + }; + { + as VisitMutWith>::visit_mut_with(arg, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_return_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_return_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ReturnStmt { span, arg } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Script<'a> { + #[doc = "Calls [VisitMut`::visit_mut_script`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_script(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Script { + span, + body, + shebang, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + { + as VisitMutWith>::visit_mut_with(shebang, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SeqExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_seq_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_seq_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SeqExpr { span, exprs } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(exprs, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SetterProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_setter_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_setter_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(this_param, visitor) + }; + { + as VisitMutWith>::visit_mut_with(param, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [VisitMut`::visit_mut_simple_assign_target`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_simple_assign_target(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::Member { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SpreadElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_spread_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_spread_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SpreadElement { dot3_token, expr } => { + { + >::visit_mut_with(dot3_token, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for StaticBlock<'a> { + #[doc = "Calls [VisitMut`::visit_mut_static_block`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_static_block(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + StaticBlock { span, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Stmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Stmt::Block { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Empty { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Debugger { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::With { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Return { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Labeled { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Break { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Continue { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::If { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Switch { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Throw { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Try { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::While { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::DoWhile { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::For { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::ForIn { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::ForOf { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Decl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + Stmt::Expr { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Str { + #[doc = "Calls [VisitMut`::visit_mut_str`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_str(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Str { span, value, raw } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(value, visitor) + }; + { + as VisitMutWith>::visit_mut_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Super { + #[doc = "Calls [VisitMut`::visit_mut_super`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_super(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Super { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SuperProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_super_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_super_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SuperProp::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + SuperProp::Computed { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_super_prop_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_super_prop_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SuperPropExpr { span, obj, prop } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(obj, visitor) + }; + { + as VisitMutWith>::visit_mut_with(prop, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SwitchCase<'a> { + #[doc = "Calls [VisitMut`::visit_mut_switch_case`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_switch_case(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SwitchCase { span, test, cons } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(cons, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_switch_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_switch_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(discriminant, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(cases, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_tagged_tpl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_tagged_tpl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + as VisitMutWith>::visit_mut_with(tag, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_params , visitor) + }; + { + > as VisitMutWith>::visit_mut_with(tpl, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ThisExpr { + #[doc = "Calls [VisitMut`::visit_mut_this_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_this_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ThisExpr { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_throw_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_throw_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + ThrowStmt { span, arg } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Tpl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_tpl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_tpl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Tpl { + span, + exprs, + quasis, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(exprs, visitor) + }; + { + as VisitMutWith>::visit_mut_with(quasis, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TplElement { + #[doc = "Calls [VisitMut`::visit_mut_tpl_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_tpl_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(cooked, visitor) + }; + { + >::visit_mut_with(raw, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TruePlusMinus { + #[doc = "Calls [VisitMut`::visit_mut_true_plus_minus`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_true_plus_minus(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TruePlusMinus::True => {} + TruePlusMinus::Plus => {} + TruePlusMinus::Minus => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TryStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_try_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_try_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(block, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(handler, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(finalizer, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsArrayType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_array_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_array_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsArrayType { span, elem_type } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(elem_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_as_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_as_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_call_signature_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_call_signature_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_conditional_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_conditional_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(check_type, visitor) + }; + { + as VisitMutWith>::visit_mut_with(extends_type, visitor) + }; + { + as VisitMutWith>::visit_mut_with(true_type, visitor) + }; + { + as VisitMutWith>::visit_mut_with(false_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_const_assertion`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_const_assertion(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsConstAssertion { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsConstructSignatureDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_construct_signature_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_construct_signature_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_constructor_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_constructor_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsEntityName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_entity_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_entity_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsEntityName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_enum_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_enum_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(members, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_enum_member`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_enum_member(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsEnumMember { span, id, init } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(id, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(init, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_enum_member_id`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_enum_member_id(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsEnumMemberId::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_export_assignment`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_export_assignment(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsExportAssignment { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_expr_with_type_args`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_expr_with_type_args(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsExternalModuleRef { + #[doc = "Calls [VisitMut`::visit_mut_ts_external_module_ref`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_external_module_ref(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsExternalModuleRef { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_fn_or_constructor_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_fn_or_constructor_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsFnParam<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_fn_param`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_fn_param(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsFnParam::Ident { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsFnParam::Array { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsFnParam::Rest { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsFnParam::Object { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsFnType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_fn_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_fn_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_getter_signature`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_getter_signature(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_import_equals_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_import_equals_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + { + as VisitMutWith>::visit_mut_with(module_ref, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsImportType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_import_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_import_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(arg, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + qualifier, visitor, + ) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_index_signature`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_index_signature(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_indexed_access_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_indexed_access_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(obj_type, visitor) + }; + { + as VisitMutWith>::visit_mut_with(index_type, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsInferType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_infer_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_infer_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsInferType { span, type_param } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_instantiation`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_instantiation(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + type_args, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_interface_body`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_interface_body(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsInterfaceBody { span, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_interface_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_interface_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + > as VisitMutWith>::visit_mut_with( + extends, visitor, + ) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_intersection_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_intersection_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsIntersectionType { span, types } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(types, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsKeywordType { + #[doc = "Calls [VisitMut`::visit_mut_ts_keyword_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_keyword_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsKeywordType { span, kind } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(kind, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [VisitMut`::visit_mut_ts_keyword_type_kind`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_keyword_type_kind(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsKeywordTypeKind::TsAnyKeyword => {} + TsKeywordTypeKind::TsUnknownKeyword => {} + TsKeywordTypeKind::TsNumberKeyword => {} + TsKeywordTypeKind::TsObjectKeyword => {} + TsKeywordTypeKind::TsBooleanKeyword => {} + TsKeywordTypeKind::TsBigIntKeyword => {} + TsKeywordTypeKind::TsStringKeyword => {} + TsKeywordTypeKind::TsSymbolKeyword => {} + TsKeywordTypeKind::TsVoidKeyword => {} + TsKeywordTypeKind::TsUndefinedKeyword => {} + TsKeywordTypeKind::TsNullKeyword => {} + TsKeywordTypeKind::TsNeverKeyword => {} + TsKeywordTypeKind::TsIntrinsicKeyword => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsLit<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_lit`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_lit(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsLit::Number { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsLit::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsLit::Bool { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsLit::BigInt { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsLit::Tpl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsLitType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_lit_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_lit_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsLitType { span, lit } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(lit, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsMappedType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_mapped_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_mapped_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(readonly, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_param, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(name_type, visitor) + }; + { + as VisitMutWith>::visit_mut_with(optional, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_method_signature`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_method_signature(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_module_block`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_module_block(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsModuleBlock { span, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_module_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_module_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(id, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsModuleName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_module_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_module_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsModuleName::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsModuleName::Str { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_module_ref`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_module_ref(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_namespace_body`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_namespace_body(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_namespace_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_namespace_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [VisitMut`::visit_mut_ts_namespace_export_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_namespace_export_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsNamespaceExportDecl { span, id } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_non_null_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_non_null_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsNonNullExpr { span, expr } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_optional_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_optional_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsOptionalType { span, type_ann } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsParamProp<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_param_prop`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_param_prop(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decorators, visitor) + }; + { + as VisitMutWith>::visit_mut_with( + accessibility, + visitor, + ) + }; + { + as VisitMutWith>::visit_mut_with(param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_param_prop_param`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_param_prop_param(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsParamPropParam::Assign { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_parenthesized_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_parenthesized_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsParenthesizedType { span, type_ann } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_property_signature`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_property_signature(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_qualified_name`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_qualified_name(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsQualifiedName { span, left, right } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(left, visitor) + }; + { + >::visit_mut_with(right, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsRestType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_rest_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_rest_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsRestType { span, type_ann } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_satisfies_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_satisfies_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_setter_signature`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_setter_signature(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(key, visitor) + }; + { + as VisitMutWith>::visit_mut_with(param, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsThisType { + #[doc = "Calls [VisitMut`::visit_mut_ts_this_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_this_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsThisType { span } => { + { + >::visit_mut_with(span, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_this_type_or_ident`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_this_type_or_ident(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_tpl_lit_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_tpl_lit_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(types, visitor) + }; + { + as VisitMutWith>::visit_mut_with(quasis, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_tuple_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_tuple_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTupleElement { span, label, ty } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(label, visitor) + }; + { + as VisitMutWith>::visit_mut_with(ty, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTupleType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_tuple_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_tuple_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTupleType { span, elem_types } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + elem_types, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsThisType { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsTypeRef { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsTypeQuery { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsTypeLit { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsArrayType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsTupleType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsOptionalType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsRestType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsConditionalType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsInferType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsParenthesizedType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsTypeOperator { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsMappedType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsLitType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsType::TsTypePredicate { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsType::TsImportType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_alias_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_alias_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(id, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_params, + visitor, + ) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_ann`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_ann(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeAnn { span, type_ann } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_assertion`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_assertion(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_element`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_element(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_lit`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_lit(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeLit { span, members } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with( + members, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_operator`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_operator(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeOperator { span, op, type_ann } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(op, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_ann, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_operator_op`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_operator_op(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeOperatorOp::KeyOf => {} + TsTypeOperatorOp::Unique => {} + TsTypeOperatorOp::ReadOnly => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_param`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_param(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(name, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(constraint, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(default, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_param_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_param_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeParamDecl { span, params } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeParamInstantiation<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_param_instantiation`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_param_instantiation(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeParamInstantiation { span, params } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(params, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_predicate`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_predicate(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(param_name, visitor) + }; + { + >> as VisitMutWith>::visit_mut_with( + type_ann, visitor, + ) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_query`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_query(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(expr_name, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_args , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_query_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_query_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_ref`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_ref(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(type_name, visitor) + }; + { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWith < V > > :: visit_mut_with (type_params , visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsUnionOrIntersectionType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_union_or_intersection_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_union_or_intersection_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with( + _field_0, visitor, + ); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for TsUnionType<'a> { + #[doc = "Calls [VisitMut`::visit_mut_ts_union_type`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_union_type(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + TsUnionType { span, types } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(types, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_unary_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_unary_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + UnaryExpr { span, op, arg } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(op, visitor) + }; + { + as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_update_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_update_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(op, visitor) + }; + { + as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for UsingDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_using_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_using_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decls, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for VarDecl<'a> { + #[doc = "Calls [VisitMut`::visit_mut_var_decl`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_var_decl(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + >::visit_mut_with(ctxt, visitor) + }; + { + >::visit_mut_with(kind, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(decls, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for VarDeclKind { + #[doc = "Calls [VisitMut`::visit_mut_var_decl_kind`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_var_decl_kind(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + VarDeclKind::Var => {} + VarDeclKind::Let => {} + VarDeclKind::Const => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_var_decl_or_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_var_decl_or_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + > as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + as VisitMutWith>::visit_mut_with(_field_0, visitor); + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [VisitMut`::visit_mut_var_declarator`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_var_declarator(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(name, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(init, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for WhileStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_while_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_while_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + WhileStmt { span, test, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(test, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for WithStmt<'a> { + #[doc = "Calls [VisitMut`::visit_mut_with_stmt`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_with_stmt(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + WithStmt { span, obj, body } => { + { + >::visit_mut_with(span, visitor) + }; + { + as VisitMutWith>::visit_mut_with(obj, visitor) + }; + { + as VisitMutWith>::visit_mut_with(body, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for YieldExpr<'a> { + #[doc = "Calls [VisitMut`::visit_mut_yield_expr`] with `self`."] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_yield_expr(visitor, self) + } + + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + { + >::visit_mut_with(span, visitor) + }; + { + > as VisitMutWith>::visit_mut_with(arg, visitor) + }; + } + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for AssignOp { + #[doc = "Calls [VisitMut`::visit_mut_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_assign_op(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for swc_atoms::Atom { + #[doc = "Calls [VisitMut`::visit_mut_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_atom(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BigIntValue { + #[doc = "Calls [VisitMut`::visit_mut_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_big_int_value(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for BinaryOp { + #[doc = "Calls [VisitMut`::visit_mut_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_binary_op(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ClassMember<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_class_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_class_members(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Decorator<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_decorators`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_decorators(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ExportSpecifier<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_export_specifiers(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ExprOrSpread<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Expr<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_exprs`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_exprs(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ImportSpecifier<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_specifiers(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ImportWithItem> { + #[doc = "Calls [VisitMut`::visit_mut_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_import_with_items(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| >::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, JSXAttrOrSpread<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_attr_or_spreads(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, JSXElementChild<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_jsx_element_childs(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ModuleItem<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_module_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_module_items(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ObjectPatProp<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_object_pat_props(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option { + #[doc = "Calls [VisitMut`::visit_mut_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_accessibility(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => >::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option { + #[doc = "Calls [VisitMut`::visit_mut_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_atom(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => >::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_block_stmt(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_catch_clause(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_expr(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_expr_or_spread(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option { + #[doc = "Calls [VisitMut`::visit_mut_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ident(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => >::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_jsx_attr_value(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_jsx_closing_element(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_module_export_name(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_object_lit(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_pat(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option { + #[doc = "Calls [VisitMut`::visit_mut_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_span(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => >::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_stmt(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_str(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option { + #[doc = "Calls [VisitMut`::visit_mut_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_true_plus_minus(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => >::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_entity_name(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_namespace_body(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_type(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_type_ann(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_type_param_decl(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitMutWith>::visit_mut_with(inner, visitor) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMut`::visit_mut_opt_ts_type_param_instantiation`] with `self`. (Extra \ + impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_ts_type_param_instantiation(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => { + > as VisitMutWith>::visit_mut_with( + inner, visitor, + ) + } + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Option> { + #[doc = "Calls [VisitMut`::visit_mut_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_var_decl_or_expr(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + match self { + Some(inner) => as VisitMutWith>::visit_mut_with(inner, visitor), + None => {} + } + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_vec_expr_or_spreads(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + > as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [VisitMut`::visit_mut_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_opt_vec_pats(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| > as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, ParamOrTsParamProp<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_param_or_ts_param_props(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Param<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_params(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Pat<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_pats(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, PropOrSpread<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_prop_or_spreads(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for swc_common::Span { + #[doc = "Calls [VisitMut`::visit_mut_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_span(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, Stmt<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_stmts`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_stmts(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, SwitchCase<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_switch_cases(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [VisitMut`::visit_mut_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_syntax_context(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TplElement> { + #[doc = "Calls [VisitMut`::visit_mut_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_tpl_elements(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| >::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsEnumMember<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_enum_members(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsExprWithTypeArgs<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_expr_with_type_argss(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut().for_each(|item| { + as VisitMutWith>::visit_mut_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsFnParam<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_fn_params(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsTupleElement<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_tuple_elements(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsTypeElement<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_elements(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsTypeParam<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_type_params(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, TsType<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_ts_types(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for UnaryOp { + #[doc = "Calls [VisitMut`::visit_mut_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_unary_op(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for UpdateOp { + #[doc = "Calls [VisitMut`::visit_mut_update_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_update_op(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + {} + } +} +impl<'a, V: ?Sized + VisitMut<'a>> VisitMutWith<'a, V> for Vec<'a, VarDeclarator<'a>> { + #[doc = "Calls [VisitMut`::visit_mut_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + ::visit_mut_var_declarators(visitor, self) + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + self.iter_mut() + .for_each(|item| as VisitMutWith>::visit_mut_with(item, visitor)) + } +} +impl<'a, V, T> VisitMutWith<'a, V> for Box<'a, T> +where + V: ?Sized + VisitMut<'a>, + T: VisitMutWith<'a, V>, +{ + #[inline] + fn visit_mut_with(&mut self, visitor: &mut V) { + let v = >::visit_mut_with(&mut **self, visitor); + v + } + + #[inline] + fn visit_mut_children_with(&mut self, visitor: &mut V) { + let v = >::visit_mut_children_with(&mut **self, visitor); + v + } +} +#[doc = r" A visitor trait for traversing the AST."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait VisitMutAstPath<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_assign_pat_prop( + &mut self, + node: &mut AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_assign_target( + &mut self, + node: &mut AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_assign_target_pat( + &mut self, + node: &mut AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_auto_accessor( + &mut self, + node: &mut AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_binding_ident( + &mut self, + node: &mut BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_block_stmt_or_expr( + &mut self, + node: &mut BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_class_members( + &mut self, + node: &mut Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_computed_prop_name( + &mut self, + node: &mut ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_decorators( + &mut self, + node: &mut Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_do_while_stmt( + &mut self, + node: &mut DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_default_decl( + &mut self, + node: &mut ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_default_expr( + &mut self, + node: &mut ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_export_default_specifier( + &mut self, + node: &mut ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_named_specifier( + &mut self, + node: &mut ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_export_namespace_specifier( + &mut self, + node: &mut ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + < ExportNamespaceSpecifier < 'a > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_export_specifier( + &mut self, + node: &mut ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_export_specifiers( + &mut self, + node: &mut Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , ExportSpecifier < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_expr_or_spread( + &mut self, + node: &mut ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_expr_or_spreads( + &mut self, + node: &mut Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_import(&mut self, node: &mut Import, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_import_default_specifier( + &mut self, + node: &mut ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_import_named_specifier( + &mut self, + node: &mut ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_import_specifier( + &mut self, + node: &mut ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_import_specifiers( + &mut self, + node: &mut Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , ImportSpecifier < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_import_star_as_specifier( + &mut self, + node: &mut ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_import_with_item( + &mut self, + node: &mut ImportWithItem, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_import_with_items( + &mut self, + node: &mut Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_attr_name( + &mut self, + node: &mut JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_attr_or_spread( + &mut self, + node: &mut JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_attr_or_spreads( + &mut self, + node: &mut Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , JSXAttrOrSpread < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_attr_value( + &mut self, + node: &mut JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_closing_element( + &mut self, + node: &mut JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_closing_fragment( + &mut self, + node: &mut JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_element_child( + &mut self, + node: &mut JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_element_childs( + &mut self, + node: &mut Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , JSXElementChild < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_element_name( + &mut self, + node: &mut JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_expr_container( + &mut self, + node: &mut JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_member_expr( + &mut self, + node: &mut JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_namespaced_name( + &mut self, + node: &mut JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_jsx_opening_element( + &mut self, + node: &mut JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_jsx_opening_fragment( + &mut self, + node: &mut JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_jsx_spread_child( + &mut self, + node: &mut JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_key_value_pat_prop( + &mut self, + node: &mut KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_key_value_prop( + &mut self, + node: &mut KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_module_export_name( + &mut self, + node: &mut ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_module_items( + &mut self, + node: &mut Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_null(&mut self, node: &mut Null, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_number(&mut self, node: &mut Number, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_object_pat_prop( + &mut self, + node: &mut ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_object_pat_props( + &mut self, + node: &mut Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_accessibility( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_atom( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_block_stmt( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_catch_clause( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_chain_base( + &mut self, + node: &mut OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_chain_expr( + &mut self, + node: &mut OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_expr_or_spread( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_expr_or_spreads( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + < Option < Vec < 'a , ExprOrSpread < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_jsx_attr_value( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_jsx_closing_element( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + < Option < JSXClosingElement < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::visit_mut_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_module_export_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + < Option < ModuleExportName < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_object_lit( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + < Option < Box < 'a , ObjectLit < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_span( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_true_plus_minus( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_entity_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_namespace_body( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_ts_type( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_ts_type_ann( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_var_decl_or_expr( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_opt_vec_expr_or_spreads( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , Option < ExprOrSpread < 'a > > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::visit_mut_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_opt_vec_pats( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + >> as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_param_or_ts_param_prop( + &mut self, + node: &mut ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_param_or_ts_param_props( + &mut self, + node: &mut Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , ParamOrTsParamProp < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_private_method( + &mut self, + node: &mut PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_prop_or_spread( + &mut self, + node: &mut PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_prop_or_spreads( + &mut self, + node: &mut Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_simple_assign_target( + &mut self, + node: &mut SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_spread_element( + &mut self, + node: &mut SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_str(&mut self, node: &mut Str, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_super(&mut self, node: &mut Super, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_super_prop_expr( + &mut self, + node: &mut SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_switch_cases( + &mut self, + node: &mut Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_syntax_context( + &mut self, + node: &mut swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_tpl_elements( + &mut self, + node: &mut Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_true_plus_minus( + &mut self, + node: &mut TruePlusMinus, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_array_type( + &mut self, + node: &mut TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_call_signature_decl( + &mut self, + node: &mut TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_conditional_type( + &mut self, + node: &mut TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_const_assertion( + &mut self, + node: &mut TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_construct_signature_decl( + &mut self, + node: &mut TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + < TsConstructSignatureDecl < 'a > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_constructor_type( + &mut self, + node: &mut TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_entity_name( + &mut self, + node: &mut TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_enum_member( + &mut self, + node: &mut TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_enum_member_id( + &mut self, + node: &mut TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_enum_members( + &mut self, + node: &mut Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_export_assignment( + &mut self, + node: &mut TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_expr_with_type_args( + &mut self, + node: &mut TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_expr_with_type_argss( + &mut self, + node: &mut Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) { + < Vec < 'a , TsExprWithTypeArgs < 'a > > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_external_module_ref( + &mut self, + node: &mut TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_fn_or_constructor_type( + &mut self, + node: &mut TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_fn_params( + &mut self, + node: &mut Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_getter_signature( + &mut self, + node: &mut TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_import_equals_decl( + &mut self, + node: &mut TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_import_type( + &mut self, + node: &mut TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_index_signature( + &mut self, + node: &mut TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_indexed_access_type( + &mut self, + node: &mut TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_infer_type( + &mut self, + node: &mut TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_instantiation( + &mut self, + node: &mut TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_interface_body( + &mut self, + node: &mut TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_interface_decl( + &mut self, + node: &mut TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_intersection_type( + &mut self, + node: &mut TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_ts_keyword_type( + &mut self, + node: &mut TsKeywordType, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_keyword_type_kind( + &mut self, + node: &mut TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_mapped_type( + &mut self, + node: &mut TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_method_signature( + &mut self, + node: &mut TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_module_block( + &mut self, + node: &mut TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_module_decl( + &mut self, + node: &mut TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_module_name( + &mut self, + node: &mut TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_module_ref( + &mut self, + node: &mut TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_namespace_body( + &mut self, + node: &mut TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_namespace_decl( + &mut self, + node: &mut TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_namespace_export_decl( + &mut self, + node: &mut TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_non_null_expr( + &mut self, + node: &mut TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_optional_type( + &mut self, + node: &mut TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_param_prop( + &mut self, + node: &mut TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_param_prop_param( + &mut self, + node: &mut TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_parenthesized_type( + &mut self, + node: &mut TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_property_signature( + &mut self, + node: &mut TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_qualified_name( + &mut self, + node: &mut TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_satisfies_expr( + &mut self, + node: &mut TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_setter_signature( + &mut self, + node: &mut TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_this_type_or_ident( + &mut self, + node: &mut TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_tpl_lit_type( + &mut self, + node: &mut TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_tuple_element( + &mut self, + node: &mut TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::visit_mut_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_tuple_elements( + &mut self, + node: &mut Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_tuple_type( + &mut self, + node: &mut TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_alias_decl( + &mut self, + node: &mut TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_assertion( + &mut self, + node: &mut TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_element( + &mut self, + node: &mut TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_elements( + &mut self, + node: &mut Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_operator( + &mut self, + node: &mut TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_type_operator_op( + &mut self, + node: &mut TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_type_param( + &mut self, + node: &mut TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_param_decl( + &mut self, + node: &mut TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_param_instantiation( + &mut self, + node: &mut TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + < TsTypeParamInstantiation < 'a > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_type_params( + &mut self, + node: &mut Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_predicate( + &mut self, + node: &mut TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_type_query( + &mut self, + node: &mut TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_ts_type_query_expr( + &mut self, + node: &mut TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::visit_mut_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>, __ast_path: &mut AstKindPath) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + < TsUnionOrIntersectionType < 'a > as VisitMutWithAstPath < Self > > :: visit_mut_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_ts_union_type( + &mut self, + node: &mut TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::visit_mut_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::visit_mut_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind, __ast_path: &mut AstKindPath) { + >::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_var_decl_or_expr( + &mut self, + node: &mut VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn visit_mut_var_declarator( + &mut self, + node: &mut VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::visit_mut_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn visit_mut_var_declarators( + &mut self, + node: &mut Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) { + > as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::visit_mut_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>, __ast_path: &mut AstKindPath) { + as VisitMutWithAstPath>::visit_mut_children_with_ast_path( + node, self, __ast_path, + ) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitMutAstPath<'a> for &mut V +where + V: ?Sized + VisitMutAstPath<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility, __ast_path: &mut AstKindPath) { + ::visit_mut_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_pat_prop( + &mut self, + node: &mut AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_target( + &mut self, + node: &mut AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_target_pat( + &mut self, + node: &mut AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom, __ast_path: &mut AstKindPath) { + ::visit_mut_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_auto_accessor( + &mut self, + node: &mut AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp, __ast_path: &mut AstKindPath) { + ::visit_mut_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_binding_ident( + &mut self, + node: &mut BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_block_stmt_or_expr( + &mut self, + node: &mut BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool, __ast_path: &mut AstKindPath) { + ::visit_mut_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_members( + &mut self, + node: &mut Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_computed_prop_name( + &mut self, + node: &mut ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decorators( + &mut self, + node: &mut Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_do_while_stmt( + &mut self, + node: &mut DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_decl( + &mut self, + node: &mut ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_expr( + &mut self, + node: &mut ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_specifier( + &mut self, + node: &mut ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_named_specifier( + &mut self, + node: &mut ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_namespace_specifier( + &mut self, + node: &mut ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_specifier( + &mut self, + node: &mut ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_specifiers( + &mut self, + node: &mut Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_or_spread( + &mut self, + node: &mut ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_or_spreads( + &mut self, + node: &mut Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_function(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident, __ast_path: &mut AstKindPath) { + ::visit_mut_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName, __ast_path: &mut AstKindPath) { + ::visit_mut_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import, __ast_path: &mut AstKindPath) { + ::visit_mut_import(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_default_specifier( + &mut self, + node: &mut ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_named_specifier( + &mut self, + node: &mut ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase, __ast_path: &mut AstKindPath) { + ::visit_mut_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_specifier( + &mut self, + node: &mut ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_specifiers( + &mut self, + node: &mut Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_star_as_specifier( + &mut self, + node: &mut ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with_item( + &mut self, + node: &mut ImportWithItem, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with_items( + &mut self, + node: &mut Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid, __ast_path: &mut AstKindPath) { + ::visit_mut_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_name( + &mut self, + node: &mut JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_or_spread( + &mut self, + node: &mut JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads( + &mut self, + node: &mut Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_value( + &mut self, + node: &mut JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_closing_element( + &mut self, + node: &mut JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_closing_fragment( + &mut self, + node: &mut JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_child( + &mut self, + node: &mut JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_childs( + &mut self, + node: &mut Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_name( + &mut self, + node: &mut JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_expr_container( + &mut self, + node: &mut JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_member_expr( + &mut self, + node: &mut JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_namespaced_name( + &mut self, + node: &mut JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_opening_element( + &mut self, + node: &mut JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_opening_fragment( + &mut self, + node: &mut JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_spread_child( + &mut self, + node: &mut JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_key(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key_value_pat_prop( + &mut self, + node: &mut KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key_value_prop( + &mut self, + node: &mut KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind, __ast_path: &mut AstKindPath) { + ::visit_mut_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_export_name( + &mut self, + node: &mut ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_items( + &mut self, + node: &mut Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null, __ast_path: &mut AstKindPath) { + ::visit_mut_null(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number, __ast_path: &mut AstKindPath) { + ::visit_mut_number(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat_prop( + &mut self, + node: &mut ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat_props( + &mut self, + node: &mut Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_accessibility( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_atom( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_block_stmt( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_catch_clause( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_chain_base( + &mut self, + node: &mut OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_chain_expr( + &mut self, + node: &mut OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr_or_spread( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr_or_spreads( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_jsx_attr_value( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_jsx_closing_element( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_module_export_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_object_lit( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_span( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_true_plus_minus( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_entity_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_namespace_body( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_ann( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_param_instantiation( + &mut **self, + node, + __ast_path, + ) + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_vec_pats( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param_or_ts_param_prop( + &mut self, + node: &mut ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param_or_ts_param_props( + &mut self, + node: &mut Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_method( + &mut self, + node: &mut PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName, __ast_path: &mut AstKindPath) { + ::visit_mut_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_program(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_or_spread( + &mut self, + node: &mut PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_or_spreads( + &mut self, + node: &mut Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex, __ast_path: &mut AstKindPath) { + ::visit_mut_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_script(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_simple_assign_target( + &mut self, + node: &mut SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span, __ast_path: &mut AstKindPath) { + ::visit_mut_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_spread_element( + &mut self, + node: &mut SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str, __ast_path: &mut AstKindPath) { + ::visit_mut_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super, __ast_path: &mut AstKindPath) { + ::visit_mut_super(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super_prop_expr( + &mut self, + node: &mut SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_cases( + &mut self, + node: &mut Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_syntax_context( + &mut self, + node: &mut swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl_elements( + &mut self, + node: &mut Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_true_plus_minus( + &mut self, + node: &mut TruePlusMinus, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_array_type( + &mut self, + node: &mut TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_call_signature_decl( + &mut self, + node: &mut TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_conditional_type( + &mut self, + node: &mut TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_const_assertion( + &mut self, + node: &mut TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_construct_signature_decl( + &mut self, + node: &mut TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_constructor_type( + &mut self, + node: &mut TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_entity_name( + &mut self, + node: &mut TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_member( + &mut self, + node: &mut TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_member_id( + &mut self, + node: &mut TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_members( + &mut self, + node: &mut Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_export_assignment( + &mut self, + node: &mut TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_expr_with_type_args( + &mut self, + node: &mut TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss( + &mut self, + node: &mut Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_external_module_ref( + &mut self, + node: &mut TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type( + &mut self, + node: &mut TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_params( + &mut self, + node: &mut Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_getter_signature( + &mut self, + node: &mut TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_import_equals_decl( + &mut self, + node: &mut TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_import_type( + &mut self, + node: &mut TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_index_signature( + &mut self, + node: &mut TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_indexed_access_type( + &mut self, + node: &mut TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_infer_type( + &mut self, + node: &mut TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_instantiation( + &mut self, + node: &mut TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_interface_body( + &mut self, + node: &mut TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_interface_decl( + &mut self, + node: &mut TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_intersection_type( + &mut self, + node: &mut TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_keyword_type( + &mut self, + node: &mut TsKeywordType, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_keyword_type_kind( + &mut self, + node: &mut TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_mapped_type( + &mut self, + node: &mut TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_method_signature( + &mut self, + node: &mut TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_block( + &mut self, + node: &mut TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_decl( + &mut self, + node: &mut TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_name( + &mut self, + node: &mut TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_ref( + &mut self, + node: &mut TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_body( + &mut self, + node: &mut TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_decl( + &mut self, + node: &mut TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_export_decl( + &mut self, + node: &mut TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_non_null_expr( + &mut self, + node: &mut TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_optional_type( + &mut self, + node: &mut TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_param_prop( + &mut self, + node: &mut TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_param_prop_param( + &mut self, + node: &mut TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_parenthesized_type( + &mut self, + node: &mut TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_property_signature( + &mut self, + node: &mut TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_qualified_name( + &mut self, + node: &mut TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_satisfies_expr( + &mut self, + node: &mut TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_setter_signature( + &mut self, + node: &mut TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_this_type_or_ident( + &mut self, + node: &mut TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tpl_lit_type( + &mut self, + node: &mut TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_element( + &mut self, + node: &mut TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_elements( + &mut self, + node: &mut Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_type( + &mut self, + node: &mut TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_alias_decl( + &mut self, + node: &mut TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_assertion( + &mut self, + node: &mut TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_element( + &mut self, + node: &mut TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_elements( + &mut self, + node: &mut Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_operator( + &mut self, + node: &mut TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_operator_op( + &mut self, + node: &mut TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param( + &mut self, + node: &mut TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param_decl( + &mut self, + node: &mut TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param_instantiation( + &mut self, + node: &mut TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_params( + &mut self, + node: &mut Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_predicate( + &mut self, + node: &mut TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_query( + &mut self, + node: &mut TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_query_expr( + &mut self, + node: &mut TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_union_or_intersection_type( + &mut **self, + node, + __ast_path, + ) + } + + #[inline] + fn visit_mut_ts_union_type( + &mut self, + node: &mut TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp, __ast_path: &mut AstKindPath) { + ::visit_mut_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl_or_expr( + &mut self, + node: &mut VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_declarator( + &mut self, + node: &mut VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_declarators( + &mut self, + node: &mut Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitMutAstPath<'a> for Box<'a, V> +where + V: ?Sized + VisitMutAstPath<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility, __ast_path: &mut AstKindPath) { + ::visit_mut_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_pat_prop( + &mut self, + node: &mut AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_target( + &mut self, + node: &mut AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_assign_target_pat( + &mut self, + node: &mut AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom, __ast_path: &mut AstKindPath) { + ::visit_mut_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_auto_accessor( + &mut self, + node: &mut AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp, __ast_path: &mut AstKindPath) { + ::visit_mut_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_binding_ident( + &mut self, + node: &mut BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_block_stmt_or_expr( + &mut self, + node: &mut BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool, __ast_path: &mut AstKindPath) { + ::visit_mut_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_members( + &mut self, + node: &mut Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_computed_prop_name( + &mut self, + node: &mut ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_decorators( + &mut self, + node: &mut Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_do_while_stmt( + &mut self, + node: &mut DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt, __ast_path: &mut AstKindPath) { + ::visit_mut_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_decl( + &mut self, + node: &mut ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_expr( + &mut self, + node: &mut ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_default_specifier( + &mut self, + node: &mut ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_named_specifier( + &mut self, + node: &mut ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_namespace_specifier( + &mut self, + node: &mut ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_specifier( + &mut self, + node: &mut ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_export_specifiers( + &mut self, + node: &mut Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_or_spread( + &mut self, + node: &mut ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_or_spreads( + &mut self, + node: &mut Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_function(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident, __ast_path: &mut AstKindPath) { + ::visit_mut_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName, __ast_path: &mut AstKindPath) { + ::visit_mut_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import, __ast_path: &mut AstKindPath) { + ::visit_mut_import(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_default_specifier( + &mut self, + node: &mut ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_named_specifier( + &mut self, + node: &mut ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase, __ast_path: &mut AstKindPath) { + ::visit_mut_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_specifier( + &mut self, + node: &mut ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_specifiers( + &mut self, + node: &mut Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_star_as_specifier( + &mut self, + node: &mut ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with_item( + &mut self, + node: &mut ImportWithItem, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_import_with_items( + &mut self, + node: &mut Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid, __ast_path: &mut AstKindPath) { + ::visit_mut_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_name( + &mut self, + node: &mut JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_or_spread( + &mut self, + node: &mut JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads( + &mut self, + node: &mut Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_attr_value( + &mut self, + node: &mut JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_closing_element( + &mut self, + node: &mut JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_closing_fragment( + &mut self, + node: &mut JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_child( + &mut self, + node: &mut JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_childs( + &mut self, + node: &mut Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_element_name( + &mut self, + node: &mut JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_expr_container( + &mut self, + node: &mut JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_member_expr( + &mut self, + node: &mut JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_namespaced_name( + &mut self, + node: &mut JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_opening_element( + &mut self, + node: &mut JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_opening_fragment( + &mut self, + node: &mut JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_spread_child( + &mut self, + node: &mut JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_key(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key_value_pat_prop( + &mut self, + node: &mut KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_key_value_prop( + &mut self, + node: &mut KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind, __ast_path: &mut AstKindPath) { + ::visit_mut_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_export_name( + &mut self, + node: &mut ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_module_items( + &mut self, + node: &mut Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null, __ast_path: &mut AstKindPath) { + ::visit_mut_null(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number, __ast_path: &mut AstKindPath) { + ::visit_mut_number(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat_prop( + &mut self, + node: &mut ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_object_pat_props( + &mut self, + node: &mut Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_accessibility( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_atom( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_block_stmt( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_catch_clause( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_chain_base( + &mut self, + node: &mut OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_chain_expr( + &mut self, + node: &mut OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr_or_spread( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_expr_or_spreads( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_jsx_attr_value( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_jsx_closing_element( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_module_export_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_object_lit( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_span( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_true_plus_minus( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_entity_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_namespace_body( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_ann( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_ts_type_param_instantiation( + &mut **self, + node, + __ast_path, + ) + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_opt_vec_pats( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param_or_ts_param_prop( + &mut self, + node: &mut ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_param_or_ts_param_props( + &mut self, + node: &mut Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_method( + &mut self, + node: &mut PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName, __ast_path: &mut AstKindPath) { + ::visit_mut_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_program(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_or_spread( + &mut self, + node: &mut PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_prop_or_spreads( + &mut self, + node: &mut Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex, __ast_path: &mut AstKindPath) { + ::visit_mut_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_script(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_simple_assign_target( + &mut self, + node: &mut SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span, __ast_path: &mut AstKindPath) { + ::visit_mut_span(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_spread_element( + &mut self, + node: &mut SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str, __ast_path: &mut AstKindPath) { + ::visit_mut_str(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super, __ast_path: &mut AstKindPath) { + ::visit_mut_super(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_super_prop_expr( + &mut self, + node: &mut SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_cases( + &mut self, + node: &mut Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_syntax_context( + &mut self, + node: &mut swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr, __ast_path: &mut AstKindPath) { + ::visit_mut_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_tpl_elements( + &mut self, + node: &mut Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_true_plus_minus( + &mut self, + node: &mut TruePlusMinus, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_array_type( + &mut self, + node: &mut TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_call_signature_decl( + &mut self, + node: &mut TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_conditional_type( + &mut self, + node: &mut TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_const_assertion( + &mut self, + node: &mut TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_construct_signature_decl( + &mut self, + node: &mut TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_constructor_type( + &mut self, + node: &mut TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_entity_name( + &mut self, + node: &mut TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_member( + &mut self, + node: &mut TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_member_id( + &mut self, + node: &mut TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_enum_members( + &mut self, + node: &mut Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_export_assignment( + &mut self, + node: &mut TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_expr_with_type_args( + &mut self, + node: &mut TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss( + &mut self, + node: &mut Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_external_module_ref( + &mut self, + node: &mut TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type( + &mut self, + node: &mut TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_params( + &mut self, + node: &mut Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_getter_signature( + &mut self, + node: &mut TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_import_equals_decl( + &mut self, + node: &mut TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_import_type( + &mut self, + node: &mut TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_index_signature( + &mut self, + node: &mut TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_indexed_access_type( + &mut self, + node: &mut TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_infer_type( + &mut self, + node: &mut TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_instantiation( + &mut self, + node: &mut TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_interface_body( + &mut self, + node: &mut TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_interface_decl( + &mut self, + node: &mut TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_intersection_type( + &mut self, + node: &mut TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_keyword_type( + &mut self, + node: &mut TsKeywordType, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_keyword_type_kind( + &mut self, + node: &mut TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_mapped_type( + &mut self, + node: &mut TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_method_signature( + &mut self, + node: &mut TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_block( + &mut self, + node: &mut TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_decl( + &mut self, + node: &mut TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_name( + &mut self, + node: &mut TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_module_ref( + &mut self, + node: &mut TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_body( + &mut self, + node: &mut TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_decl( + &mut self, + node: &mut TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_namespace_export_decl( + &mut self, + node: &mut TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_non_null_expr( + &mut self, + node: &mut TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_optional_type( + &mut self, + node: &mut TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_param_prop( + &mut self, + node: &mut TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_param_prop_param( + &mut self, + node: &mut TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_parenthesized_type( + &mut self, + node: &mut TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_property_signature( + &mut self, + node: &mut TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_qualified_name( + &mut self, + node: &mut TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_satisfies_expr( + &mut self, + node: &mut TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_setter_signature( + &mut self, + node: &mut TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_this_type_or_ident( + &mut self, + node: &mut TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tpl_lit_type( + &mut self, + node: &mut TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_element( + &mut self, + node: &mut TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_elements( + &mut self, + node: &mut Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_tuple_type( + &mut self, + node: &mut TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_alias_decl( + &mut self, + node: &mut TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_assertion( + &mut self, + node: &mut TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_element( + &mut self, + node: &mut TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_elements( + &mut self, + node: &mut Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_operator( + &mut self, + node: &mut TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_operator_op( + &mut self, + node: &mut TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param( + &mut self, + node: &mut TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param_decl( + &mut self, + node: &mut TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_param_instantiation( + &mut self, + node: &mut TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_params( + &mut self, + node: &mut Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_predicate( + &mut self, + node: &mut TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_query( + &mut self, + node: &mut TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_query_expr( + &mut self, + node: &mut TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_union_or_intersection_type( + &mut **self, + node, + __ast_path, + ) + } + + #[inline] + fn visit_mut_ts_union_type( + &mut self, + node: &mut TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp, __ast_path: &mut AstKindPath) { + ::visit_mut_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_decl_or_expr( + &mut self, + node: &mut VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_declarator( + &mut self, + node: &mut VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_var_declarators( + &mut self, + node: &mut Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) { + ::visit_mut_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>, __ast_path: &mut AstKindPath) { + ::visit_mut_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, A, B> VisitMutAstPath<'a> for ::swc_visit::Either +where + A: VisitMutAstPath<'a>, + B: VisitMutAstPath<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_array_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_array_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_array_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_array_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_arrow_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_arrow_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_pat_prop( + &mut self, + node: &mut AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_target( + &mut self, + node: &mut AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_assign_target_pat( + &mut self, + node: &mut AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_assign_target_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_assign_target_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_atom(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_atom(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_auto_accessor( + &mut self, + node: &mut AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_auto_accessor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_auto_accessor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_await_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_await_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_big_int(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_big_int(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_big_int_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_big_int_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_bin_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_bin_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_binary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_binary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_binding_ident( + &mut self, + node: &mut BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_binding_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_binding_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_block_stmt_or_expr( + &mut self, + node: &mut BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_block_stmt_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_block_stmt_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_bool(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_bool(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_break_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_break_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_call_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_call_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_callee(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_callee(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_members( + &mut self, + node: &mut Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_class_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_class_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_computed_prop_name( + &mut self, + node: &mut ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_computed_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_computed_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_cond_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_cond_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_constructor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_constructor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_continue_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_continue_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_debugger_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_debugger_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_decorator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_decorator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_decorators( + &mut self, + node: &mut Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_decorators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_decorators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_do_while_stmt( + &mut self, + node: &mut DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_do_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_do_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_empty_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_empty_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_all(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_all(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_default_decl( + &mut self, + node: &mut ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_default_expr( + &mut self, + node: &mut ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_default_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_default_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_default_specifier( + &mut self, + node: &mut ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_named_specifier( + &mut self, + node: &mut ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_namespace_specifier( + &mut self, + node: &mut ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_namespace_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_namespace_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_specifier( + &mut self, + node: &mut ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_export_specifiers( + &mut self, + node: &mut Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_export_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_export_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_expr_or_spread( + &mut self, + node: &mut ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_expr_or_spreads( + &mut self, + node: &mut Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_expr_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_expr_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_exprs(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_exprs(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_fn_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_fn_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_fn_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_fn_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_for_head(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_for_head(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_for_in_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_for_in_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_for_of_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_for_of_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_for_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_for_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_function(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_function(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_getter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_getter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ident_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ident_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_if_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_if_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_default_specifier( + &mut self, + node: &mut ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_named_specifier( + &mut self, + node: &mut ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_phase(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_phase(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_specifier( + &mut self, + node: &mut ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_specifiers( + &mut self, + node: &mut Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_star_as_specifier( + &mut self, + node: &mut ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_star_as_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_star_as_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_with(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_with(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_with_item( + &mut self, + node: &mut ImportWithItem, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_with_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_with_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_import_with_items( + &mut self, + node: &mut Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_import_with_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_import_with_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_invalid(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_invalid(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_name( + &mut self, + node: &mut JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spread( + &mut self, + node: &mut JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads( + &mut self, + node: &mut Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_attr_value( + &mut self, + node: &mut JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_closing_element( + &mut self, + node: &mut JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_closing_fragment( + &mut self, + node: &mut JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_closing_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_closing_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_element_child( + &mut self, + node: &mut JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_element_childs( + &mut self, + node: &mut Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_childs(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_childs(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_element_name( + &mut self, + node: &mut JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_element_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_empty_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_empty_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_expr_container( + &mut self, + node: &mut JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_expr_container(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_expr_container(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_member_expr( + &mut self, + node: &mut JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_namespaced_name( + &mut self, + node: &mut JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_namespaced_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_namespaced_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_object(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_object(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_opening_element( + &mut self, + node: &mut JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_opening_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_opening_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_opening_fragment( + &mut self, + node: &mut JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_opening_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_opening_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_spread_child( + &mut self, + node: &mut JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_spread_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_spread_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_jsx_text(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_jsx_text(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_key(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_key(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_key_value_pat_prop( + &mut self, + node: &mut KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_key_value_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_key_value_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_key_value_prop( + &mut self, + node: &mut KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_key_value_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_key_value_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_labeled_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_labeled_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_member_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_member_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_meta_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_meta_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_meta_prop_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_meta_prop_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_method_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_method_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_method_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_method_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_module(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_module(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_module_export_name( + &mut self, + node: &mut ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_module_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_module_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_module_items( + &mut self, + node: &mut Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_module_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_module_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_named_export(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_named_export(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_new_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_new_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_null(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_null(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_number(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_number(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_object_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_object_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_object_pat_prop( + &mut self, + node: &mut ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_object_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_object_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_object_pat_props( + &mut self, + node: &mut Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_object_pat_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_object_pat_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_accessibility( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_atom( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_atom(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_atom(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_block_stmt( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_call(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_call(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_catch_clause( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_chain_base( + &mut self, + node: &mut OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_chain_base(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_chain_base(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_chain_expr( + &mut self, + node: &mut OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_chain_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_chain_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_expr_or_spread( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_expr_or_spreads( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_jsx_attr_value( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_jsx_closing_element( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_module_export_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_object_lit( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_span( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_span(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_span(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_str(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_str(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_true_plus_minus( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_entity_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_namespace_body( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type_ann( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_param_instantiation( + visitor, node, __ast_path, + ) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_ts_type_param_instantiation( + visitor, node, __ast_path, + ) + } + } + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_opt_vec_pats( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_opt_vec_pats(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_opt_vec_pats(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_param_or_ts_param_prop( + &mut self, + node: &mut ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_param_or_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_param_or_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_param_or_ts_param_props( + &mut self, + node: &mut Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_param_or_ts_param_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_param_or_ts_param_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_paren_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_paren_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_pats(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_pats(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_private_method( + &mut self, + node: &mut PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_private_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_private_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_private_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_private_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_private_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_private_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_program(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_program(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_prop_or_spread( + &mut self, + node: &mut PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_prop_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_prop_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_prop_or_spreads( + &mut self, + node: &mut Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_prop_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_prop_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_regex(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_regex(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_rest_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_rest_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_return_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_return_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_script(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_script(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_seq_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_seq_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_setter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_setter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_simple_assign_target( + &mut self, + node: &mut SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_simple_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_simple_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_span(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_span(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_spread_element( + &mut self, + node: &mut SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_spread_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_spread_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_static_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_static_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_stmts(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_stmts(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_str(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_str(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_super(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_super(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_super_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_super_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_super_prop_expr( + &mut self, + node: &mut SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_super_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_super_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_switch_case(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_switch_case(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_switch_cases( + &mut self, + node: &mut Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_switch_cases(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_switch_cases(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_switch_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_switch_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_syntax_context( + &mut self, + node: &mut swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_syntax_context(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_syntax_context(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_tagged_tpl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_tagged_tpl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_this_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_this_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_throw_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_throw_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_tpl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_tpl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_tpl_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_tpl_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_tpl_elements( + &mut self, + node: &mut Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_tpl_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_tpl_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_true_plus_minus( + &mut self, + node: &mut TruePlusMinus, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_try_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_try_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_array_type( + &mut self, + node: &mut TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_array_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_array_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_as_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_as_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_call_signature_decl( + &mut self, + node: &mut TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_call_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_call_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_conditional_type( + &mut self, + node: &mut TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_conditional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_conditional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_const_assertion( + &mut self, + node: &mut TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_const_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_const_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_construct_signature_decl( + &mut self, + node: &mut TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_construct_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_construct_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_constructor_type( + &mut self, + node: &mut TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_entity_name( + &mut self, + node: &mut TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_enum_member( + &mut self, + node: &mut TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_enum_member_id( + &mut self, + node: &mut TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_member_id(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_member_id(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_enum_members( + &mut self, + node: &mut Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_enum_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_export_assignment( + &mut self, + node: &mut TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_export_assignment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_export_assignment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_args( + &mut self, + node: &mut TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_expr_with_type_args(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_expr_with_type_args(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss( + &mut self, + node: &mut Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_expr_with_type_argss(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_expr_with_type_argss(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_external_module_ref( + &mut self, + node: &mut TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_external_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_external_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type( + &mut self, + node: &mut TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_fn_params( + &mut self, + node: &mut Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_fn_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_getter_signature( + &mut self, + node: &mut TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_getter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_getter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_import_equals_decl( + &mut self, + node: &mut TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_import_equals_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_import_equals_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_import_type( + &mut self, + node: &mut TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_import_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_import_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_index_signature( + &mut self, + node: &mut TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_index_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_index_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_indexed_access_type( + &mut self, + node: &mut TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_indexed_access_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_indexed_access_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_infer_type( + &mut self, + node: &mut TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_infer_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_infer_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_instantiation( + &mut self, + node: &mut TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_interface_body( + &mut self, + node: &mut TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_interface_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_interface_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_interface_decl( + &mut self, + node: &mut TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_interface_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_interface_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_intersection_type( + &mut self, + node: &mut TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_keyword_type( + &mut self, + node: &mut TsKeywordType, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_keyword_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_keyword_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_keyword_type_kind( + &mut self, + node: &mut TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_keyword_type_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_keyword_type_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_mapped_type( + &mut self, + node: &mut TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_mapped_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_mapped_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_method_signature( + &mut self, + node: &mut TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_method_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_method_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_module_block( + &mut self, + node: &mut TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_module_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_module_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_module_decl( + &mut self, + node: &mut TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_module_name( + &mut self, + node: &mut TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_module_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_module_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_module_ref( + &mut self, + node: &mut TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_namespace_body( + &mut self, + node: &mut TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_namespace_decl( + &mut self, + node: &mut TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_namespace_export_decl( + &mut self, + node: &mut TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_namespace_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_non_null_expr( + &mut self, + node: &mut TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_non_null_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_non_null_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_optional_type( + &mut self, + node: &mut TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_optional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_optional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_param_prop( + &mut self, + node: &mut TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_param_prop_param( + &mut self, + node: &mut TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_param_prop_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_param_prop_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_parenthesized_type( + &mut self, + node: &mut TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_parenthesized_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_parenthesized_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_property_signature( + &mut self, + node: &mut TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_property_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_property_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_qualified_name( + &mut self, + node: &mut TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_qualified_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_qualified_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_rest_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_rest_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_satisfies_expr( + &mut self, + node: &mut TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_satisfies_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_satisfies_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_setter_signature( + &mut self, + node: &mut TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_setter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_setter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_this_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_this_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_this_type_or_ident( + &mut self, + node: &mut TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_this_type_or_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_this_type_or_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_tpl_lit_type( + &mut self, + node: &mut TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_tpl_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_tpl_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_tuple_element( + &mut self, + node: &mut TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_tuple_elements( + &mut self, + node: &mut Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_tuple_type( + &mut self, + node: &mut TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_tuple_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_alias_decl( + &mut self, + node: &mut TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_alias_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_alias_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_assertion( + &mut self, + node: &mut TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_element( + &mut self, + node: &mut TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_elements( + &mut self, + node: &mut Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_operator( + &mut self, + node: &mut TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_operator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_operator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_operator_op( + &mut self, + node: &mut TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_operator_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_operator_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_param( + &mut self, + node: &mut TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_param_decl( + &mut self, + node: &mut TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_param_instantiation( + &mut self, + node: &mut TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_param_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_params( + &mut self, + node: &mut Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_predicate( + &mut self, + node: &mut TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_predicate(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_predicate(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_query( + &mut self, + node: &mut TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_query(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_query(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_query_expr( + &mut self, + node: &mut TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_query_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_query_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_type_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_type_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_types(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_types(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_union_or_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_union_or_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_ts_union_type( + &mut self, + node: &mut TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_ts_union_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_ts_union_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_unary_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_unary_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_unary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_unary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_update_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_update_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_update_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_update_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_using_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_using_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_var_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_var_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_var_decl_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_var_decl_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_var_decl_or_expr( + &mut self, + node: &mut VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_var_declarator( + &mut self, + node: &mut VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_var_declarator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_var_declarator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_var_declarators( + &mut self, + node: &mut Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_var_declarators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_var_declarators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_with_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_with_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>, __ast_path: &mut AstKindPath) { + match self { + swc_visit::Either::Left(visitor) => { + VisitMutAstPath::visit_mut_yield_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + VisitMutAstPath::visit_mut_yield_expr(visitor, node, __ast_path) + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> VisitMutAstPath<'a> for ::swc_visit::Optional +where + V: VisitMutAstPath<'a>, +{ + #[inline] + fn visit_mut_accessibility(&mut self, node: &mut Accessibility, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_accessibility(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_array_lit(&mut self, node: &mut ArrayLit<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_array_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_array_pat(&mut self, node: &mut ArrayPat<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_array_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_arrow_expr(&mut self, node: &mut ArrowExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_arrow_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_expr(&mut self, node: &mut AssignExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_assign_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_op(&mut self, node: &mut AssignOp, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_assign_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_pat(&mut self, node: &mut AssignPat<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_assign_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_pat_prop( + &mut self, + node: &mut AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_assign_pat_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_prop(&mut self, node: &mut AssignProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_assign_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_target( + &mut self, + node: &mut AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_assign_target(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_assign_target_pat( + &mut self, + node: &mut AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_assign_target_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_atom(&mut self, node: &mut swc_atoms::Atom, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_atom(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_auto_accessor( + &mut self, + node: &mut AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_auto_accessor(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_await_expr(&mut self, node: &mut AwaitExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_await_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_big_int(&mut self, node: &mut BigInt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_big_int(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_big_int_value(&mut self, node: &mut BigIntValue, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_big_int_value(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_bin_expr(&mut self, node: &mut BinExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_bin_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_binary_op(&mut self, node: &mut BinaryOp, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_binary_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_binding_ident( + &mut self, + node: &mut BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_binding_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_block_stmt(&mut self, node: &mut BlockStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_block_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_block_stmt_or_expr( + &mut self, + node: &mut BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_block_stmt_or_expr( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_bool(&mut self, node: &mut Bool, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_bool(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_break_stmt(&mut self, node: &mut BreakStmt, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_break_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_call_expr(&mut self, node: &mut CallExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_call_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_callee(&mut self, node: &mut Callee<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_callee(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_catch_clause(&mut self, node: &mut CatchClause<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_catch_clause(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class(&mut self, node: &mut Class<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_decl(&mut self, node: &mut ClassDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_expr(&mut self, node: &mut ClassExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_member(&mut self, node: &mut ClassMember<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class_member(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_members( + &mut self, + node: &mut Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_class_members(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_method(&mut self, node: &mut ClassMethod<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class_method(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_class_prop(&mut self, node: &mut ClassProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_class_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_computed_prop_name( + &mut self, + node: &mut ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_computed_prop_name( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_cond_expr(&mut self, node: &mut CondExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_cond_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_constructor(&mut self, node: &mut Constructor<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_constructor(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_continue_stmt(&mut self, node: &mut ContinueStmt, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_continue_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_debugger_stmt(&mut self, node: &mut DebuggerStmt, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_debugger_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_decl(&mut self, node: &mut Decl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_decorator(&mut self, node: &mut Decorator<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_decorator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_decorators( + &mut self, + node: &mut Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_decorators(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_default_decl(&mut self, node: &mut DefaultDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_default_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_do_while_stmt( + &mut self, + node: &mut DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_do_while_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_empty_stmt(&mut self, node: &mut EmptyStmt, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_empty_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_export_all(&mut self, node: &mut ExportAll<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_export_all(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_export_decl(&mut self, node: &mut ExportDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_export_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_export_default_decl( + &mut self, + node: &mut ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_default_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_export_default_expr( + &mut self, + node: &mut ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_default_expr( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_export_default_specifier( + &mut self, + node: &mut ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_default_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_export_named_specifier( + &mut self, + node: &mut ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_named_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_export_namespace_specifier( + &mut self, + node: &mut ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_namespace_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_export_specifier( + &mut self, + node: &mut ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_export_specifiers( + &mut self, + node: &mut Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_export_specifiers(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_expr(&mut self, node: &mut Expr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_expr_or_spread( + &mut self, + node: &mut ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_expr_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_expr_or_spreads( + &mut self, + node: &mut Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_expr_stmt(&mut self, node: &mut ExprStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_expr_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_exprs(&mut self, node: &mut Vec<'a, Expr<'a>>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_exprs(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_fn_decl(&mut self, node: &mut FnDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_fn_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_fn_expr(&mut self, node: &mut FnExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_fn_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_for_head(&mut self, node: &mut ForHead<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_for_head(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_for_in_stmt(&mut self, node: &mut ForInStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_for_in_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_for_of_stmt(&mut self, node: &mut ForOfStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_for_of_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_for_stmt(&mut self, node: &mut ForStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_for_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_function(&mut self, node: &mut Function<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_function(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_getter_prop(&mut self, node: &mut GetterProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_getter_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ident(&mut self, node: &mut Ident, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ident_name(&mut self, node: &mut IdentName, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ident_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_if_stmt(&mut self, node: &mut IfStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_if_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import(&mut self, node: &mut Import, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_import(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_decl(&mut self, node: &mut ImportDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_import_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_default_specifier( + &mut self, + node: &mut ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_default_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_import_named_specifier( + &mut self, + node: &mut ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_named_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_import_phase(&mut self, node: &mut ImportPhase, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_import_phase(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_specifier( + &mut self, + node: &mut ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_specifier(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_specifiers( + &mut self, + node: &mut Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_specifiers(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_star_as_specifier( + &mut self, + node: &mut ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_star_as_specifier( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_import_with(&mut self, node: &mut ImportWith<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_import_with(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_with_item( + &mut self, + node: &mut ImportWithItem, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_with_item(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_import_with_items( + &mut self, + node: &mut Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_import_with_items(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_invalid(&mut self, node: &mut Invalid, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_invalid(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr(&mut self, node: &mut JSXAttr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_attr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_name( + &mut self, + node: &mut JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_attr_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spread( + &mut self, + node: &mut JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_attr_or_spread( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_or_spreads( + &mut self, + node: &mut Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_attr_or_spreads( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_attr_value( + &mut self, + node: &mut JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_attr_value(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_closing_element( + &mut self, + node: &mut JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_closing_element( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_closing_fragment( + &mut self, + node: &mut JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_closing_fragment( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element(&mut self, node: &mut JSXElement<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_child( + &mut self, + node: &mut JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_element_child(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_childs( + &mut self, + node: &mut Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_element_childs( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_element_name( + &mut self, + node: &mut JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_element_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_empty_expr(&mut self, node: &mut JSXEmptyExpr, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_empty_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_expr(&mut self, node: &mut JSXExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_expr_container( + &mut self, + node: &mut JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_expr_container( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_fragment(&mut self, node: &mut JSXFragment<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_fragment(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_member_expr( + &mut self, + node: &mut JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_member_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_namespaced_name( + &mut self, + node: &mut JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_namespaced_name( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_object(&mut self, node: &mut JSXObject<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_object(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_opening_element( + &mut self, + node: &mut JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_opening_element( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_opening_fragment( + &mut self, + node: &mut JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_opening_fragment( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_jsx_spread_child( + &mut self, + node: &mut JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_jsx_spread_child(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_jsx_text(&mut self, node: &mut JSXText, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_jsx_text(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_key(&mut self, node: &mut Key<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_key(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_key_value_pat_prop( + &mut self, + node: &mut KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_key_value_pat_prop( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_key_value_prop( + &mut self, + node: &mut KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_key_value_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_labeled_stmt(&mut self, node: &mut LabeledStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_labeled_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_lit(&mut self, node: &mut Lit<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_member_expr(&mut self, node: &mut MemberExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_member_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_member_prop(&mut self, node: &mut MemberProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_member_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_meta_prop_expr(&mut self, node: &mut MetaPropExpr, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_meta_prop_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_meta_prop_kind(&mut self, node: &mut MetaPropKind, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_meta_prop_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_method_kind(&mut self, node: &mut MethodKind, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_method_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_method_prop(&mut self, node: &mut MethodProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_method_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_module(&mut self, node: &mut Module<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_module(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_module_decl(&mut self, node: &mut ModuleDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_module_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_module_export_name( + &mut self, + node: &mut ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_module_export_name( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_module_item(&mut self, node: &mut ModuleItem<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_module_item(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_module_items( + &mut self, + node: &mut Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_module_items(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_named_export(&mut self, node: &mut NamedExport<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_named_export(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_new_expr(&mut self, node: &mut NewExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_new_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_null(&mut self, node: &mut Null, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_null(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_number(&mut self, node: &mut Number, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_number(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_object_lit(&mut self, node: &mut ObjectLit<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_object_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_object_pat(&mut self, node: &mut ObjectPat<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_object_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_object_pat_prop( + &mut self, + node: &mut ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_object_pat_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_object_pat_props( + &mut self, + node: &mut Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_object_pat_props(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_accessibility( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_accessibility(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_atom( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_atom(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_block_stmt( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_block_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_call(&mut self, node: &mut OptCall<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_call(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_catch_clause( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_catch_clause(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_chain_base( + &mut self, + node: &mut OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_chain_base(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_chain_expr( + &mut self, + node: &mut OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_chain_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr_or_spread( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_expr_or_spread( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_expr_or_spreads( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_expr_or_spreads( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_ident(&mut self, node: &mut Option, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_ident(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_jsx_attr_value( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_jsx_attr_value( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_jsx_closing_element( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_jsx_closing_element( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_module_export_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_module_export_name( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_object_lit( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_object_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_pat(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_span( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_span(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_stmt(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_str(&mut self, node: &mut Option>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_opt_str(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_true_plus_minus( + &mut self, + node: &mut Option, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_true_plus_minus( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_entity_name( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_entity_name( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_namespace_body( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_namespace_body( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_ann( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_decl( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_type_param_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_ts_type_param_instantiation( + &mut self, + node: &mut Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_var_decl_or_expr( + &mut self, + node: &mut Option>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_var_decl_or_expr( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_vec_expr_or_spreads( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_vec_expr_or_spreads( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_opt_vec_pats( + &mut self, + node: &mut Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_opt_vec_pats(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_param(&mut self, node: &mut Param<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_param_or_ts_param_prop( + &mut self, + node: &mut ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_param_or_ts_param_prop( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_param_or_ts_param_props( + &mut self, + node: &mut Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_param_or_ts_param_props( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_params(&mut self, node: &mut Vec<'a, Param<'a>>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_paren_expr(&mut self, node: &mut ParenExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_paren_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_pat(&mut self, node: &mut Pat<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_pats(&mut self, node: &mut Vec<'a, Pat<'a>>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_pats(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_private_method( + &mut self, + node: &mut PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_private_method(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_private_name(&mut self, node: &mut PrivateName, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_private_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_private_prop(&mut self, node: &mut PrivateProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_private_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_program(&mut self, node: &mut Program<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_program(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_prop(&mut self, node: &mut Prop<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_prop_name(&mut self, node: &mut PropName<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_prop_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_prop_or_spread( + &mut self, + node: &mut PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_prop_or_spread(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_prop_or_spreads( + &mut self, + node: &mut Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_prop_or_spreads(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_regex(&mut self, node: &mut Regex, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_regex(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_rest_pat(&mut self, node: &mut RestPat<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_rest_pat(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_return_stmt(&mut self, node: &mut ReturnStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_return_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_script(&mut self, node: &mut Script<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_script(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_seq_expr(&mut self, node: &mut SeqExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_seq_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_setter_prop(&mut self, node: &mut SetterProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_setter_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_simple_assign_target( + &mut self, + node: &mut SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_simple_assign_target( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_span(&mut self, node: &mut swc_common::Span, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_span(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_spread_element( + &mut self, + node: &mut SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_spread_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_static_block(&mut self, node: &mut StaticBlock<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_static_block(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_stmt(&mut self, node: &mut Stmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_stmts(&mut self, node: &mut Vec<'a, Stmt<'a>>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_stmts(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_str(&mut self, node: &mut Str, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_str(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_super(&mut self, node: &mut Super, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_super(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_super_prop(&mut self, node: &mut SuperProp<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_super_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_super_prop_expr( + &mut self, + node: &mut SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_super_prop_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_switch_case(&mut self, node: &mut SwitchCase<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_switch_case(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_switch_cases( + &mut self, + node: &mut Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_switch_cases(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_switch_stmt(&mut self, node: &mut SwitchStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_switch_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_syntax_context( + &mut self, + node: &mut swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_syntax_context(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_tagged_tpl(&mut self, node: &mut TaggedTpl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_tagged_tpl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_this_expr(&mut self, node: &mut ThisExpr, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_this_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_throw_stmt(&mut self, node: &mut ThrowStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_throw_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_tpl(&mut self, node: &mut Tpl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_tpl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_tpl_element(&mut self, node: &mut TplElement, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_tpl_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_tpl_elements( + &mut self, + node: &mut Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_tpl_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_true_plus_minus( + &mut self, + node: &mut TruePlusMinus, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_true_plus_minus(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_try_stmt(&mut self, node: &mut TryStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_try_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_array_type( + &mut self, + node: &mut TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_array_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_as_expr(&mut self, node: &mut TsAsExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_as_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_call_signature_decl( + &mut self, + node: &mut TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_call_signature_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_conditional_type( + &mut self, + node: &mut TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_conditional_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_const_assertion( + &mut self, + node: &mut TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_const_assertion( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_construct_signature_decl( + &mut self, + node: &mut TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_construct_signature_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_constructor_type( + &mut self, + node: &mut TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_constructor_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_entity_name( + &mut self, + node: &mut TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_entity_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_decl(&mut self, node: &mut TsEnumDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_enum_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_member( + &mut self, + node: &mut TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_enum_member(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_member_id( + &mut self, + node: &mut TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_enum_member_id(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_enum_members( + &mut self, + node: &mut Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_enum_members(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_export_assignment( + &mut self, + node: &mut TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_export_assignment( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_args( + &mut self, + node: &mut TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_expr_with_type_args( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_expr_with_type_argss( + &mut self, + node: &mut Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_expr_with_type_argss( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_external_module_ref( + &mut self, + node: &mut TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_external_module_ref( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_or_constructor_type( + &mut self, + node: &mut TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_fn_or_constructor_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_param(&mut self, node: &mut TsFnParam<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_fn_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_params( + &mut self, + node: &mut Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_fn_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_fn_type(&mut self, node: &mut TsFnType<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_fn_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_getter_signature( + &mut self, + node: &mut TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_getter_signature( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_import_equals_decl( + &mut self, + node: &mut TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_import_equals_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_import_type( + &mut self, + node: &mut TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_import_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_index_signature( + &mut self, + node: &mut TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_index_signature( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_indexed_access_type( + &mut self, + node: &mut TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_indexed_access_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_infer_type( + &mut self, + node: &mut TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_infer_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_instantiation( + &mut self, + node: &mut TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_instantiation(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_interface_body( + &mut self, + node: &mut TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_interface_body(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_interface_decl( + &mut self, + node: &mut TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_interface_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_intersection_type( + &mut self, + node: &mut TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_intersection_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_keyword_type( + &mut self, + node: &mut TsKeywordType, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_keyword_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_keyword_type_kind( + &mut self, + node: &mut TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_keyword_type_kind( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_lit(&mut self, node: &mut TsLit<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_lit_type(&mut self, node: &mut TsLitType<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_lit_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_mapped_type( + &mut self, + node: &mut TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_mapped_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_method_signature( + &mut self, + node: &mut TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_method_signature( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_block( + &mut self, + node: &mut TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_module_block(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_decl( + &mut self, + node: &mut TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_module_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_name( + &mut self, + node: &mut TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_module_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_module_ref( + &mut self, + node: &mut TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_module_ref(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_body( + &mut self, + node: &mut TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_namespace_body(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_decl( + &mut self, + node: &mut TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_namespace_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_namespace_export_decl( + &mut self, + node: &mut TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_namespace_export_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_non_null_expr( + &mut self, + node: &mut TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_non_null_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_optional_type( + &mut self, + node: &mut TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_optional_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_param_prop( + &mut self, + node: &mut TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_param_prop(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_param_prop_param( + &mut self, + node: &mut TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_param_prop_param( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_parenthesized_type( + &mut self, + node: &mut TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_parenthesized_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_property_signature( + &mut self, + node: &mut TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_property_signature( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_qualified_name( + &mut self, + node: &mut TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_qualified_name(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_rest_type(&mut self, node: &mut TsRestType<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_rest_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_satisfies_expr( + &mut self, + node: &mut TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_satisfies_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_setter_signature( + &mut self, + node: &mut TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_setter_signature( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_this_type(&mut self, node: &mut TsThisType, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_this_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_this_type_or_ident( + &mut self, + node: &mut TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_this_type_or_ident( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_tpl_lit_type( + &mut self, + node: &mut TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_tpl_lit_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_element( + &mut self, + node: &mut TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_tuple_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_elements( + &mut self, + node: &mut Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_tuple_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_tuple_type( + &mut self, + node: &mut TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_tuple_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type(&mut self, node: &mut TsType<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_alias_decl( + &mut self, + node: &mut TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_alias_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_ann(&mut self, node: &mut TsTypeAnn<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_assertion( + &mut self, + node: &mut TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_assertion(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_element( + &mut self, + node: &mut TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_element(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_elements( + &mut self, + node: &mut Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_elements(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_lit(&mut self, node: &mut TsTypeLit<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_type_lit(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_operator( + &mut self, + node: &mut TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_operator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_operator_op( + &mut self, + node: &mut TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_operator_op( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param( + &mut self, + node: &mut TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_param(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param_decl( + &mut self, + node: &mut TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_param_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_param_instantiation( + &mut self, + node: &mut TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_params( + &mut self, + node: &mut Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_params(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_predicate( + &mut self, + node: &mut TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_predicate(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_query( + &mut self, + node: &mut TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_query(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_query_expr( + &mut self, + node: &mut TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_type_query_expr( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_type_ref(&mut self, node: &mut TsTypeRef<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_type_ref(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_types(&mut self, node: &mut Vec<'a, TsType<'a>>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_ts_types(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_ts_union_or_intersection_type( + &mut self, + node: &mut TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_union_or_intersection_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + } + } + + #[inline] + fn visit_mut_ts_union_type( + &mut self, + node: &mut TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_ts_union_type(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_unary_expr(&mut self, node: &mut UnaryExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_unary_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_unary_op(&mut self, node: &mut UnaryOp, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_unary_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_update_expr(&mut self, node: &mut UpdateExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_update_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_update_op(&mut self, node: &mut UpdateOp, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_update_op(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_using_decl(&mut self, node: &mut UsingDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_using_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_var_decl(&mut self, node: &mut VarDecl<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_var_decl(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_var_decl_kind(&mut self, node: &mut VarDeclKind, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_var_decl_kind(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_var_decl_or_expr( + &mut self, + node: &mut VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_var_decl_or_expr(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_var_declarator( + &mut self, + node: &mut VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_var_declarator(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_var_declarators( + &mut self, + node: &mut Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) { + if self.enabled { + ::visit_mut_var_declarators(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_while_stmt(&mut self, node: &mut WhileStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_while_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_with_stmt(&mut self, node: &mut WithStmt<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_with_stmt(&mut self.visitor, node, __ast_path) + } else { + } + } + + #[inline] + fn visit_mut_yield_expr(&mut self, node: &mut YieldExpr<'a>, __ast_path: &mut AstKindPath) { + if self.enabled { + ::visit_mut_yield_expr(&mut self.visitor, node, __ast_path) + } else { + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait VisitMutWithAstPath<'a, V: ?Sized + VisitMutAstPath<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath); + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath); +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Accessibility { + #[doc = "Calls [VisitMutAstPath`::visit_mut_accessibility`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_accessibility(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Accessibility::Public => {} + Accessibility::Protected => {} + Accessibility::Private => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ArrayLit<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_array_lit`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_array_lit(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ArrayLit { span, elems } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrayLit(self::fields::ArrayLitField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayLit( + self::fields::ArrayLitField::Elems(usize::MAX), + )); + < Vec < 'a , Option < ExprOrSpread < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (elems , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ArrayPat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_array_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_array_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrayPat(self::fields::ArrayPatField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayPat( + self::fields::ArrayPatField::Elems(usize::MAX), + )); + >> as VisitMutWithAstPath>::visit_mut_with_ast_path( + elems, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayPat( + self::fields::ArrayPatField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_arrow_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_arrow_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::ReturnType, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (return_type , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignExpr(self::fields::AssignExprField::Op)); + >::visit_mut_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Left, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Right, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignPat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignPat { span, left, right } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignPat(self::fields::AssignPatField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignPat(self::fields::AssignPatField::Left)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPat( + self::fields::AssignPatField::Right, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_pat_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_pat_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignPatProp { span, key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Value, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignProp { span, key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Key, + )); + >::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Value, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignTarget<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_target`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_target(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignTarget::Simple { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTarget( + self::fields::AssignTargetField::Simple, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTarget::Pat { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTarget( + self::fields::AssignTargetField::Pat, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_target_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_target_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Array, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTargetPat::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Object, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + AssignTargetPat::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Invalid, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_auto_accessor`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_auto_accessor(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Value, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_await_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_await_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + AwaitExpr { span, arg } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AwaitExpr(self::fields::AwaitExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AwaitExpr(self::fields::AwaitExprField::Arg)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BigInt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_big_int`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BigInt { span, value, raw } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Value)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Raw)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BinExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_bin_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_bin_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BinExpr { + span, + op, + left, + right, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Op)); + >::visit_mut_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Left)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Right)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BindingIdent<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_binding_ident`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_binding_ident(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BindingIdent { id, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BindingIdent( + self::fields::BindingIdentField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BindingIdent( + self::fields::BindingIdentField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BlockStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_block_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_block_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BlockStmt { span, ctxt, stmts } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BlockStmt(self::fields::BlockStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BlockStmt(self::fields::BlockStmtField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmt( + self::fields::BlockStmtField::Stmts(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + stmts, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_block_stmt_or_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_block_stmt_or_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmtOrExpr( + self::fields::BlockStmtOrExprField::BlockStmt, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmtOrExpr( + self::fields::BlockStmtOrExprField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Bool { + #[doc = "Calls [VisitMutAstPath`::visit_mut_bool`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_bool(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Bool { span, value } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Bool(self::fields::BoolField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BreakStmt { + #[doc = "Calls [VisitMutAstPath`::visit_mut_break_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_break_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + BreakStmt { span, label } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BreakStmt(self::fields::BreakStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BreakStmt( + self::fields::BreakStmtField::Label, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for CallExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_call_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_call_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Callee)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CallExpr( + self::fields::CallExprField::Args(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CallExpr( + self::fields::CallExprField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Callee<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_callee`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_callee(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Callee::Super { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Super)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Callee::Import { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Import)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Callee::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for CatchClause<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_catch_clause`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_catch_clause(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + CatchClause { span, param, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Param, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Body, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Class<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Class(self::fields::ClassField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Class(self::fields::ClassField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Body(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Class(self::fields::ClassField::SuperClass)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + super_class, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Class(self::fields::ClassField::TypeParams)); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::SuperTypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (super_type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Implements(usize::MAX), + )); + < Vec < 'a , TsExprWithTypeArgs < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (implements , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ClassDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ClassDecl { + ident, + declare, + class, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassDecl( + self::fields::ClassDeclField::Ident, + )); + >::visit_mut_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassDecl( + self::fields::ClassDeclField::Class, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ClassExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ClassExpr { ident, class } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassExpr( + self::fields::ClassExprField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassExpr( + self::fields::ClassExprField::Class, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ClassMember<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_member`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_member(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ClassMember::Constructor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Constructor, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::Method { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Method, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::PrivateMethod { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::PrivateMethod, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::ClassProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::ClassProp, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::PrivateProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::PrivateProp, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::TsIndexSignature, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::Empty { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Empty, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::StaticBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::StaticBlock, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ClassMember::AutoAccessor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::AutoAccessor, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ClassMethod<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_method`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_method(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Function, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Kind, + )); + >::visit_mut_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ClassProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ClassProp(self::fields::ClassPropField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ClassProp(self::fields::ClassPropField::Key)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Value, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_computed_prop_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_computed_prop_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ComputedPropName { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ComputedPropName( + self::fields::ComputedPropNameField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ComputedPropName( + self::fields::ComputedPropNameField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for CondExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_cond_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_cond_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Test)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Cons)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Alt)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Constructor<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_constructor`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_constructor(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Ctxt, + )); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Params(usize::MAX), + )); + < Vec < 'a , ParamOrTsParamProp < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Body, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ContinueStmt { + #[doc = "Calls [VisitMutAstPath`::visit_mut_continue_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_continue_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ContinueStmt { span, label } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ContinueStmt( + self::fields::ContinueStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ContinueStmt( + self::fields::ContinueStmtField::Label, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for DebuggerStmt { + #[doc = "Calls [VisitMutAstPath`::visit_mut_debugger_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_debugger_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + DebuggerStmt { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DebuggerStmt( + self::fields::DebuggerStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Decl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Decl::Class { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Class)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Fn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Fn)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Var { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Var)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::Using { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Using)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsInterface { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decl(self::fields::DeclField::TsInterface)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsTypeAlias { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decl(self::fields::DeclField::TsTypeAlias)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsEnum { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::TsEnum)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Decl::TsModule { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::TsModule)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Decorator<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_decorator`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_decorator(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Decorator { span, expr } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decorator(self::fields::DecoratorField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decorator(self::fields::DecoratorField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_default_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_default_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + DefaultDecl::Class { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::Class, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + DefaultDecl::Fn { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::Fn, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::TsInterfaceDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_do_while_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_do_while_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + DoWhileStmt { span, test, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Test, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Body, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for EmptyStmt { + #[doc = "Calls [VisitMutAstPath`::visit_mut_empty_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_empty_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + EmptyStmt { span } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::EmptyStmt(self::fields::EmptyStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportAll<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_all`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_all(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::Src)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::With)); + < Option < Box < 'a , ObjectLit < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (with , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportDecl { span, decl } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDecl( + self::fields::ExportDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDecl( + self::fields::ExportDeclField::Decl, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_default_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_default_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportDefaultDecl { span, decl } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultDecl( + self::fields::ExportDefaultDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultDecl( + self::fields::ExportDefaultDeclField::Decl, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_default_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_default_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportDefaultExpr { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultExpr( + self::fields::ExportDefaultExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultExpr( + self::fields::ExportDefaultExprField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_default_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_default_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportDefaultSpecifier { exported } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportDefaultSpecifier( + self::fields::ExportDefaultSpecifierField::Exported, + )); + >::visit_mut_with_ast_path( + exported, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_named_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_named_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Orig, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + orig, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Exported, + )); + < Option < ModuleExportName < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (exported , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for ExportNamespaceSpecifier<'a> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_namespace_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_namespace_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportNamespaceSpecifier { span, name } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamespaceSpecifier( + self::fields::ExportNamespaceSpecifierField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamespaceSpecifier( + self::fields::ExportNamespaceSpecifierField::Name, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Namespace, + )); + < Box < 'a , ExportNamespaceSpecifier < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ExportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Default, + )); + < Box < 'a , ExportDefaultSpecifier > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ExportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Named, + )); + < Box < 'a , ExportNamedSpecifier < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Expr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Expr::This { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::This)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Array { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Array)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Object { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Object)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Fn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Fn)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Unary { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Unary)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Update { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Update)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Bin { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Bin)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Assign)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Member { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Member)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::SuperProp { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::SuperProp)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Cond { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Cond)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Call { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Call)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::New { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::New)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Seq { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Seq)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Ident { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Ident)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Lit { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Lit)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Tpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Tpl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TaggedTpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TaggedTpl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Arrow { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Arrow)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Class { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Class)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Yield { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Yield)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::MetaProp { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::MetaProp)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Await { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Await)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Paren { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Paren)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXMember { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxmember)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::JsxnamespacedName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXEmpty { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxempty)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXElement { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxelement)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxfragment)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsTypeAssertion, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsConstAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsConstAssertion, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsNonNull { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TsNonNull)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsAs { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TsAs)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsInstantiation, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::TsSatisfies)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::PrivateName)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::OptChain { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::OptChain)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Expr::Invalid { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Invalid)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_expr_or_spread`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_expr_or_spread(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExprOrSpread { spread, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExprOrSpread( + self::fields::ExprOrSpreadField::Spread, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + spread, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExprOrSpread( + self::fields::ExprOrSpreadField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ExprStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_expr_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_expr_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ExprStmt { span, expr } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExprStmt(self::fields::ExprStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExprStmt(self::fields::ExprStmtField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for FnDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_fn_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + FnDecl { + ident, + declare, + function, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnDecl(self::fields::FnDeclField::Ident)); + >::visit_mut_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnDecl(self::fields::FnDeclField::Function)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for FnExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_fn_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_fn_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + FnExpr { ident, function } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnExpr(self::fields::FnExprField::Ident)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnExpr(self::fields::FnExprField::Function)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ForHead<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_for_head`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_for_head(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ForHead::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForHead(self::fields::ForHeadField::VarDecl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ForHead::UsingDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForHead( + self::fields::ForHeadField::UsingDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ForHead::Pat { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ForHead(self::fields::ForHeadField::Pat)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ForInStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_for_in_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_for_in_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Left)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForInStmt( + self::fields::ForInStmtField::Right, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_for_of_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_for_of_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Left)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForOfStmt( + self::fields::ForOfStmtField::Right, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ForStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_for_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_for_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Init)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Test)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Update)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + update, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Function<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_function`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_function(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Body)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::ReturnType, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (return_type , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for GetterProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_getter_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_getter_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Body, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Ident { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ident`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ident(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Sym)); + >::visit_mut_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for IdentName { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ident_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ident_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + IdentName { span, sym } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IdentName(self::fields::IdentNameField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IdentName(self::fields::IdentNameField::Sym)); + >::visit_mut_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for IfStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_if_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_if_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Test)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Cons)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Alt)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Import { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Import { span, phase } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Import(self::fields::ImportField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Import(self::fields::ImportField::Phase)); + >::visit_mut_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Specifiers(usize::MAX), + )); + < Vec < 'a , ImportSpecifier < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (specifiers , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Src, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::With, + )); + < Option < Box < 'a , ObjectLit < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (with , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Phase, + )); + >::visit_mut_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_default_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_default_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportDefaultSpecifier { span, local } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportDefaultSpecifier( + self::fields::ImportDefaultSpecifierField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportDefaultSpecifier( + self::fields::ImportDefaultSpecifierField::Local, + )); + >::visit_mut_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_named_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_named_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Local, + )); + >::visit_mut_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Imported, + )); + < Option < ModuleExportName < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (imported , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportPhase { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_phase`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_phase(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportPhase::Evaluation => {} + ImportPhase::Source => {} + ImportPhase::Defer => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Named, + )); + < Box < 'a , ImportNamedSpecifier < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ImportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Default, + )); + < Box < 'a , ImportDefaultSpecifier > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ImportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Namespace, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_star_as_specifier`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_star_as_specifier(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportStarAsSpecifier { span, local } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportStarAsSpecifier( + self::fields::ImportStarAsSpecifierField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportStarAsSpecifier( + self::fields::ImportStarAsSpecifierField::Local, + )); + >::visit_mut_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportWith<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_with`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_with(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportWith { span, values } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWith( + self::fields::ImportWithField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWith( + self::fields::ImportWithField::Values(usize::MAX), + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + values, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ImportWithItem { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_with_item`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_with_item(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ImportWithItem { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWithItem( + self::fields::ImportWithItemField::Key, + )); + >::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWithItem( + self::fields::ImportWithItemField::Value, + )); + >::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Invalid { + #[doc = "Calls [VisitMutAstPath`::visit_mut_invalid`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_invalid(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Invalid { span } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Invalid(self::fields::InvalidField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXAttr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_attr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXAttr { span, name, value } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Name)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Value)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_attr_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrName( + self::fields::JSXAttrNameField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrName( + self::fields::JSXAttrNameField::JsxnamespacedName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_attr_or_spread`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr_or_spread(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrOrSpread( + self::fields::JSXAttrOrSpreadField::Jsxattr, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrOrSpread( + self::fields::JSXAttrOrSpreadField::SpreadElement, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_attr_value`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr_value(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Lit, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::JsxexprContainer, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Jsxelement, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Jsxfragment, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_closing_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_closing_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXClosingElement { span, name } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingElement( + self::fields::JSXClosingElementField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingElement( + self::fields::JSXClosingElementField::Name, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXClosingFragment { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_closing_fragment`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_closing_fragment(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXClosingFragment { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingFragment( + self::fields::JSXClosingFragmentField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Opening, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Children(usize::MAX), + )); + < Vec < 'a , JSXElementChild < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (children , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Closing, + )); + < Option < JSXClosingElement < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (closing , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_element_child`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element_child(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxtext, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::JsxexprContainer, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::JsxspreadChild, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxelement, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxfragment, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXElementName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_element_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXElementName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::JsxmemberExpr, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::JsxnamespacedName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXEmptyExpr { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_empty_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_empty_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXEmptyExpr { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXEmptyExpr( + self::fields::JSXEmptyExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExpr( + self::fields::JSXExprField::JsxemptyExpr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXExpr::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::JSXExpr(self::fields::JSXExprField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_expr_container`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_expr_container(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXExprContainer { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExprContainer( + self::fields::JSXExprContainerField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExprContainer( + self::fields::JSXExprContainerField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXFragment<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_fragment`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_fragment(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Opening, + )); + >::visit_mut_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Children(usize::MAX), + )); + < Vec < 'a , JSXElementChild < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (children , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Closing, + )); + >::visit_mut_with_ast_path( + closing, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_member_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_member_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXMemberExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Obj, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Prop, + )); + >::visit_mut_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXNamespacedName { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_namespaced_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_namespaced_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXNamespacedName { span, ns, name } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Ns, + )); + >::visit_mut_with_ast_path( + ns, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Name, + )); + >::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXObject<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_object`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_object(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXObject( + self::fields::JSXObjectField::JsxmemberExpr, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + JSXObject::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXObject( + self::fields::JSXObjectField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_opening_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_opening_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Name, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Attrs(usize::MAX), + )); + < Vec < 'a , JSXAttrOrSpread < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (attrs , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXOpeningFragment { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_opening_fragment`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_opening_fragment(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXOpeningFragment { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningFragment( + self::fields::JSXOpeningFragmentField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_spread_child`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_spread_child(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXSpreadChild { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXSpreadChild( + self::fields::JSXSpreadChildField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXSpreadChild( + self::fields::JSXSpreadChildField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for JSXText { + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_text`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_text(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + JSXText { span, value, raw } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Value)); + >::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Raw)); + >::visit_mut_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Key<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_key`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_key(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Key::Private { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Key(self::fields::KeyField::Private)); + >::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Key::Public { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Key(self::fields::KeyField::Public)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_key_value_pat_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_key_value_pat_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + KeyValuePatProp { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValuePatProp( + self::fields::KeyValuePatPropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValuePatProp( + self::fields::KeyValuePatPropField::Value, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_key_value_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_key_value_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + KeyValueProp { key, value } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValueProp( + self::fields::KeyValuePropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValueProp( + self::fields::KeyValuePropField::Value, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_labeled_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_labeled_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + LabeledStmt { span, label, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Label, + )); + >::visit_mut_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Body, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Lit<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_lit`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_lit(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Lit::Str { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Str)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Bool { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Bool)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Null { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Null)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Num { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Num)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::BigInt { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::BigInt)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::Regex { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Regex)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Lit::JSXText { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Jsxtext)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MemberExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_member_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_member_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MemberExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Obj, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Prop, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MemberProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_member_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_member_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MemberProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + MemberProp::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::PrivateName, + )); + >::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + MemberProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::Computed, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MetaPropExpr { + #[doc = "Calls [VisitMutAstPath`::visit_mut_meta_prop_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MetaPropExpr { span, kind } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MetaPropExpr( + self::fields::MetaPropExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MetaPropExpr( + self::fields::MetaPropExprField::Kind, + )); + >::visit_mut_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MetaPropKind { + #[doc = "Calls [VisitMutAstPath`::visit_mut_meta_prop_kind`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_meta_prop_kind(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MetaPropKind::NewTarget => {} + MetaPropKind::ImportMeta => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MethodKind { + #[doc = "Calls [VisitMutAstPath`::visit_mut_method_kind`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_method_kind(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MethodKind::Method => {} + MethodKind::Getter => {} + MethodKind::Setter => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for MethodProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_method_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_method_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + MethodProp { key, function } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MethodProp( + self::fields::MethodPropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MethodProp( + self::fields::MethodPropField::Function, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Module<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_module`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_module(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Module { + span, + body, + shebang, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Module(self::fields::ModuleField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Module( + self::fields::ModuleField::Body(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Module(self::fields::ModuleField::Shebang)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_module_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_module_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ModuleDecl::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::Import, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportNamed, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDefaultDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDefaultExpr, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::ExportAll { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportAll, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsImportEquals, + )); + < Box < 'a , TsImportEqualsDecl < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsExportAssignment, + )); + < Box < 'a , TsExportAssignment < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsNamespaceExport, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_module_export_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_module_export_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleExportName( + self::fields::ModuleExportNameField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleExportName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleExportName( + self::fields::ModuleExportNameField::Str, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ModuleItem<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_module_item`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_module_item(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleItem( + self::fields::ModuleItemField::ModuleDecl, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ModuleItem::Stmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleItem( + self::fields::ModuleItemField::Stmt, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for NamedExport<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_named_export`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_named_export(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Specifiers(usize::MAX), + )); + < Vec < 'a , ExportSpecifier < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (specifiers , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Src, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::With, + )); + < Option < Box < 'a , ObjectLit < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (with , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for NewExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_new_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_new_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Callee)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NewExpr( + self::fields::NewExprField::Args(usize::MAX), + )); + < Option < Vec < 'a , ExprOrSpread < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (args , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::TypeArgs)); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Null { + #[doc = "Calls [VisitMutAstPath`::visit_mut_null`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_null(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Null { span } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Null(self::fields::NullField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Number { + #[doc = "Calls [VisitMutAstPath`::visit_mut_number`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_number(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Number { span, value, raw } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Number(self::fields::NumberField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Number(self::fields::NumberField::Raw)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ObjectLit<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_object_lit`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_object_lit(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ObjectLit { span, props } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ObjectLit(self::fields::ObjectLitField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectLit( + self::fields::ObjectLitField::Props(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ObjectPat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_object_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_object_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ObjectPat(self::fields::ObjectPatField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPat( + self::fields::ObjectPatField::Props(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPat( + self::fields::ObjectPatField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_object_pat_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_object_pat_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::KeyValue, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ObjectPatProp::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::Assign, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ObjectPatProp::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::Rest, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for OptCall<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_call`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_call(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Callee)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptCall( + self::fields::OptCallField::Args(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::TypeArgs)); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for OptChainBase<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_chain_base`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_chain_base(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + OptChainBase::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainBase( + self::fields::OptChainBaseField::Member, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + OptChainBase::Call { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainBase( + self::fields::OptChainBaseField::Call, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_chain_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_chain_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + OptChainExpr { + span, + optional, + base, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainExpr( + self::fields::OptChainExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainExpr( + self::fields::OptChainExprField::Base, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + base, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Param<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_param`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_param(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Param { + span, + decorators, + pat, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Param(self::fields::ParamField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Param( + self::fields::ParamField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Param(self::fields::ParamField::Pat)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + pat, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_param_or_ts_param_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_param_or_ts_param_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ParamOrTsParamProp( + self::fields::ParamOrTsParamPropField::TsParamProp, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ParamOrTsParamProp( + self::fields::ParamOrTsParamPropField::Param, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ParenExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_paren_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_paren_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ParenExpr { span, expr } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ParenExpr(self::fields::ParenExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ParenExpr(self::fields::ParenExprField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Pat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Pat::Ident { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Ident)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Array { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Array)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Rest { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Rest)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Object { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Object)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Assign)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Invalid { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Invalid)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Pat::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_private_method`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_private_method(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Key, + )); + >::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Function, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Kind, + )); + >::visit_mut_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for PrivateName { + #[doc = "Calls [VisitMutAstPath`::visit_mut_private_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_private_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + PrivateName { span, name } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateName( + self::fields::PrivateNameField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateName( + self::fields::PrivateNameField::Name, + )); + >::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for PrivateProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_private_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_private_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Ctxt, + )); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Key, + )); + >::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Value, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Program<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_program`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_program(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Program::Module { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Program(self::fields::ProgramField::Module)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Program::Script { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Program(self::fields::ProgramField::Script)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Prop<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Prop::Shorthand { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Shorthand)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::KeyValue { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::KeyValue)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Assign)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Getter { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Getter)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Setter { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Setter)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Prop::Method { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Method)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for PropName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_prop_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_prop_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + PropName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Ident)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Str)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Num { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Num)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropName( + self::fields::PropNameField::Computed, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropName::BigInt { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::BigInt)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_prop_or_spread`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_prop_or_spread(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropOrSpread( + self::fields::PropOrSpreadField::Spread, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + PropOrSpread::Prop { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropOrSpread( + self::fields::PropOrSpreadField::Prop, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Regex { + #[doc = "Calls [VisitMutAstPath`::visit_mut_regex`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_regex(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Regex { span, exp, flags } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Regex(self::fields::RegexField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Regex(self::fields::RegexField::Exp)); + >::visit_mut_with_ast_path( + exp, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Regex(self::fields::RegexField::Flags)); + >::visit_mut_with_ast_path( + flags, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for RestPat<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_rest_pat`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_rest_pat(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::RestPat( + self::fields::RestPatField::Dot3Token, + )); + >::visit_mut_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::Arg)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::TypeAnn)); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_return_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_return_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ReturnStmt { span, arg } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ReturnStmt( + self::fields::ReturnStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ReturnStmt( + self::fields::ReturnStmtField::Arg, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Script<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_script`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_script(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Script { + span, + body, + shebang, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Script(self::fields::ScriptField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Script( + self::fields::ScriptField::Body(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Script(self::fields::ScriptField::Shebang)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SeqExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_seq_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_seq_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SeqExpr { span, exprs } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::SeqExpr(self::fields::SeqExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SeqExpr( + self::fields::SeqExprField::Exprs(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SetterProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_setter_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_setter_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::ThisParam, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + this_param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Param, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Body, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_simple_assign_target`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_simple_assign_target(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Ident, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Member, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::SuperProp, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Paren, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::OptChain, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsAs, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsSatisfies, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsNonNull, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsTypeAssertion, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsInstantiation, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Invalid, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SpreadElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_spread_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_spread_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SpreadElement { dot3_token, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SpreadElement( + self::fields::SpreadElementField::Dot3Token, + )); + >::visit_mut_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SpreadElement( + self::fields::SpreadElementField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for StaticBlock<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_static_block`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_static_block(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + StaticBlock { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::StaticBlock( + self::fields::StaticBlockField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::StaticBlock( + self::fields::StaticBlockField::Body, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Stmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Stmt::Block { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Block)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Empty { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Empty)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Debugger { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Debugger)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::With { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::With)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Return { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Return)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Labeled { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Labeled)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Break { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Break)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Continue { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Continue)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::If { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::If)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Switch { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Switch)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Throw { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Throw)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Try { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Try)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::While { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::While)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::DoWhile { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::DoWhile)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::For { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::For)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::ForIn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::ForIn)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::ForOf { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::ForOf)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Decl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Decl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + Stmt::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Expr)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Str { + #[doc = "Calls [VisitMutAstPath`::visit_mut_str`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_str(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Str { span, value, raw } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Value)); + >::visit_mut_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Raw)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Super { + #[doc = "Calls [VisitMutAstPath`::visit_mut_super`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_super(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Super { span } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Super(self::fields::SuperField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SuperProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_super_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_super_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SuperProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperProp( + self::fields::SuperPropField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + SuperProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperProp( + self::fields::SuperPropField::Computed, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_super_prop_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_super_prop_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SuperPropExpr { span, obj, prop } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Obj, + )); + >::visit_mut_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Prop, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SwitchCase<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_switch_case`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_case(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SwitchCase { span, test, cons } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Test, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Cons(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_switch_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Discriminant, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + discriminant, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Cases(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + cases, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_tagged_tpl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_tagged_tpl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Tag)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + tag, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TaggedTpl( + self::fields::TaggedTplField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Tpl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + tpl, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ThisExpr { + #[doc = "Calls [VisitMutAstPath`::visit_mut_this_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_this_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ThisExpr { span } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThisExpr(self::fields::ThisExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_throw_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_throw_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + ThrowStmt { span, arg } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThrowStmt(self::fields::ThrowStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThrowStmt(self::fields::ThrowStmtField::Arg)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Tpl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_tpl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Tpl { + span, + exprs, + quasis, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Tpl(self::fields::TplField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Tpl( + self::fields::TplField::Exprs(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Tpl( + self::fields::TplField::Quasis(usize::MAX), + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TplElement { + #[doc = "Calls [VisitMutAstPath`::visit_mut_tpl_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Cooked, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + cooked, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Raw, + )); + >::visit_mut_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TruePlusMinus { + #[doc = "Calls [VisitMutAstPath`::visit_mut_true_plus_minus`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_true_plus_minus(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TruePlusMinus::True => {} + TruePlusMinus::Plus => {} + TruePlusMinus::Minus => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TryStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_try_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_try_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Block)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + block, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Handler)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + handler, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TryStmt( + self::fields::TryStmtField::Finalizer, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + finalizer, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsArrayType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_array_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_array_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsArrayType { span, elem_type } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsArrayType( + self::fields::TsArrayTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsArrayType( + self::fields::TsArrayTypeField::ElemType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + elem_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_as_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_as_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsAsExpr(self::fields::TsAsExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsAsExpr(self::fields::TsAsExprField::Expr)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsAsExpr( + self::fields::TsAsExprField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_call_signature_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_call_signature_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_conditional_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_conditional_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::CheckType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + check_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::ExtendsType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + extends_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::TrueType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + true_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::FalseType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + false_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_const_assertion`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_const_assertion(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsConstAssertion { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstAssertion( + self::fields::TsConstAssertionField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstAssertion( + self::fields::TsConstAssertionField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for TsConstructSignatureDecl<'a> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_construct_signature_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_construct_signature_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_constructor_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_constructor_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::TypeAnn, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsEntityName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_entity_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_entity_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEntityName( + self::fields::TsEntityNameField::TsQualifiedName, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsEntityName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEntityName( + self::fields::TsEntityNameField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_enum_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumDecl( + self::fields::TsEnumDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsEnumDecl(self::fields::TsEnumDeclField::Id)); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumDecl( + self::fields::TsEnumDeclField::Members(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_enum_member`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_member(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsEnumMember { span, id, init } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Id, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Init, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_enum_member_id`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_member_id(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMemberId( + self::fields::TsEnumMemberIdField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsEnumMemberId::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMemberId( + self::fields::TsEnumMemberIdField::Str, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_export_assignment`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_export_assignment(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsExportAssignment { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExportAssignment( + self::fields::TsExportAssignmentField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExportAssignment( + self::fields::TsExportAssignmentField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_expr_with_type_args`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_expr_with_type_args(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsExternalModuleRef { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_external_module_ref`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_external_module_ref(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsExternalModuleRef { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExternalModuleRef( + self::fields::TsExternalModuleRefField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExternalModuleRef( + self::fields::TsExternalModuleRefField::Expr, + )); + >::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_fn_or_constructor_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_or_constructor_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnOrConstructorType( + self::fields::TsFnOrConstructorTypeField::TsFnType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnOrConstructorType( + self::fields::TsFnOrConstructorTypeField::TsConstructorType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsFnParam<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_fn_param`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_param(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsFnParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Ident, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Array, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsFnParam(self::fields::TsFnParamField::Rest)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsFnParam::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Object, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsFnType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_fn_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsFnType(self::fields::TsFnTypeField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::TypeAnn, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_getter_signature`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_getter_signature(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_import_equals_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_import_equals_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::ModuleRef, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + module_ref, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsImportType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_import_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_import_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Arg, + )); + >::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Qualifier, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + qualifier, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_index_signature`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_index_signature(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_indexed_access_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_indexed_access_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::ObjType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + obj_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::IndexType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + index_type, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsInferType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_infer_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_infer_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsInferType { span, type_param } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInferType( + self::fields::TsInferTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInferType( + self::fields::TsInferTypeField::TypeParam, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_instantiation`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_instantiation(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::TypeArgs, + )); + < Box < 'a , TsTypeParamInstantiation < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_interface_body`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_interface_body(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsInterfaceBody { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceBody( + self::fields::TsInterfaceBodyField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceBody( + self::fields::TsInterfaceBodyField::Body(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_interface_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_interface_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Extends(usize::MAX), + )); + < Vec < 'a , TsExprWithTypeArgs < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (extends , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Body, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_intersection_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_intersection_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsIntersectionType { span, types } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIntersectionType( + self::fields::TsIntersectionTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIntersectionType( + self::fields::TsIntersectionTypeField::Types(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsKeywordType { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_keyword_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_keyword_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsKeywordType { span, kind } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsKeywordType( + self::fields::TsKeywordTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsKeywordType( + self::fields::TsKeywordTypeField::Kind, + )); + >::visit_mut_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_keyword_type_kind`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_keyword_type_kind(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsKeywordTypeKind::TsAnyKeyword => {} + TsKeywordTypeKind::TsUnknownKeyword => {} + TsKeywordTypeKind::TsNumberKeyword => {} + TsKeywordTypeKind::TsObjectKeyword => {} + TsKeywordTypeKind::TsBooleanKeyword => {} + TsKeywordTypeKind::TsBigIntKeyword => {} + TsKeywordTypeKind::TsStringKeyword => {} + TsKeywordTypeKind::TsSymbolKeyword => {} + TsKeywordTypeKind::TsVoidKeyword => {} + TsKeywordTypeKind::TsUndefinedKeyword => {} + TsKeywordTypeKind::TsNullKeyword => {} + TsKeywordTypeKind::TsNeverKeyword => {} + TsKeywordTypeKind::TsIntrinsicKeyword => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsLit<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_lit`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsLit::Number { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Number)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Str { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Str)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Bool { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Bool)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::BigInt { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::BigInt)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsLit::Tpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Tpl)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsLitType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_lit_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_lit_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsLitType { span, lit } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsLitType(self::fields::TsLitTypeField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsLitType(self::fields::TsLitTypeField::Lit)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + lit, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsMappedType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_mapped_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_mapped_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Readonly, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + readonly, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::TypeParam, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::NameType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + name_type, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Optional, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + optional, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::TypeAnn, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_method_signature`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_method_signature(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_module_block`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_module_block(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsModuleBlock { span, body } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleBlock( + self::fields::TsModuleBlockField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleBlock( + self::fields::TsModuleBlockField::Body(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_module_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_module_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Id, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Body, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsModuleName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_module_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_module_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsModuleName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleName( + self::fields::TsModuleNameField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsModuleName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleName( + self::fields::TsModuleNameField::Str, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_module_ref`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_module_ref(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleRef( + self::fields::TsModuleRefField::TsEntityName, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleRef( + self::fields::TsModuleRefField::TsExternalModuleRef, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_namespace_body`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_namespace_body(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceBody( + self::fields::TsNamespaceBodyField::TsModuleBlock, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceBody( + self::fields::TsNamespaceBodyField::TsNamespaceDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_namespace_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_namespace_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Body, + )); + < Box < 'a , TsNamespaceBody < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (body , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_namespace_export_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_namespace_export_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsNamespaceExportDecl { span, id } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsNamespaceExportDecl( + self::fields::TsNamespaceExportDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsNamespaceExportDecl( + self::fields::TsNamespaceExportDeclField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_non_null_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_non_null_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsNonNullExpr { span, expr } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNonNullExpr( + self::fields::TsNonNullExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNonNullExpr( + self::fields::TsNonNullExprField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_optional_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_optional_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsOptionalType { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsOptionalType( + self::fields::TsOptionalTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsOptionalType( + self::fields::TsOptionalTypeField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsParamProp<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_param_prop`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_param_prop(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Decorators(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Accessibility, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Param, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_param_prop_param`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_param_prop_param(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamPropParam( + self::fields::TsParamPropParamField::Ident, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsParamPropParam::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamPropParam( + self::fields::TsParamPropParamField::Assign, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_parenthesized_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_parenthesized_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsParenthesizedType { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParenthesizedType( + self::fields::TsParenthesizedTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParenthesizedType( + self::fields::TsParenthesizedTypeField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_property_signature`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_property_signature(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_qualified_name`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_qualified_name(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsQualifiedName { span, left, right } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Left, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Right, + )); + >::visit_mut_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsRestType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_rest_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_rest_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsRestType { span, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsRestType( + self::fields::TsRestTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsRestType( + self::fields::TsRestTypeField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_satisfies_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_satisfies_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_setter_signature`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_setter_signature(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Key, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Param, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsThisType { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_this_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_this_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsThisType { span } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisType( + self::fields::TsThisTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_this_type_or_ident`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_this_type_or_ident(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisTypeOrIdent( + self::fields::TsThisTypeOrIdentField::TsThisType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisTypeOrIdent( + self::fields::TsThisTypeOrIdentField::Ident, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_tpl_lit_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_tpl_lit_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Types(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Quasis(usize::MAX), + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_tuple_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_tuple_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTupleElement { span, label, ty } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Label, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Ty, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + ty, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTupleType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_tuple_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_tuple_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTupleType { span, elem_types } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleType( + self::fields::TsTupleTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleType( + self::fields::TsTupleTypeField::ElemTypes(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + elem_types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsKeywordType, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsThisType)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsFnOrConstructorType, + )); + < Box < 'a , TsFnOrConstructorType < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsType::TsTypeRef { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsTypeRef)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeQuery { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypeQuery, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypeLit { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsTypeLit)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsArrayType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsArrayType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTupleType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTupleType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsOptionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsOptionalType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsRestType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsRestType)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsUnionOrIntersectionType, + )); + < Box < 'a , TsUnionOrIntersectionType < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsType::TsConditionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsConditionalType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsInferType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsInferType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsParenthesizedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsParenthesizedType, + )); + < Box < 'a , TsParenthesizedType < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsType::TsTypeOperator { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypeOperator, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsIndexedAccessType, + )); + < Box < 'a , TsIndexedAccessType < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsType::TsMappedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsMappedType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsLitType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsLitType)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsTypePredicate { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypePredicate, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsType::TsImportType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsImportType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_alias_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_alias_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::Id, + )); + >::visit_mut_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamDecl < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_ann`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ann(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeAnn { span, type_ann } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeAnn(self::fields::TsTypeAnnField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAnn( + self::fields::TsTypeAnnField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_assertion`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_assertion(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_element`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_element(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsCallSignatureDecl, + )); + < Box < 'a , TsCallSignatureDecl < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsConstructSignatureDecl, + )); + < Box < 'a , TsConstructSignatureDecl < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsPropertySignature, + )); + < Box < 'a , TsPropertySignature < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsGetterSignature, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsSetterSignature, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsMethodSignature, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsIndexSignature, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_lit`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_lit(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeLit { span, members } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeLit(self::fields::TsTypeLitField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeLit( + self::fields::TsTypeLitField::Members(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_operator`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_operator(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeOperator { span, op, type_ann } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::Op, + )); + >::visit_mut_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::TypeAnn, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_operator_op`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_operator_op(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeOperatorOp::KeyOf => {} + TsTypeOperatorOp::Unique => {} + TsTypeOperatorOp::ReadOnly => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_param`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_param(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Name, + )); + >::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Constraint, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + constraint, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Default, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + default, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_param_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_param_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeParamDecl { span, params } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParamDecl( + self::fields::TsTypeParamDeclField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParamDecl( + self::fields::TsTypeParamDeclField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for TsTypeParamInstantiation<'a> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_param_instantiation`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_param_instantiation(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeParamInstantiation { span, params } => { + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsTypeParamInstantiation( + self::fields::TsTypeParamInstantiationField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsTypeParamInstantiation( + self::fields::TsTypeParamInstantiationField::Params(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_predicate`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_predicate(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::ParamName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + param_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::TypeAnn, + )); + < Option < Box < 'a , TsTypeAnn < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_ann , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_query`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_query(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::ExprName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + expr_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_query_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_query_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQueryExpr( + self::fields::TsTypeQueryExprField::TsEntityName, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQueryExpr( + self::fields::TsTypeQueryExprField::Import, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_ref`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_ref(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeRef(self::fields::TsTypeRefField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeRef( + self::fields::TsTypeRefField::TypeName, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + type_name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeRef( + self::fields::TsTypeRefField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for TsUnionOrIntersectionType<'a> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_union_or_intersection_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_union_or_intersection_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsUnionOrIntersectionType( + self::fields::TsUnionOrIntersectionTypeField::TsUnionType, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsUnionOrIntersectionType( + self::fields::TsUnionOrIntersectionTypeField::TsIntersectionType, + )); + < Box < 'a , TsIntersectionType < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for TsUnionType<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_union_type`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_union_type(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + TsUnionType { span, types } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsUnionType( + self::fields::TsUnionTypeField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsUnionType( + self::fields::TsUnionTypeField::Types(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_unary_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + UnaryExpr { span, op, arg } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Op)); + >::visit_mut_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Arg)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_update_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_update_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UpdateExpr( + self::fields::UpdateExprField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UpdateExpr(self::fields::UpdateExprField::Op)); + >::visit_mut_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UpdateExpr( + self::fields::UpdateExprField::Arg, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for UsingDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_using_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_using_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UsingDecl(self::fields::UsingDeclField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UsingDecl( + self::fields::UsingDeclField::Decls(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for VarDecl<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_var_decl`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Ctxt)); + >::visit_mut_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Kind)); + >::visit_mut_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDecl( + self::fields::VarDeclField::Decls(usize::MAX), + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for VarDeclKind { + #[doc = "Calls [VisitMutAstPath`::visit_mut_var_decl_kind`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl_kind(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + VarDeclKind::Var => {} + VarDeclKind::Let => {} + VarDeclKind::Const => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_var_decl_or_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_var_decl_or_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclOrExpr( + self::fields::VarDeclOrExprField::VarDecl, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclOrExpr( + self::fields::VarDeclOrExprField::Expr, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_var_declarator`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_var_declarator(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Span, + )); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Name, + )); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Init, + )); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for WhileStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_while_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_while_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + WhileStmt { span, test, body } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Test)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for WithStmt<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_with_stmt`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_with_stmt(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + WithStmt { span, obj, body } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Obj)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Body)); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for YieldExpr<'a> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_yield_expr`] with `self`."] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_yield_expr(visitor, self, __ast_path) + } + + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::YieldExpr(self::fields::YieldExprField::Span)); + >::visit_mut_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::YieldExpr(self::fields::YieldExprField::Arg)); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for AssignOp { + #[doc = "Calls [VisitMutAstPath`::visit_mut_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_assign_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for swc_atoms::Atom { + #[doc = "Calls [VisitMutAstPath`::visit_mut_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_atom(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BigIntValue { + #[doc = "Calls [VisitMutAstPath`::visit_mut_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_big_int_value(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for BinaryOp { + #[doc = "Calls [VisitMutAstPath`::visit_mut_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_binary_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, ClassMember<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_class_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_class_members(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Decorator<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_decorators`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_decorators(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, ExportSpecifier<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_export_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, ExprOrSpread<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Expr<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_exprs`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_exprs(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, ImportSpecifier<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, ImportWithItem> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_import_with_items(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, JSXAttrOrSpread<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_attr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, JSXElementChild<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_jsx_element_childs(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, ModuleItem<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_module_items`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_module_items(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, ObjectPatProp<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_object_pat_props(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_accessibility(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => >::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_atom(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => >::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_block_stmt(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_catch_clause(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_expr(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_expr_or_spread(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ident(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => >::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_jsx_attr_value(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_jsx_closing_element(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_module_export_name(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_object_lit(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_pat(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_span(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => >::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_stmt(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_str(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_true_plus_minus(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => >::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_entity_name(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_namespace_body(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_type(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_type_ann(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_type_param_decl(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => { + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ) + } + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_ts_type_param_instantiation`] with `self`. \ + (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_ts_type_param_instantiation(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { Some (inner) => { < Box < 'a , TsTypeParamInstantiation < 'a > > as VisitMutWithAstPath < V > > :: visit_mut_with_ast_path (inner , visitor , __ast_path) } None => { } } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Option> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_var_decl_or_expr(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + match self { + Some(inner) => as VisitMutWithAstPath>::visit_mut_with_ast_path( + inner, visitor, __ast_path, + ), + None => {} + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, Option>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_vec_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_opt_vec_pats(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, ParamOrTsParamProp<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_param_or_ts_param_props(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Param<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Pat<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_pats`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_pats(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, PropOrSpread<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_prop_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for swc_common::Span { + #[doc = "Calls [VisitMutAstPath`::visit_mut_span`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_span(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, Stmt<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_stmts`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_stmts(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, SwitchCase<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_switch_cases(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [VisitMutAstPath`::visit_mut_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_syntax_context(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, TplElement> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_tpl_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, TsEnumMember<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_enum_members(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, TsExprWithTypeArgs<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_expr_with_type_argss(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, TsFnParam<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_fn_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, TsTupleElement<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_tuple_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, TsTypeElement<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_elements(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, TsTypeParam<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_type_params(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for Vec<'a, TsType<'a>> { + #[doc = "Calls [VisitMutAstPath`::visit_mut_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_ts_types(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for UnaryOp { + #[doc = "Calls [VisitMutAstPath`::visit_mut_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_unary_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> for UpdateOp { + #[doc = "Calls [VisitMutAstPath`::visit_mut_update_op`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_update_op(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + {} + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + VisitMutAstPath<'a>> VisitMutWithAstPath<'a, V> + for Vec<'a, VarDeclarator<'a>> +{ + #[doc = "Calls [VisitMutAstPath`::visit_mut_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + ::visit_mut_var_declarators(visitor, self, __ast_path) + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as VisitMutWithAstPath>::visit_mut_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V, T> VisitMutWithAstPath<'a, V> for Box<'a, T> +where + V: ?Sized + VisitMutAstPath<'a>, + T: VisitMutWithAstPath<'a, V>, +{ + #[inline] + fn visit_mut_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + let v = >::visit_mut_with_ast_path( + &mut **self, + visitor, + __ast_path, + ); + v + } + + #[inline] + fn visit_mut_children_with_ast_path(&mut self, visitor: &mut V, __ast_path: &mut AstKindPath) { + let v = >::visit_mut_children_with_ast_path( + &mut **self, + visitor, + __ast_path, + ); + v + } +} +#[doc = r" A visitor trait for traversing the AST."] +pub trait Fold<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_accessibility(&mut self, node: Accessibility) -> Accessibility { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>) -> ArrayLit<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>) -> ArrayPat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_arrow_expr(&mut self, node: ArrowExpr<'a>) -> ArrowExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_assign_expr(&mut self, node: AssignExpr<'a>) -> AssignExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_assign_pat(&mut self, node: AssignPat<'a>) -> AssignPat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_assign_pat_prop(&mut self, node: AssignPatProp<'a>) -> AssignPatProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_assign_prop(&mut self, node: AssignProp<'a>) -> AssignProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_assign_target(&mut self, node: AssignTarget<'a>) -> AssignTarget<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_assign_target_pat(&mut self, node: AssignTargetPat<'a>) -> AssignTargetPat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_atom(&mut self, node: swc_atoms::Atom) -> swc_atoms::Atom { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_auto_accessor(&mut self, node: AutoAccessor<'a>) -> AutoAccessor<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_await_expr(&mut self, node: AwaitExpr<'a>) -> AwaitExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>) -> BigInt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>) -> BinExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_binding_ident(&mut self, node: BindingIdent<'a>) -> BindingIdent<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_block_stmt(&mut self, node: BlockStmt<'a>) -> BlockStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr<'a>) -> BlockStmtOrExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_bool(&mut self, node: Bool) -> Bool { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>) -> CallExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_callee(&mut self, node: Callee<'a>) -> Callee<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_catch_clause(&mut self, node: CatchClause<'a>) -> CatchClause<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_class(&mut self, node: Class<'a>) -> Class<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_class_decl(&mut self, node: ClassDecl<'a>) -> ClassDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_class_expr(&mut self, node: ClassExpr<'a>) -> ClassExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_class_member(&mut self, node: ClassMember<'a>) -> ClassMember<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_class_members(&mut self, node: Vec<'a, ClassMember<'a>>) -> Vec<'a, ClassMember<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_class_method(&mut self, node: ClassMethod<'a>) -> ClassMethod<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_class_prop(&mut self, node: ClassProp<'a>) -> ClassProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_computed_prop_name(&mut self, node: ComputedPropName<'a>) -> ComputedPropName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>) -> CondExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_constructor(&mut self, node: Constructor<'a>) -> Constructor<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_decl(&mut self, node: Decl<'a>) -> Decl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_decorator(&mut self, node: Decorator<'a>) -> Decorator<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_decorators(&mut self, node: Vec<'a, Decorator<'a>>) -> Vec<'a, Decorator<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_default_decl(&mut self, node: DefaultDecl<'a>) -> DefaultDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_do_while_stmt(&mut self, node: DoWhileStmt<'a>) -> DoWhileStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_export_all(&mut self, node: ExportAll<'a>) -> ExportAll<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_export_decl(&mut self, node: ExportDecl<'a>) -> ExportDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_export_default_decl(&mut self, node: ExportDefaultDecl<'a>) -> ExportDefaultDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_export_default_expr(&mut self, node: ExportDefaultExpr<'a>) -> ExportDefaultExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + ) -> ExportDefaultSpecifier { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + ) -> ExportNamedSpecifier<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + ) -> ExportNamespaceSpecifier<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_export_specifier(&mut self, node: ExportSpecifier<'a>) -> ExportSpecifier<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > >::fold_children_with`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + ) -> Vec<'a, ExportSpecifier<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_expr(&mut self, node: Expr<'a>) -> Expr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_expr_or_spread(&mut self, node: ExprOrSpread<'a>) -> ExprOrSpread<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + ) -> Vec<'a, ExprOrSpread<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>) -> ExprStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_exprs(&mut self, node: Vec<'a, Expr<'a>>) -> Vec<'a, Expr<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>) -> FnDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>) -> FnExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>) -> ForHead<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_for_in_stmt(&mut self, node: ForInStmt<'a>) -> ForInStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_for_of_stmt(&mut self, node: ForOfStmt<'a>) -> ForOfStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>) -> ForStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_function(&mut self, node: Function<'a>) -> Function<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_getter_prop(&mut self, node: GetterProp<'a>) -> GetterProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ident(&mut self, node: Ident) -> Ident { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ident_name(&mut self, node: IdentName) -> IdentName { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>) -> IfStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_import(&mut self, node: Import) -> Import { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_import_decl(&mut self, node: ImportDecl<'a>) -> ImportDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + ) -> ImportDefaultSpecifier { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + ) -> ImportNamedSpecifier<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_import_specifier(&mut self, node: ImportSpecifier<'a>) -> ImportSpecifier<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > >::fold_children_with`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + ) -> Vec<'a, ImportSpecifier<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + ) -> ImportStarAsSpecifier { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_import_with(&mut self, node: ImportWith<'a>) -> ImportWith<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_import_with_items(&mut self, node: Vec<'a, ImportWithItem>) -> Vec<'a, ImportWithItem> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_invalid(&mut self, node: Invalid) -> Invalid { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>) -> JSXAttr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_attr_name(&mut self, node: JSXAttrName<'a>) -> JSXAttrName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread<'a>) -> JSXAttrOrSpread<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > >::fold_children_with`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_attr_value(&mut self, node: JSXAttrValue<'a>) -> JSXAttrValue<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_closing_element(&mut self, node: JSXClosingElement<'a>) -> JSXClosingElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_closing_fragment(&mut self, node: JSXClosingFragment) -> JSXClosingFragment { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_element(&mut self, node: JSXElement<'a>) -> JSXElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_element_child(&mut self, node: JSXElementChild<'a>) -> JSXElementChild<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > >::fold_children_with`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + ) -> Vec<'a, JSXElementChild<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_element_name(&mut self, node: JSXElementName<'a>) -> JSXElementName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>) -> JSXExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_expr_container(&mut self, node: JSXExprContainer<'a>) -> JSXExprContainer<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_fragment(&mut self, node: JSXFragment<'a>) -> JSXFragment<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr<'a>) -> JSXMemberExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_namespaced_name(&mut self, node: JSXNamespacedName) -> JSXNamespacedName { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_object(&mut self, node: JSXObject<'a>) -> JSXObject<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement<'a>) -> JSXOpeningElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_jsx_opening_fragment(&mut self, node: JSXOpeningFragment) -> JSXOpeningFragment { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild<'a>) -> JSXSpreadChild<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_key(&mut self, node: Key<'a>) -> Key<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp<'a>) -> KeyValuePatProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_key_value_prop(&mut self, node: KeyValueProp<'a>) -> KeyValueProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_labeled_stmt(&mut self, node: LabeledStmt<'a>) -> LabeledStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_lit(&mut self, node: Lit<'a>) -> Lit<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_member_expr(&mut self, node: MemberExpr<'a>) -> MemberExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_member_prop(&mut self, node: MemberProp<'a>) -> MemberProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_method_prop(&mut self, node: MethodProp<'a>) -> MethodProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_module_decl(&mut self, node: ModuleDecl<'a>) -> ModuleDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_module_export_name(&mut self, node: ModuleExportName<'a>) -> ModuleExportName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_module_item(&mut self, node: ModuleItem<'a>) -> ModuleItem<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_module_items(&mut self, node: Vec<'a, ModuleItem<'a>>) -> Vec<'a, ModuleItem<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_named_export(&mut self, node: NamedExport<'a>) -> NamedExport<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>) -> NewExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_null(&mut self, node: Null) -> Null { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_number(&mut self, node: Number) -> Number { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_object_lit(&mut self, node: ObjectLit<'a>) -> ObjectLit<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_object_pat(&mut self, node: ObjectPat<'a>) -> ObjectPat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_object_pat_prop(&mut self, node: ObjectPatProp<'a>) -> ObjectPatProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + ) -> Vec<'a, ObjectPatProp<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_accessibility(&mut self, node: Option) -> Option { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::fold_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_atom(&mut self, node: Option) -> Option { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_opt_block_stmt(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>) -> OptCall<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_catch_clause(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_opt_chain_base(&mut self, node: OptChainBase<'a>) -> OptChainBase<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_opt_chain_expr(&mut self, node: OptChainExpr<'a>) -> OptChainExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_expr(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + ) -> Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_ident(&mut self, node: Option) -> Option { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > >::fold_children_with`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > >::fold_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + ) -> Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_pat(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_span(&mut self, node: Option) -> Option { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_stmt(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_opt_str(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_true_plus_minus(&mut self, node: Option) -> Option { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_opt_ts_type(&mut self, node: Option>) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > >::fold_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + ) -> Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + ) -> Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + ) -> Option>> { + >> as FoldWith>::fold_children_with( + node, self, + ) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + ) -> Option> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + ) -> Vec<'a, Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_vec_pats(&mut self, node: Vec<'a, Option>>) -> Vec<'a, Option>> { + >> as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_param(&mut self, node: Param<'a>) -> Param<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + ) -> ParamOrTsParamProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > >::fold_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_params(&mut self, node: Vec<'a, Param<'a>>) -> Vec<'a, Param<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_paren_expr(&mut self, node: ParenExpr<'a>) -> ParenExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_pat(&mut self, node: Pat<'a>) -> Pat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_pats(&mut self, node: Vec<'a, Pat<'a>>) -> Vec<'a, Pat<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_private_method(&mut self, node: PrivateMethod<'a>) -> PrivateMethod<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_private_prop(&mut self, node: PrivateProp<'a>) -> PrivateProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_prop(&mut self, node: Prop<'a>) -> Prop<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>) -> PropName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_prop_or_spread(&mut self, node: PropOrSpread<'a>) -> PropOrSpread<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + ) -> Vec<'a, PropOrSpread<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_regex(&mut self, node: Regex) -> Regex { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>) -> RestPat<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_return_stmt(&mut self, node: ReturnStmt<'a>) -> ReturnStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>) -> SeqExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_setter_prop(&mut self, node: SetterProp<'a>) -> SetterProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + ) -> SimpleAssignTarget<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_span(&mut self, node: swc_common::Span) -> swc_common::Span { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_spread_element(&mut self, node: SpreadElement<'a>) -> SpreadElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_static_block(&mut self, node: StaticBlock<'a>) -> StaticBlock<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_stmts(&mut self, node: Vec<'a, Stmt<'a>>) -> Vec<'a, Stmt<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_str(&mut self, node: Str) -> Str { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_super(&mut self, node: Super) -> Super { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_super_prop(&mut self, node: SuperProp<'a>) -> SuperProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_super_prop_expr(&mut self, node: SuperPropExpr<'a>) -> SuperPropExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_switch_case(&mut self, node: SwitchCase<'a>) -> SwitchCase<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_switch_cases(&mut self, node: Vec<'a, SwitchCase<'a>>) -> Vec<'a, SwitchCase<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_switch_stmt(&mut self, node: SwitchStmt<'a>) -> SwitchStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + ) -> swc_common::SyntaxContext { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_tagged_tpl(&mut self, node: TaggedTpl<'a>) -> TaggedTpl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_throw_stmt(&mut self, node: ThrowStmt<'a>) -> ThrowStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>) -> Tpl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_tpl_elements(&mut self, node: Vec<'a, TplElement>) -> Vec<'a, TplElement> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>) -> TryStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_array_type(&mut self, node: TsArrayType<'a>) -> TsArrayType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_as_expr(&mut self, node: TsAsExpr<'a>) -> TsAsExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + ) -> TsCallSignatureDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_conditional_type(&mut self, node: TsConditionalType<'a>) -> TsConditionalType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_const_assertion(&mut self, node: TsConstAssertion<'a>) -> TsConstAssertion<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + ) -> TsConstructSignatureDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_constructor_type(&mut self, node: TsConstructorType<'a>) -> TsConstructorType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_entity_name(&mut self, node: TsEntityName<'a>) -> TsEntityName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_enum_decl(&mut self, node: TsEnumDecl<'a>) -> TsEnumDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_enum_member(&mut self, node: TsEnumMember<'a>) -> TsEnumMember<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_enum_member_id(&mut self, node: TsEnumMemberId<'a>) -> TsEnumMemberId<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + ) -> Vec<'a, TsEnumMember<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + ) -> TsExportAssignment<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + ) -> TsExprWithTypeArgs<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > >::fold_children_with`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_external_module_ref(&mut self, node: TsExternalModuleRef) -> TsExternalModuleRef { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::fold_children_with`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + ) -> TsFnOrConstructorType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_fn_param(&mut self, node: TsFnParam<'a>) -> TsFnParam<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::fold_children_with`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_fn_params(&mut self, node: Vec<'a, TsFnParam<'a>>) -> Vec<'a, TsFnParam<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_fn_type(&mut self, node: TsFnType<'a>) -> TsFnType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_getter_signature(&mut self, node: TsGetterSignature<'a>) -> TsGetterSignature<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + ) -> TsImportEqualsDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_import_type(&mut self, node: TsImportType<'a>) -> TsImportType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_index_signature(&mut self, node: TsIndexSignature<'a>) -> TsIndexSignature<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + ) -> TsIndexedAccessType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_infer_type(&mut self, node: TsInferType<'a>) -> TsInferType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_instantiation(&mut self, node: TsInstantiation<'a>) -> TsInstantiation<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_interface_body(&mut self, node: TsInterfaceBody<'a>) -> TsInterfaceBody<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_interface_decl(&mut self, node: TsInterfaceDecl<'a>) -> TsInterfaceDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + ) -> TsIntersectionType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_keyword_type(&mut self, node: TsKeywordType) -> TsKeywordType { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_keyword_type_kind(&mut self, node: TsKeywordTypeKind) -> TsKeywordTypeKind { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>) -> TsLit<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_lit_type(&mut self, node: TsLitType<'a>) -> TsLitType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_mapped_type(&mut self, node: TsMappedType<'a>) -> TsMappedType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_method_signature(&mut self, node: TsMethodSignature<'a>) -> TsMethodSignature<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_module_block(&mut self, node: TsModuleBlock<'a>) -> TsModuleBlock<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_module_decl(&mut self, node: TsModuleDecl<'a>) -> TsModuleDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_module_name(&mut self, node: TsModuleName<'a>) -> TsModuleName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_module_ref(&mut self, node: TsModuleRef<'a>) -> TsModuleRef<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_namespace_body(&mut self, node: TsNamespaceBody<'a>) -> TsNamespaceBody<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_namespace_decl(&mut self, node: TsNamespaceDecl<'a>) -> TsNamespaceDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + ) -> TsNamespaceExportDecl { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_non_null_expr(&mut self, node: TsNonNullExpr<'a>) -> TsNonNullExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_optional_type(&mut self, node: TsOptionalType<'a>) -> TsOptionalType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_param_prop(&mut self, node: TsParamProp<'a>) -> TsParamProp<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_param_prop_param(&mut self, node: TsParamPropParam<'a>) -> TsParamPropParam<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + ) -> TsParenthesizedType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + ) -> TsPropertySignature<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_qualified_name(&mut self, node: TsQualifiedName<'a>) -> TsQualifiedName<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_rest_type(&mut self, node: TsRestType<'a>) -> TsRestType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_satisfies_expr(&mut self, node: TsSatisfiesExpr<'a>) -> TsSatisfiesExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_setter_signature(&mut self, node: TsSetterSignature<'a>) -> TsSetterSignature<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType) -> TsThisType { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_this_type_or_ident(&mut self, node: TsThisTypeOrIdent<'a>) -> TsThisTypeOrIdent<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_tpl_lit_type(&mut self, node: TsTplLitType<'a>) -> TsTplLitType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_tuple_element(&mut self, node: TsTupleElement<'a>) -> TsTupleElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + ) -> Vec<'a, TsTupleElement<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_tuple_type(&mut self, node: TsTupleType<'a>) -> TsTupleType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>) -> TsType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_alias_decl(&mut self, node: TsTypeAliasDecl<'a>) -> TsTypeAliasDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_ann(&mut self, node: TsTypeAnn<'a>) -> TsTypeAnn<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_assertion(&mut self, node: TsTypeAssertion<'a>) -> TsTypeAssertion<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_element(&mut self, node: TsTypeElement<'a>) -> TsTypeElement<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + ) -> Vec<'a, TsTypeElement<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_lit(&mut self, node: TsTypeLit<'a>) -> TsTypeLit<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_operator(&mut self, node: TsTypeOperator<'a>) -> TsTypeOperator<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_type_operator_op(&mut self, node: TsTypeOperatorOp) -> TsTypeOperatorOp { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_type_param(&mut self, node: TsTypeParam<'a>) -> TsTypeParam<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_param_decl(&mut self, node: TsTypeParamDecl<'a>) -> TsTypeParamDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + ) -> TsTypeParamInstantiation<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_params(&mut self, node: Vec<'a, TsTypeParam<'a>>) -> Vec<'a, TsTypeParam<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_predicate(&mut self, node: TsTypePredicate<'a>) -> TsTypePredicate<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_type_query(&mut self, node: TsTypeQuery<'a>) -> TsTypeQuery<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_type_query_expr(&mut self, node: TsTypeQueryExpr<'a>) -> TsTypeQueryExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_ref(&mut self, node: TsTypeRef<'a>) -> TsTypeRef<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::fold_children_with`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_types(&mut self, node: Vec<'a, TsType<'a>>) -> Vec<'a, TsType<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + ) -> TsUnionOrIntersectionType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_union_type(&mut self, node: TsUnionType<'a>) -> TsUnionType<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_unary_expr(&mut self, node: UnaryExpr<'a>) -> UnaryExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::fold_children_with`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_update_expr(&mut self, node: UpdateExpr<'a>) -> UpdateExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_using_decl(&mut self, node: UsingDecl<'a>) -> UsingDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>) -> VarDecl<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::fold_children_with`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { + >::fold_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr<'a>) -> VarDeclOrExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::fold_children_with`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_var_declarator(&mut self, node: VarDeclarator<'a>) -> VarDeclarator<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::fold_children_with`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + ) -> Vec<'a, VarDeclarator<'a>> { + > as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_while_stmt(&mut self, node: WhileStmt<'a>) -> WhileStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>) -> WithStmt<'a> { + as FoldWith>::fold_children_with(node, self) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::fold_children_with`]. If you want to recurse, you need to call it manually."] + #[inline] + fn fold_yield_expr(&mut self, node: YieldExpr<'a>) -> YieldExpr<'a> { + as FoldWith>::fold_children_with(node, self) + } +} +impl<'a, V> Fold<'a> for &mut V +where + V: ?Sized + Fold<'a>, +{ + #[inline] + fn fold_accessibility(&mut self, node: Accessibility) -> Accessibility { + ::fold_accessibility(&mut **self, node) + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>) -> ArrayLit<'a> { + ::fold_array_lit(&mut **self, node) + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>) -> ArrayPat<'a> { + ::fold_array_pat(&mut **self, node) + } + + #[inline] + fn fold_arrow_expr(&mut self, node: ArrowExpr<'a>) -> ArrowExpr<'a> { + ::fold_arrow_expr(&mut **self, node) + } + + #[inline] + fn fold_assign_expr(&mut self, node: AssignExpr<'a>) -> AssignExpr<'a> { + ::fold_assign_expr(&mut **self, node) + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { + ::fold_assign_op(&mut **self, node) + } + + #[inline] + fn fold_assign_pat(&mut self, node: AssignPat<'a>) -> AssignPat<'a> { + ::fold_assign_pat(&mut **self, node) + } + + #[inline] + fn fold_assign_pat_prop(&mut self, node: AssignPatProp<'a>) -> AssignPatProp<'a> { + ::fold_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_assign_prop(&mut self, node: AssignProp<'a>) -> AssignProp<'a> { + ::fold_assign_prop(&mut **self, node) + } + + #[inline] + fn fold_assign_target(&mut self, node: AssignTarget<'a>) -> AssignTarget<'a> { + ::fold_assign_target(&mut **self, node) + } + + #[inline] + fn fold_assign_target_pat(&mut self, node: AssignTargetPat<'a>) -> AssignTargetPat<'a> { + ::fold_assign_target_pat(&mut **self, node) + } + + #[inline] + fn fold_atom(&mut self, node: swc_atoms::Atom) -> swc_atoms::Atom { + ::fold_atom(&mut **self, node) + } + + #[inline] + fn fold_auto_accessor(&mut self, node: AutoAccessor<'a>) -> AutoAccessor<'a> { + ::fold_auto_accessor(&mut **self, node) + } + + #[inline] + fn fold_await_expr(&mut self, node: AwaitExpr<'a>) -> AwaitExpr<'a> { + ::fold_await_expr(&mut **self, node) + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>) -> BigInt<'a> { + ::fold_big_int(&mut **self, node) + } + + #[inline] + fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { + ::fold_big_int_value(&mut **self, node) + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>) -> BinExpr<'a> { + ::fold_bin_expr(&mut **self, node) + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { + ::fold_binary_op(&mut **self, node) + } + + #[inline] + fn fold_binding_ident(&mut self, node: BindingIdent<'a>) -> BindingIdent<'a> { + ::fold_binding_ident(&mut **self, node) + } + + #[inline] + fn fold_block_stmt(&mut self, node: BlockStmt<'a>) -> BlockStmt<'a> { + ::fold_block_stmt(&mut **self, node) + } + + #[inline] + fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr<'a>) -> BlockStmtOrExpr<'a> { + ::fold_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn fold_bool(&mut self, node: Bool) -> Bool { + ::fold_bool(&mut **self, node) + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { + ::fold_break_stmt(&mut **self, node) + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>) -> CallExpr<'a> { + ::fold_call_expr(&mut **self, node) + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>) -> Callee<'a> { + ::fold_callee(&mut **self, node) + } + + #[inline] + fn fold_catch_clause(&mut self, node: CatchClause<'a>) -> CatchClause<'a> { + ::fold_catch_clause(&mut **self, node) + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>) -> Class<'a> { + ::fold_class(&mut **self, node) + } + + #[inline] + fn fold_class_decl(&mut self, node: ClassDecl<'a>) -> ClassDecl<'a> { + ::fold_class_decl(&mut **self, node) + } + + #[inline] + fn fold_class_expr(&mut self, node: ClassExpr<'a>) -> ClassExpr<'a> { + ::fold_class_expr(&mut **self, node) + } + + #[inline] + fn fold_class_member(&mut self, node: ClassMember<'a>) -> ClassMember<'a> { + ::fold_class_member(&mut **self, node) + } + + #[inline] + fn fold_class_members(&mut self, node: Vec<'a, ClassMember<'a>>) -> Vec<'a, ClassMember<'a>> { + ::fold_class_members(&mut **self, node) + } + + #[inline] + fn fold_class_method(&mut self, node: ClassMethod<'a>) -> ClassMethod<'a> { + ::fold_class_method(&mut **self, node) + } + + #[inline] + fn fold_class_prop(&mut self, node: ClassProp<'a>) -> ClassProp<'a> { + ::fold_class_prop(&mut **self, node) + } + + #[inline] + fn fold_computed_prop_name(&mut self, node: ComputedPropName<'a>) -> ComputedPropName<'a> { + ::fold_computed_prop_name(&mut **self, node) + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>) -> CondExpr<'a> { + ::fold_cond_expr(&mut **self, node) + } + + #[inline] + fn fold_constructor(&mut self, node: Constructor<'a>) -> Constructor<'a> { + ::fold_constructor(&mut **self, node) + } + + #[inline] + fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { + ::fold_continue_stmt(&mut **self, node) + } + + #[inline] + fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { + ::fold_debugger_stmt(&mut **self, node) + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>) -> Decl<'a> { + ::fold_decl(&mut **self, node) + } + + #[inline] + fn fold_decorator(&mut self, node: Decorator<'a>) -> Decorator<'a> { + ::fold_decorator(&mut **self, node) + } + + #[inline] + fn fold_decorators(&mut self, node: Vec<'a, Decorator<'a>>) -> Vec<'a, Decorator<'a>> { + ::fold_decorators(&mut **self, node) + } + + #[inline] + fn fold_default_decl(&mut self, node: DefaultDecl<'a>) -> DefaultDecl<'a> { + ::fold_default_decl(&mut **self, node) + } + + #[inline] + fn fold_do_while_stmt(&mut self, node: DoWhileStmt<'a>) -> DoWhileStmt<'a> { + ::fold_do_while_stmt(&mut **self, node) + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { + ::fold_empty_stmt(&mut **self, node) + } + + #[inline] + fn fold_export_all(&mut self, node: ExportAll<'a>) -> ExportAll<'a> { + ::fold_export_all(&mut **self, node) + } + + #[inline] + fn fold_export_decl(&mut self, node: ExportDecl<'a>) -> ExportDecl<'a> { + ::fold_export_decl(&mut **self, node) + } + + #[inline] + fn fold_export_default_decl(&mut self, node: ExportDefaultDecl<'a>) -> ExportDefaultDecl<'a> { + ::fold_export_default_decl(&mut **self, node) + } + + #[inline] + fn fold_export_default_expr(&mut self, node: ExportDefaultExpr<'a>) -> ExportDefaultExpr<'a> { + ::fold_export_default_expr(&mut **self, node) + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + ) -> ExportDefaultSpecifier { + ::fold_export_default_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + ) -> ExportNamedSpecifier<'a> { + ::fold_export_named_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + ) -> ExportNamespaceSpecifier<'a> { + ::fold_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_specifier(&mut self, node: ExportSpecifier<'a>) -> ExportSpecifier<'a> { + ::fold_export_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + ) -> Vec<'a, ExportSpecifier<'a>> { + ::fold_export_specifiers(&mut **self, node) + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>) -> Expr<'a> { + ::fold_expr(&mut **self, node) + } + + #[inline] + fn fold_expr_or_spread(&mut self, node: ExprOrSpread<'a>) -> ExprOrSpread<'a> { + ::fold_expr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + ) -> Vec<'a, ExprOrSpread<'a>> { + ::fold_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>) -> ExprStmt<'a> { + ::fold_expr_stmt(&mut **self, node) + } + + #[inline] + fn fold_exprs(&mut self, node: Vec<'a, Expr<'a>>) -> Vec<'a, Expr<'a>> { + ::fold_exprs(&mut **self, node) + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>) -> FnDecl<'a> { + ::fold_fn_decl(&mut **self, node) + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>) -> FnExpr<'a> { + ::fold_fn_expr(&mut **self, node) + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>) -> ForHead<'a> { + ::fold_for_head(&mut **self, node) + } + + #[inline] + fn fold_for_in_stmt(&mut self, node: ForInStmt<'a>) -> ForInStmt<'a> { + ::fold_for_in_stmt(&mut **self, node) + } + + #[inline] + fn fold_for_of_stmt(&mut self, node: ForOfStmt<'a>) -> ForOfStmt<'a> { + ::fold_for_of_stmt(&mut **self, node) + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>) -> ForStmt<'a> { + ::fold_for_stmt(&mut **self, node) + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>) -> Function<'a> { + ::fold_function(&mut **self, node) + } + + #[inline] + fn fold_getter_prop(&mut self, node: GetterProp<'a>) -> GetterProp<'a> { + ::fold_getter_prop(&mut **self, node) + } + + #[inline] + fn fold_ident(&mut self, node: Ident) -> Ident { + ::fold_ident(&mut **self, node) + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName) -> IdentName { + ::fold_ident_name(&mut **self, node) + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>) -> IfStmt<'a> { + ::fold_if_stmt(&mut **self, node) + } + + #[inline] + fn fold_import(&mut self, node: Import) -> Import { + ::fold_import(&mut **self, node) + } + + #[inline] + fn fold_import_decl(&mut self, node: ImportDecl<'a>) -> ImportDecl<'a> { + ::fold_import_decl(&mut **self, node) + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + ) -> ImportDefaultSpecifier { + ::fold_import_default_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + ) -> ImportNamedSpecifier<'a> { + ::fold_import_named_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { + ::fold_import_phase(&mut **self, node) + } + + #[inline] + fn fold_import_specifier(&mut self, node: ImportSpecifier<'a>) -> ImportSpecifier<'a> { + ::fold_import_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + ) -> Vec<'a, ImportSpecifier<'a>> { + ::fold_import_specifiers(&mut **self, node) + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + ) -> ImportStarAsSpecifier { + ::fold_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_with(&mut self, node: ImportWith<'a>) -> ImportWith<'a> { + ::fold_import_with(&mut **self, node) + } + + #[inline] + fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { + ::fold_import_with_item(&mut **self, node) + } + + #[inline] + fn fold_import_with_items(&mut self, node: Vec<'a, ImportWithItem>) -> Vec<'a, ImportWithItem> { + ::fold_import_with_items(&mut **self, node) + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid) -> Invalid { + ::fold_invalid(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>) -> JSXAttr<'a> { + ::fold_jsx_attr(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_name(&mut self, node: JSXAttrName<'a>) -> JSXAttrName<'a> { + ::fold_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread<'a>) -> JSXAttrOrSpread<'a> { + ::fold_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + ::fold_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_value(&mut self, node: JSXAttrValue<'a>) -> JSXAttrValue<'a> { + ::fold_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn fold_jsx_closing_element(&mut self, node: JSXClosingElement<'a>) -> JSXClosingElement<'a> { + ::fold_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_closing_fragment(&mut self, node: JSXClosingFragment) -> JSXClosingFragment { + ::fold_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_element(&mut self, node: JSXElement<'a>) -> JSXElement<'a> { + ::fold_jsx_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_child(&mut self, node: JSXElementChild<'a>) -> JSXElementChild<'a> { + ::fold_jsx_element_child(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + ) -> Vec<'a, JSXElementChild<'a>> { + ::fold_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_name(&mut self, node: JSXElementName<'a>) -> JSXElementName<'a> { + ::fold_jsx_element_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { + ::fold_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>) -> JSXExpr<'a> { + ::fold_jsx_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_expr_container(&mut self, node: JSXExprContainer<'a>) -> JSXExprContainer<'a> { + ::fold_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn fold_jsx_fragment(&mut self, node: JSXFragment<'a>) -> JSXFragment<'a> { + ::fold_jsx_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr<'a>) -> JSXMemberExpr<'a> { + ::fold_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_namespaced_name(&mut self, node: JSXNamespacedName) -> JSXNamespacedName { + ::fold_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_object(&mut self, node: JSXObject<'a>) -> JSXObject<'a> { + ::fold_jsx_object(&mut **self, node) + } + + #[inline] + fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement<'a>) -> JSXOpeningElement<'a> { + ::fold_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_opening_fragment(&mut self, node: JSXOpeningFragment) -> JSXOpeningFragment { + ::fold_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild<'a>) -> JSXSpreadChild<'a> { + ::fold_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { + ::fold_jsx_text(&mut **self, node) + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>) -> Key<'a> { + ::fold_key(&mut **self, node) + } + + #[inline] + fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp<'a>) -> KeyValuePatProp<'a> { + ::fold_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_key_value_prop(&mut self, node: KeyValueProp<'a>) -> KeyValueProp<'a> { + ::fold_key_value_prop(&mut **self, node) + } + + #[inline] + fn fold_labeled_stmt(&mut self, node: LabeledStmt<'a>) -> LabeledStmt<'a> { + ::fold_labeled_stmt(&mut **self, node) + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>) -> Lit<'a> { + ::fold_lit(&mut **self, node) + } + + #[inline] + fn fold_member_expr(&mut self, node: MemberExpr<'a>) -> MemberExpr<'a> { + ::fold_member_expr(&mut **self, node) + } + + #[inline] + fn fold_member_prop(&mut self, node: MemberProp<'a>) -> MemberProp<'a> { + ::fold_member_prop(&mut **self, node) + } + + #[inline] + fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { + ::fold_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { + ::fold_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { + ::fold_method_kind(&mut **self, node) + } + + #[inline] + fn fold_method_prop(&mut self, node: MethodProp<'a>) -> MethodProp<'a> { + ::fold_method_prop(&mut **self, node) + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + ::fold_module(&mut **self, node) + } + + #[inline] + fn fold_module_decl(&mut self, node: ModuleDecl<'a>) -> ModuleDecl<'a> { + ::fold_module_decl(&mut **self, node) + } + + #[inline] + fn fold_module_export_name(&mut self, node: ModuleExportName<'a>) -> ModuleExportName<'a> { + ::fold_module_export_name(&mut **self, node) + } + + #[inline] + fn fold_module_item(&mut self, node: ModuleItem<'a>) -> ModuleItem<'a> { + ::fold_module_item(&mut **self, node) + } + + #[inline] + fn fold_module_items(&mut self, node: Vec<'a, ModuleItem<'a>>) -> Vec<'a, ModuleItem<'a>> { + ::fold_module_items(&mut **self, node) + } + + #[inline] + fn fold_named_export(&mut self, node: NamedExport<'a>) -> NamedExport<'a> { + ::fold_named_export(&mut **self, node) + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>) -> NewExpr<'a> { + ::fold_new_expr(&mut **self, node) + } + + #[inline] + fn fold_null(&mut self, node: Null) -> Null { + ::fold_null(&mut **self, node) + } + + #[inline] + fn fold_number(&mut self, node: Number) -> Number { + ::fold_number(&mut **self, node) + } + + #[inline] + fn fold_object_lit(&mut self, node: ObjectLit<'a>) -> ObjectLit<'a> { + ::fold_object_lit(&mut **self, node) + } + + #[inline] + fn fold_object_pat(&mut self, node: ObjectPat<'a>) -> ObjectPat<'a> { + ::fold_object_pat(&mut **self, node) + } + + #[inline] + fn fold_object_pat_prop(&mut self, node: ObjectPatProp<'a>) -> ObjectPatProp<'a> { + ::fold_object_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + ) -> Vec<'a, ObjectPatProp<'a>> { + ::fold_object_pat_props(&mut **self, node) + } + + #[inline] + fn fold_opt_accessibility(&mut self, node: Option) -> Option { + ::fold_opt_accessibility(&mut **self, node) + } + + #[inline] + fn fold_opt_atom(&mut self, node: Option) -> Option { + ::fold_opt_atom(&mut **self, node) + } + + #[inline] + fn fold_opt_block_stmt(&mut self, node: Option>) -> Option> { + ::fold_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>) -> OptCall<'a> { + ::fold_opt_call(&mut **self, node) + } + + #[inline] + fn fold_opt_catch_clause(&mut self, node: Option>) -> Option> { + ::fold_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn fold_opt_chain_base(&mut self, node: OptChainBase<'a>) -> OptChainBase<'a> { + ::fold_opt_chain_base(&mut **self, node) + } + + #[inline] + fn fold_opt_chain_expr(&mut self, node: OptChainExpr<'a>) -> OptChainExpr<'a> { + ::fold_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_expr(&mut self, node: Option>) -> Option> { + ::fold_opt_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_opt_ident(&mut self, node: Option) -> Option { + ::fold_opt_ident(&mut **self, node) + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_object_lit(&mut **self, node) + } + + #[inline] + fn fold_opt_pat(&mut self, node: Option>) -> Option> { + ::fold_opt_pat(&mut **self, node) + } + + #[inline] + fn fold_opt_span(&mut self, node: Option) -> Option { + ::fold_opt_span(&mut **self, node) + } + + #[inline] + fn fold_opt_stmt(&mut self, node: Option>) -> Option> { + ::fold_opt_stmt(&mut **self, node) + } + + #[inline] + fn fold_opt_str(&mut self, node: Option>) -> Option> { + ::fold_opt_str(&mut **self, node) + } + + #[inline] + fn fold_opt_true_plus_minus(&mut self, node: Option) -> Option { + ::fold_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type(&mut self, node: Option>) -> Option> { + ::fold_opt_ts_type(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_opt_vec_pats(&mut self, node: Vec<'a, Option>>) -> Vec<'a, Option>> { + ::fold_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>) -> Param<'a> { + ::fold_param(&mut **self, node) + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + ) -> ParamOrTsParamProp<'a> { + ::fold_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + ::fold_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn fold_params(&mut self, node: Vec<'a, Param<'a>>) -> Vec<'a, Param<'a>> { + ::fold_params(&mut **self, node) + } + + #[inline] + fn fold_paren_expr(&mut self, node: ParenExpr<'a>) -> ParenExpr<'a> { + ::fold_paren_expr(&mut **self, node) + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>) -> Pat<'a> { + ::fold_pat(&mut **self, node) + } + + #[inline] + fn fold_pats(&mut self, node: Vec<'a, Pat<'a>>) -> Vec<'a, Pat<'a>> { + ::fold_pats(&mut **self, node) + } + + #[inline] + fn fold_private_method(&mut self, node: PrivateMethod<'a>) -> PrivateMethod<'a> { + ::fold_private_method(&mut **self, node) + } + + #[inline] + fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { + ::fold_private_name(&mut **self, node) + } + + #[inline] + fn fold_private_prop(&mut self, node: PrivateProp<'a>) -> PrivateProp<'a> { + ::fold_private_prop(&mut **self, node) + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + ::fold_program(&mut **self, node) + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>) -> Prop<'a> { + ::fold_prop(&mut **self, node) + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>) -> PropName<'a> { + ::fold_prop_name(&mut **self, node) + } + + #[inline] + fn fold_prop_or_spread(&mut self, node: PropOrSpread<'a>) -> PropOrSpread<'a> { + ::fold_prop_or_spread(&mut **self, node) + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + ) -> Vec<'a, PropOrSpread<'a>> { + ::fold_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_regex(&mut self, node: Regex) -> Regex { + ::fold_regex(&mut **self, node) + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>) -> RestPat<'a> { + ::fold_rest_pat(&mut **self, node) + } + + #[inline] + fn fold_return_stmt(&mut self, node: ReturnStmt<'a>) -> ReturnStmt<'a> { + ::fold_return_stmt(&mut **self, node) + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + ::fold_script(&mut **self, node) + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>) -> SeqExpr<'a> { + ::fold_seq_expr(&mut **self, node) + } + + #[inline] + fn fold_setter_prop(&mut self, node: SetterProp<'a>) -> SetterProp<'a> { + ::fold_setter_prop(&mut **self, node) + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + ) -> SimpleAssignTarget<'a> { + ::fold_simple_assign_target(&mut **self, node) + } + + #[inline] + fn fold_span(&mut self, node: swc_common::Span) -> swc_common::Span { + ::fold_span(&mut **self, node) + } + + #[inline] + fn fold_spread_element(&mut self, node: SpreadElement<'a>) -> SpreadElement<'a> { + ::fold_spread_element(&mut **self, node) + } + + #[inline] + fn fold_static_block(&mut self, node: StaticBlock<'a>) -> StaticBlock<'a> { + ::fold_static_block(&mut **self, node) + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + ::fold_stmt(&mut **self, node) + } + + #[inline] + fn fold_stmts(&mut self, node: Vec<'a, Stmt<'a>>) -> Vec<'a, Stmt<'a>> { + ::fold_stmts(&mut **self, node) + } + + #[inline] + fn fold_str(&mut self, node: Str) -> Str { + ::fold_str(&mut **self, node) + } + + #[inline] + fn fold_super(&mut self, node: Super) -> Super { + ::fold_super(&mut **self, node) + } + + #[inline] + fn fold_super_prop(&mut self, node: SuperProp<'a>) -> SuperProp<'a> { + ::fold_super_prop(&mut **self, node) + } + + #[inline] + fn fold_super_prop_expr(&mut self, node: SuperPropExpr<'a>) -> SuperPropExpr<'a> { + ::fold_super_prop_expr(&mut **self, node) + } + + #[inline] + fn fold_switch_case(&mut self, node: SwitchCase<'a>) -> SwitchCase<'a> { + ::fold_switch_case(&mut **self, node) + } + + #[inline] + fn fold_switch_cases(&mut self, node: Vec<'a, SwitchCase<'a>>) -> Vec<'a, SwitchCase<'a>> { + ::fold_switch_cases(&mut **self, node) + } + + #[inline] + fn fold_switch_stmt(&mut self, node: SwitchStmt<'a>) -> SwitchStmt<'a> { + ::fold_switch_stmt(&mut **self, node) + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + ) -> swc_common::SyntaxContext { + ::fold_syntax_context(&mut **self, node) + } + + #[inline] + fn fold_tagged_tpl(&mut self, node: TaggedTpl<'a>) -> TaggedTpl<'a> { + ::fold_tagged_tpl(&mut **self, node) + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { + ::fold_this_expr(&mut **self, node) + } + + #[inline] + fn fold_throw_stmt(&mut self, node: ThrowStmt<'a>) -> ThrowStmt<'a> { + ::fold_throw_stmt(&mut **self, node) + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>) -> Tpl<'a> { + ::fold_tpl(&mut **self, node) + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { + ::fold_tpl_element(&mut **self, node) + } + + #[inline] + fn fold_tpl_elements(&mut self, node: Vec<'a, TplElement>) -> Vec<'a, TplElement> { + ::fold_tpl_elements(&mut **self, node) + } + + #[inline] + fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { + ::fold_true_plus_minus(&mut **self, node) + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>) -> TryStmt<'a> { + ::fold_try_stmt(&mut **self, node) + } + + #[inline] + fn fold_ts_array_type(&mut self, node: TsArrayType<'a>) -> TsArrayType<'a> { + ::fold_ts_array_type(&mut **self, node) + } + + #[inline] + fn fold_ts_as_expr(&mut self, node: TsAsExpr<'a>) -> TsAsExpr<'a> { + ::fold_ts_as_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + ) -> TsCallSignatureDecl<'a> { + ::fold_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_conditional_type(&mut self, node: TsConditionalType<'a>) -> TsConditionalType<'a> { + ::fold_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn fold_ts_const_assertion(&mut self, node: TsConstAssertion<'a>) -> TsConstAssertion<'a> { + ::fold_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + ) -> TsConstructSignatureDecl<'a> { + ::fold_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_constructor_type(&mut self, node: TsConstructorType<'a>) -> TsConstructorType<'a> { + ::fold_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn fold_ts_entity_name(&mut self, node: TsEntityName<'a>) -> TsEntityName<'a> { + ::fold_ts_entity_name(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_decl(&mut self, node: TsEnumDecl<'a>) -> TsEnumDecl<'a> { + ::fold_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_member(&mut self, node: TsEnumMember<'a>) -> TsEnumMember<'a> { + ::fold_ts_enum_member(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_member_id(&mut self, node: TsEnumMemberId<'a>) -> TsEnumMemberId<'a> { + ::fold_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + ) -> Vec<'a, TsEnumMember<'a>> { + ::fold_ts_enum_members(&mut **self, node) + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + ) -> TsExportAssignment<'a> { + ::fold_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + ) -> TsExprWithTypeArgs<'a> { + ::fold_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + ::fold_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn fold_ts_external_module_ref(&mut self, node: TsExternalModuleRef) -> TsExternalModuleRef { + ::fold_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + ) -> TsFnOrConstructorType<'a> { + ::fold_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_param(&mut self, node: TsFnParam<'a>) -> TsFnParam<'a> { + ::fold_ts_fn_param(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_params(&mut self, node: Vec<'a, TsFnParam<'a>>) -> Vec<'a, TsFnParam<'a>> { + ::fold_ts_fn_params(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_type(&mut self, node: TsFnType<'a>) -> TsFnType<'a> { + ::fold_ts_fn_type(&mut **self, node) + } + + #[inline] + fn fold_ts_getter_signature(&mut self, node: TsGetterSignature<'a>) -> TsGetterSignature<'a> { + ::fold_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + ) -> TsImportEqualsDecl<'a> { + ::fold_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_import_type(&mut self, node: TsImportType<'a>) -> TsImportType<'a> { + ::fold_ts_import_type(&mut **self, node) + } + + #[inline] + fn fold_ts_index_signature(&mut self, node: TsIndexSignature<'a>) -> TsIndexSignature<'a> { + ::fold_ts_index_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + ) -> TsIndexedAccessType<'a> { + ::fold_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn fold_ts_infer_type(&mut self, node: TsInferType<'a>) -> TsInferType<'a> { + ::fold_ts_infer_type(&mut **self, node) + } + + #[inline] + fn fold_ts_instantiation(&mut self, node: TsInstantiation<'a>) -> TsInstantiation<'a> { + ::fold_ts_instantiation(&mut **self, node) + } + + #[inline] + fn fold_ts_interface_body(&mut self, node: TsInterfaceBody<'a>) -> TsInterfaceBody<'a> { + ::fold_ts_interface_body(&mut **self, node) + } + + #[inline] + fn fold_ts_interface_decl(&mut self, node: TsInterfaceDecl<'a>) -> TsInterfaceDecl<'a> { + ::fold_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + ) -> TsIntersectionType<'a> { + ::fold_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn fold_ts_keyword_type(&mut self, node: TsKeywordType) -> TsKeywordType { + ::fold_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn fold_ts_keyword_type_kind(&mut self, node: TsKeywordTypeKind) -> TsKeywordTypeKind { + ::fold_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>) -> TsLit<'a> { + ::fold_ts_lit(&mut **self, node) + } + + #[inline] + fn fold_ts_lit_type(&mut self, node: TsLitType<'a>) -> TsLitType<'a> { + ::fold_ts_lit_type(&mut **self, node) + } + + #[inline] + fn fold_ts_mapped_type(&mut self, node: TsMappedType<'a>) -> TsMappedType<'a> { + ::fold_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn fold_ts_method_signature(&mut self, node: TsMethodSignature<'a>) -> TsMethodSignature<'a> { + ::fold_ts_method_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_module_block(&mut self, node: TsModuleBlock<'a>) -> TsModuleBlock<'a> { + ::fold_ts_module_block(&mut **self, node) + } + + #[inline] + fn fold_ts_module_decl(&mut self, node: TsModuleDecl<'a>) -> TsModuleDecl<'a> { + ::fold_ts_module_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_module_name(&mut self, node: TsModuleName<'a>) -> TsModuleName<'a> { + ::fold_ts_module_name(&mut **self, node) + } + + #[inline] + fn fold_ts_module_ref(&mut self, node: TsModuleRef<'a>) -> TsModuleRef<'a> { + ::fold_ts_module_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_body(&mut self, node: TsNamespaceBody<'a>) -> TsNamespaceBody<'a> { + ::fold_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_decl(&mut self, node: TsNamespaceDecl<'a>) -> TsNamespaceDecl<'a> { + ::fold_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + ) -> TsNamespaceExportDecl { + ::fold_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_non_null_expr(&mut self, node: TsNonNullExpr<'a>) -> TsNonNullExpr<'a> { + ::fold_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_optional_type(&mut self, node: TsOptionalType<'a>) -> TsOptionalType<'a> { + ::fold_ts_optional_type(&mut **self, node) + } + + #[inline] + fn fold_ts_param_prop(&mut self, node: TsParamProp<'a>) -> TsParamProp<'a> { + ::fold_ts_param_prop(&mut **self, node) + } + + #[inline] + fn fold_ts_param_prop_param(&mut self, node: TsParamPropParam<'a>) -> TsParamPropParam<'a> { + ::fold_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + ) -> TsParenthesizedType<'a> { + ::fold_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + ) -> TsPropertySignature<'a> { + ::fold_ts_property_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_qualified_name(&mut self, node: TsQualifiedName<'a>) -> TsQualifiedName<'a> { + ::fold_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn fold_ts_rest_type(&mut self, node: TsRestType<'a>) -> TsRestType<'a> { + ::fold_ts_rest_type(&mut **self, node) + } + + #[inline] + fn fold_ts_satisfies_expr(&mut self, node: TsSatisfiesExpr<'a>) -> TsSatisfiesExpr<'a> { + ::fold_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_setter_signature(&mut self, node: TsSetterSignature<'a>) -> TsSetterSignature<'a> { + ::fold_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType) -> TsThisType { + ::fold_ts_this_type(&mut **self, node) + } + + #[inline] + fn fold_ts_this_type_or_ident(&mut self, node: TsThisTypeOrIdent<'a>) -> TsThisTypeOrIdent<'a> { + ::fold_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn fold_ts_tpl_lit_type(&mut self, node: TsTplLitType<'a>) -> TsTplLitType<'a> { + ::fold_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_element(&mut self, node: TsTupleElement<'a>) -> TsTupleElement<'a> { + ::fold_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + ) -> Vec<'a, TsTupleElement<'a>> { + ::fold_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_type(&mut self, node: TsTupleType<'a>) -> TsTupleType<'a> { + ::fold_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>) -> TsType<'a> { + ::fold_ts_type(&mut **self, node) + } + + #[inline] + fn fold_ts_type_alias_decl(&mut self, node: TsTypeAliasDecl<'a>) -> TsTypeAliasDecl<'a> { + ::fold_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_type_ann(&mut self, node: TsTypeAnn<'a>) -> TsTypeAnn<'a> { + ::fold_ts_type_ann(&mut **self, node) + } + + #[inline] + fn fold_ts_type_assertion(&mut self, node: TsTypeAssertion<'a>) -> TsTypeAssertion<'a> { + ::fold_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn fold_ts_type_element(&mut self, node: TsTypeElement<'a>) -> TsTypeElement<'a> { + ::fold_ts_type_element(&mut **self, node) + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + ) -> Vec<'a, TsTypeElement<'a>> { + ::fold_ts_type_elements(&mut **self, node) + } + + #[inline] + fn fold_ts_type_lit(&mut self, node: TsTypeLit<'a>) -> TsTypeLit<'a> { + ::fold_ts_type_lit(&mut **self, node) + } + + #[inline] + fn fold_ts_type_operator(&mut self, node: TsTypeOperator<'a>) -> TsTypeOperator<'a> { + ::fold_ts_type_operator(&mut **self, node) + } + + #[inline] + fn fold_ts_type_operator_op(&mut self, node: TsTypeOperatorOp) -> TsTypeOperatorOp { + ::fold_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param(&mut self, node: TsTypeParam<'a>) -> TsTypeParam<'a> { + ::fold_ts_type_param(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param_decl(&mut self, node: TsTypeParamDecl<'a>) -> TsTypeParamDecl<'a> { + ::fold_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + ) -> TsTypeParamInstantiation<'a> { + ::fold_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn fold_ts_type_params(&mut self, node: Vec<'a, TsTypeParam<'a>>) -> Vec<'a, TsTypeParam<'a>> { + ::fold_ts_type_params(&mut **self, node) + } + + #[inline] + fn fold_ts_type_predicate(&mut self, node: TsTypePredicate<'a>) -> TsTypePredicate<'a> { + ::fold_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn fold_ts_type_query(&mut self, node: TsTypeQuery<'a>) -> TsTypeQuery<'a> { + ::fold_ts_type_query(&mut **self, node) + } + + #[inline] + fn fold_ts_type_query_expr(&mut self, node: TsTypeQueryExpr<'a>) -> TsTypeQueryExpr<'a> { + ::fold_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_type_ref(&mut self, node: TsTypeRef<'a>) -> TsTypeRef<'a> { + ::fold_ts_type_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_types(&mut self, node: Vec<'a, TsType<'a>>) -> Vec<'a, TsType<'a>> { + ::fold_ts_types(&mut **self, node) + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + ) -> TsUnionOrIntersectionType<'a> { + ::fold_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn fold_ts_union_type(&mut self, node: TsUnionType<'a>) -> TsUnionType<'a> { + ::fold_ts_union_type(&mut **self, node) + } + + #[inline] + fn fold_unary_expr(&mut self, node: UnaryExpr<'a>) -> UnaryExpr<'a> { + ::fold_unary_expr(&mut **self, node) + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { + ::fold_unary_op(&mut **self, node) + } + + #[inline] + fn fold_update_expr(&mut self, node: UpdateExpr<'a>) -> UpdateExpr<'a> { + ::fold_update_expr(&mut **self, node) + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { + ::fold_update_op(&mut **self, node) + } + + #[inline] + fn fold_using_decl(&mut self, node: UsingDecl<'a>) -> UsingDecl<'a> { + ::fold_using_decl(&mut **self, node) + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>) -> VarDecl<'a> { + ::fold_var_decl(&mut **self, node) + } + + #[inline] + fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { + ::fold_var_decl_kind(&mut **self, node) + } + + #[inline] + fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr<'a>) -> VarDeclOrExpr<'a> { + ::fold_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn fold_var_declarator(&mut self, node: VarDeclarator<'a>) -> VarDeclarator<'a> { + ::fold_var_declarator(&mut **self, node) + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + ) -> Vec<'a, VarDeclarator<'a>> { + ::fold_var_declarators(&mut **self, node) + } + + #[inline] + fn fold_while_stmt(&mut self, node: WhileStmt<'a>) -> WhileStmt<'a> { + ::fold_while_stmt(&mut **self, node) + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>) -> WithStmt<'a> { + ::fold_with_stmt(&mut **self, node) + } + + #[inline] + fn fold_yield_expr(&mut self, node: YieldExpr<'a>) -> YieldExpr<'a> { + ::fold_yield_expr(&mut **self, node) + } +} +impl<'a, V> Fold<'a> for Box<'a, V> +where + V: ?Sized + Fold<'a>, +{ + #[inline] + fn fold_accessibility(&mut self, node: Accessibility) -> Accessibility { + ::fold_accessibility(&mut **self, node) + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>) -> ArrayLit<'a> { + ::fold_array_lit(&mut **self, node) + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>) -> ArrayPat<'a> { + ::fold_array_pat(&mut **self, node) + } + + #[inline] + fn fold_arrow_expr(&mut self, node: ArrowExpr<'a>) -> ArrowExpr<'a> { + ::fold_arrow_expr(&mut **self, node) + } + + #[inline] + fn fold_assign_expr(&mut self, node: AssignExpr<'a>) -> AssignExpr<'a> { + ::fold_assign_expr(&mut **self, node) + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { + ::fold_assign_op(&mut **self, node) + } + + #[inline] + fn fold_assign_pat(&mut self, node: AssignPat<'a>) -> AssignPat<'a> { + ::fold_assign_pat(&mut **self, node) + } + + #[inline] + fn fold_assign_pat_prop(&mut self, node: AssignPatProp<'a>) -> AssignPatProp<'a> { + ::fold_assign_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_assign_prop(&mut self, node: AssignProp<'a>) -> AssignProp<'a> { + ::fold_assign_prop(&mut **self, node) + } + + #[inline] + fn fold_assign_target(&mut self, node: AssignTarget<'a>) -> AssignTarget<'a> { + ::fold_assign_target(&mut **self, node) + } + + #[inline] + fn fold_assign_target_pat(&mut self, node: AssignTargetPat<'a>) -> AssignTargetPat<'a> { + ::fold_assign_target_pat(&mut **self, node) + } + + #[inline] + fn fold_atom(&mut self, node: swc_atoms::Atom) -> swc_atoms::Atom { + ::fold_atom(&mut **self, node) + } + + #[inline] + fn fold_auto_accessor(&mut self, node: AutoAccessor<'a>) -> AutoAccessor<'a> { + ::fold_auto_accessor(&mut **self, node) + } + + #[inline] + fn fold_await_expr(&mut self, node: AwaitExpr<'a>) -> AwaitExpr<'a> { + ::fold_await_expr(&mut **self, node) + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>) -> BigInt<'a> { + ::fold_big_int(&mut **self, node) + } + + #[inline] + fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { + ::fold_big_int_value(&mut **self, node) + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>) -> BinExpr<'a> { + ::fold_bin_expr(&mut **self, node) + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { + ::fold_binary_op(&mut **self, node) + } + + #[inline] + fn fold_binding_ident(&mut self, node: BindingIdent<'a>) -> BindingIdent<'a> { + ::fold_binding_ident(&mut **self, node) + } + + #[inline] + fn fold_block_stmt(&mut self, node: BlockStmt<'a>) -> BlockStmt<'a> { + ::fold_block_stmt(&mut **self, node) + } + + #[inline] + fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr<'a>) -> BlockStmtOrExpr<'a> { + ::fold_block_stmt_or_expr(&mut **self, node) + } + + #[inline] + fn fold_bool(&mut self, node: Bool) -> Bool { + ::fold_bool(&mut **self, node) + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { + ::fold_break_stmt(&mut **self, node) + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>) -> CallExpr<'a> { + ::fold_call_expr(&mut **self, node) + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>) -> Callee<'a> { + ::fold_callee(&mut **self, node) + } + + #[inline] + fn fold_catch_clause(&mut self, node: CatchClause<'a>) -> CatchClause<'a> { + ::fold_catch_clause(&mut **self, node) + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>) -> Class<'a> { + ::fold_class(&mut **self, node) + } + + #[inline] + fn fold_class_decl(&mut self, node: ClassDecl<'a>) -> ClassDecl<'a> { + ::fold_class_decl(&mut **self, node) + } + + #[inline] + fn fold_class_expr(&mut self, node: ClassExpr<'a>) -> ClassExpr<'a> { + ::fold_class_expr(&mut **self, node) + } + + #[inline] + fn fold_class_member(&mut self, node: ClassMember<'a>) -> ClassMember<'a> { + ::fold_class_member(&mut **self, node) + } + + #[inline] + fn fold_class_members(&mut self, node: Vec<'a, ClassMember<'a>>) -> Vec<'a, ClassMember<'a>> { + ::fold_class_members(&mut **self, node) + } + + #[inline] + fn fold_class_method(&mut self, node: ClassMethod<'a>) -> ClassMethod<'a> { + ::fold_class_method(&mut **self, node) + } + + #[inline] + fn fold_class_prop(&mut self, node: ClassProp<'a>) -> ClassProp<'a> { + ::fold_class_prop(&mut **self, node) + } + + #[inline] + fn fold_computed_prop_name(&mut self, node: ComputedPropName<'a>) -> ComputedPropName<'a> { + ::fold_computed_prop_name(&mut **self, node) + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>) -> CondExpr<'a> { + ::fold_cond_expr(&mut **self, node) + } + + #[inline] + fn fold_constructor(&mut self, node: Constructor<'a>) -> Constructor<'a> { + ::fold_constructor(&mut **self, node) + } + + #[inline] + fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { + ::fold_continue_stmt(&mut **self, node) + } + + #[inline] + fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { + ::fold_debugger_stmt(&mut **self, node) + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>) -> Decl<'a> { + ::fold_decl(&mut **self, node) + } + + #[inline] + fn fold_decorator(&mut self, node: Decorator<'a>) -> Decorator<'a> { + ::fold_decorator(&mut **self, node) + } + + #[inline] + fn fold_decorators(&mut self, node: Vec<'a, Decorator<'a>>) -> Vec<'a, Decorator<'a>> { + ::fold_decorators(&mut **self, node) + } + + #[inline] + fn fold_default_decl(&mut self, node: DefaultDecl<'a>) -> DefaultDecl<'a> { + ::fold_default_decl(&mut **self, node) + } + + #[inline] + fn fold_do_while_stmt(&mut self, node: DoWhileStmt<'a>) -> DoWhileStmt<'a> { + ::fold_do_while_stmt(&mut **self, node) + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { + ::fold_empty_stmt(&mut **self, node) + } + + #[inline] + fn fold_export_all(&mut self, node: ExportAll<'a>) -> ExportAll<'a> { + ::fold_export_all(&mut **self, node) + } + + #[inline] + fn fold_export_decl(&mut self, node: ExportDecl<'a>) -> ExportDecl<'a> { + ::fold_export_decl(&mut **self, node) + } + + #[inline] + fn fold_export_default_decl(&mut self, node: ExportDefaultDecl<'a>) -> ExportDefaultDecl<'a> { + ::fold_export_default_decl(&mut **self, node) + } + + #[inline] + fn fold_export_default_expr(&mut self, node: ExportDefaultExpr<'a>) -> ExportDefaultExpr<'a> { + ::fold_export_default_expr(&mut **self, node) + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + ) -> ExportDefaultSpecifier { + ::fold_export_default_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + ) -> ExportNamedSpecifier<'a> { + ::fold_export_named_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + ) -> ExportNamespaceSpecifier<'a> { + ::fold_export_namespace_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_specifier(&mut self, node: ExportSpecifier<'a>) -> ExportSpecifier<'a> { + ::fold_export_specifier(&mut **self, node) + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + ) -> Vec<'a, ExportSpecifier<'a>> { + ::fold_export_specifiers(&mut **self, node) + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>) -> Expr<'a> { + ::fold_expr(&mut **self, node) + } + + #[inline] + fn fold_expr_or_spread(&mut self, node: ExprOrSpread<'a>) -> ExprOrSpread<'a> { + ::fold_expr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + ) -> Vec<'a, ExprOrSpread<'a>> { + ::fold_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>) -> ExprStmt<'a> { + ::fold_expr_stmt(&mut **self, node) + } + + #[inline] + fn fold_exprs(&mut self, node: Vec<'a, Expr<'a>>) -> Vec<'a, Expr<'a>> { + ::fold_exprs(&mut **self, node) + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>) -> FnDecl<'a> { + ::fold_fn_decl(&mut **self, node) + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>) -> FnExpr<'a> { + ::fold_fn_expr(&mut **self, node) + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>) -> ForHead<'a> { + ::fold_for_head(&mut **self, node) + } + + #[inline] + fn fold_for_in_stmt(&mut self, node: ForInStmt<'a>) -> ForInStmt<'a> { + ::fold_for_in_stmt(&mut **self, node) + } + + #[inline] + fn fold_for_of_stmt(&mut self, node: ForOfStmt<'a>) -> ForOfStmt<'a> { + ::fold_for_of_stmt(&mut **self, node) + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>) -> ForStmt<'a> { + ::fold_for_stmt(&mut **self, node) + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>) -> Function<'a> { + ::fold_function(&mut **self, node) + } + + #[inline] + fn fold_getter_prop(&mut self, node: GetterProp<'a>) -> GetterProp<'a> { + ::fold_getter_prop(&mut **self, node) + } + + #[inline] + fn fold_ident(&mut self, node: Ident) -> Ident { + ::fold_ident(&mut **self, node) + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName) -> IdentName { + ::fold_ident_name(&mut **self, node) + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>) -> IfStmt<'a> { + ::fold_if_stmt(&mut **self, node) + } + + #[inline] + fn fold_import(&mut self, node: Import) -> Import { + ::fold_import(&mut **self, node) + } + + #[inline] + fn fold_import_decl(&mut self, node: ImportDecl<'a>) -> ImportDecl<'a> { + ::fold_import_decl(&mut **self, node) + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + ) -> ImportDefaultSpecifier { + ::fold_import_default_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + ) -> ImportNamedSpecifier<'a> { + ::fold_import_named_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { + ::fold_import_phase(&mut **self, node) + } + + #[inline] + fn fold_import_specifier(&mut self, node: ImportSpecifier<'a>) -> ImportSpecifier<'a> { + ::fold_import_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + ) -> Vec<'a, ImportSpecifier<'a>> { + ::fold_import_specifiers(&mut **self, node) + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + ) -> ImportStarAsSpecifier { + ::fold_import_star_as_specifier(&mut **self, node) + } + + #[inline] + fn fold_import_with(&mut self, node: ImportWith<'a>) -> ImportWith<'a> { + ::fold_import_with(&mut **self, node) + } + + #[inline] + fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { + ::fold_import_with_item(&mut **self, node) + } + + #[inline] + fn fold_import_with_items(&mut self, node: Vec<'a, ImportWithItem>) -> Vec<'a, ImportWithItem> { + ::fold_import_with_items(&mut **self, node) + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid) -> Invalid { + ::fold_invalid(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>) -> JSXAttr<'a> { + ::fold_jsx_attr(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_name(&mut self, node: JSXAttrName<'a>) -> JSXAttrName<'a> { + ::fold_jsx_attr_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread<'a>) -> JSXAttrOrSpread<'a> { + ::fold_jsx_attr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + ::fold_jsx_attr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_jsx_attr_value(&mut self, node: JSXAttrValue<'a>) -> JSXAttrValue<'a> { + ::fold_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn fold_jsx_closing_element(&mut self, node: JSXClosingElement<'a>) -> JSXClosingElement<'a> { + ::fold_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_closing_fragment(&mut self, node: JSXClosingFragment) -> JSXClosingFragment { + ::fold_jsx_closing_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_element(&mut self, node: JSXElement<'a>) -> JSXElement<'a> { + ::fold_jsx_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_child(&mut self, node: JSXElementChild<'a>) -> JSXElementChild<'a> { + ::fold_jsx_element_child(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + ) -> Vec<'a, JSXElementChild<'a>> { + ::fold_jsx_element_childs(&mut **self, node) + } + + #[inline] + fn fold_jsx_element_name(&mut self, node: JSXElementName<'a>) -> JSXElementName<'a> { + ::fold_jsx_element_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { + ::fold_jsx_empty_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>) -> JSXExpr<'a> { + ::fold_jsx_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_expr_container(&mut self, node: JSXExprContainer<'a>) -> JSXExprContainer<'a> { + ::fold_jsx_expr_container(&mut **self, node) + } + + #[inline] + fn fold_jsx_fragment(&mut self, node: JSXFragment<'a>) -> JSXFragment<'a> { + ::fold_jsx_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr<'a>) -> JSXMemberExpr<'a> { + ::fold_jsx_member_expr(&mut **self, node) + } + + #[inline] + fn fold_jsx_namespaced_name(&mut self, node: JSXNamespacedName) -> JSXNamespacedName { + ::fold_jsx_namespaced_name(&mut **self, node) + } + + #[inline] + fn fold_jsx_object(&mut self, node: JSXObject<'a>) -> JSXObject<'a> { + ::fold_jsx_object(&mut **self, node) + } + + #[inline] + fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement<'a>) -> JSXOpeningElement<'a> { + ::fold_jsx_opening_element(&mut **self, node) + } + + #[inline] + fn fold_jsx_opening_fragment(&mut self, node: JSXOpeningFragment) -> JSXOpeningFragment { + ::fold_jsx_opening_fragment(&mut **self, node) + } + + #[inline] + fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild<'a>) -> JSXSpreadChild<'a> { + ::fold_jsx_spread_child(&mut **self, node) + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { + ::fold_jsx_text(&mut **self, node) + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>) -> Key<'a> { + ::fold_key(&mut **self, node) + } + + #[inline] + fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp<'a>) -> KeyValuePatProp<'a> { + ::fold_key_value_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_key_value_prop(&mut self, node: KeyValueProp<'a>) -> KeyValueProp<'a> { + ::fold_key_value_prop(&mut **self, node) + } + + #[inline] + fn fold_labeled_stmt(&mut self, node: LabeledStmt<'a>) -> LabeledStmt<'a> { + ::fold_labeled_stmt(&mut **self, node) + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>) -> Lit<'a> { + ::fold_lit(&mut **self, node) + } + + #[inline] + fn fold_member_expr(&mut self, node: MemberExpr<'a>) -> MemberExpr<'a> { + ::fold_member_expr(&mut **self, node) + } + + #[inline] + fn fold_member_prop(&mut self, node: MemberProp<'a>) -> MemberProp<'a> { + ::fold_member_prop(&mut **self, node) + } + + #[inline] + fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { + ::fold_meta_prop_expr(&mut **self, node) + } + + #[inline] + fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { + ::fold_meta_prop_kind(&mut **self, node) + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { + ::fold_method_kind(&mut **self, node) + } + + #[inline] + fn fold_method_prop(&mut self, node: MethodProp<'a>) -> MethodProp<'a> { + ::fold_method_prop(&mut **self, node) + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + ::fold_module(&mut **self, node) + } + + #[inline] + fn fold_module_decl(&mut self, node: ModuleDecl<'a>) -> ModuleDecl<'a> { + ::fold_module_decl(&mut **self, node) + } + + #[inline] + fn fold_module_export_name(&mut self, node: ModuleExportName<'a>) -> ModuleExportName<'a> { + ::fold_module_export_name(&mut **self, node) + } + + #[inline] + fn fold_module_item(&mut self, node: ModuleItem<'a>) -> ModuleItem<'a> { + ::fold_module_item(&mut **self, node) + } + + #[inline] + fn fold_module_items(&mut self, node: Vec<'a, ModuleItem<'a>>) -> Vec<'a, ModuleItem<'a>> { + ::fold_module_items(&mut **self, node) + } + + #[inline] + fn fold_named_export(&mut self, node: NamedExport<'a>) -> NamedExport<'a> { + ::fold_named_export(&mut **self, node) + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>) -> NewExpr<'a> { + ::fold_new_expr(&mut **self, node) + } + + #[inline] + fn fold_null(&mut self, node: Null) -> Null { + ::fold_null(&mut **self, node) + } + + #[inline] + fn fold_number(&mut self, node: Number) -> Number { + ::fold_number(&mut **self, node) + } + + #[inline] + fn fold_object_lit(&mut self, node: ObjectLit<'a>) -> ObjectLit<'a> { + ::fold_object_lit(&mut **self, node) + } + + #[inline] + fn fold_object_pat(&mut self, node: ObjectPat<'a>) -> ObjectPat<'a> { + ::fold_object_pat(&mut **self, node) + } + + #[inline] + fn fold_object_pat_prop(&mut self, node: ObjectPatProp<'a>) -> ObjectPatProp<'a> { + ::fold_object_pat_prop(&mut **self, node) + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + ) -> Vec<'a, ObjectPatProp<'a>> { + ::fold_object_pat_props(&mut **self, node) + } + + #[inline] + fn fold_opt_accessibility(&mut self, node: Option) -> Option { + ::fold_opt_accessibility(&mut **self, node) + } + + #[inline] + fn fold_opt_atom(&mut self, node: Option) -> Option { + ::fold_opt_atom(&mut **self, node) + } + + #[inline] + fn fold_opt_block_stmt(&mut self, node: Option>) -> Option> { + ::fold_opt_block_stmt(&mut **self, node) + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>) -> OptCall<'a> { + ::fold_opt_call(&mut **self, node) + } + + #[inline] + fn fold_opt_catch_clause(&mut self, node: Option>) -> Option> { + ::fold_opt_catch_clause(&mut **self, node) + } + + #[inline] + fn fold_opt_chain_base(&mut self, node: OptChainBase<'a>) -> OptChainBase<'a> { + ::fold_opt_chain_base(&mut **self, node) + } + + #[inline] + fn fold_opt_chain_expr(&mut self, node: OptChainExpr<'a>) -> OptChainExpr<'a> { + ::fold_opt_chain_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_expr(&mut self, node: Option>) -> Option> { + ::fold_opt_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_expr_or_spread(&mut **self, node) + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_opt_ident(&mut self, node: Option) -> Option { + ::fold_opt_ident(&mut **self, node) + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_jsx_attr_value(&mut **self, node) + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_jsx_closing_element(&mut **self, node) + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_module_export_name(&mut **self, node) + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_object_lit(&mut **self, node) + } + + #[inline] + fn fold_opt_pat(&mut self, node: Option>) -> Option> { + ::fold_opt_pat(&mut **self, node) + } + + #[inline] + fn fold_opt_span(&mut self, node: Option) -> Option { + ::fold_opt_span(&mut **self, node) + } + + #[inline] + fn fold_opt_stmt(&mut self, node: Option>) -> Option> { + ::fold_opt_stmt(&mut **self, node) + } + + #[inline] + fn fold_opt_str(&mut self, node: Option>) -> Option> { + ::fold_opt_str(&mut **self, node) + } + + #[inline] + fn fold_opt_true_plus_minus(&mut self, node: Option) -> Option { + ::fold_opt_true_plus_minus(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_ts_entity_name(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type(&mut self, node: Option>) -> Option> { + ::fold_opt_ts_type(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_ann(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + ) -> Option>> { + ::fold_opt_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + ) -> Option> { + ::fold_opt_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_expr_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_opt_vec_pats(&mut self, node: Vec<'a, Option>>) -> Vec<'a, Option>> { + ::fold_opt_vec_pats(&mut **self, node) + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>) -> Param<'a> { + ::fold_param(&mut **self, node) + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + ) -> ParamOrTsParamProp<'a> { + ::fold_param_or_ts_param_prop(&mut **self, node) + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + ::fold_param_or_ts_param_props(&mut **self, node) + } + + #[inline] + fn fold_params(&mut self, node: Vec<'a, Param<'a>>) -> Vec<'a, Param<'a>> { + ::fold_params(&mut **self, node) + } + + #[inline] + fn fold_paren_expr(&mut self, node: ParenExpr<'a>) -> ParenExpr<'a> { + ::fold_paren_expr(&mut **self, node) + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>) -> Pat<'a> { + ::fold_pat(&mut **self, node) + } + + #[inline] + fn fold_pats(&mut self, node: Vec<'a, Pat<'a>>) -> Vec<'a, Pat<'a>> { + ::fold_pats(&mut **self, node) + } + + #[inline] + fn fold_private_method(&mut self, node: PrivateMethod<'a>) -> PrivateMethod<'a> { + ::fold_private_method(&mut **self, node) + } + + #[inline] + fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { + ::fold_private_name(&mut **self, node) + } + + #[inline] + fn fold_private_prop(&mut self, node: PrivateProp<'a>) -> PrivateProp<'a> { + ::fold_private_prop(&mut **self, node) + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + ::fold_program(&mut **self, node) + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>) -> Prop<'a> { + ::fold_prop(&mut **self, node) + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>) -> PropName<'a> { + ::fold_prop_name(&mut **self, node) + } + + #[inline] + fn fold_prop_or_spread(&mut self, node: PropOrSpread<'a>) -> PropOrSpread<'a> { + ::fold_prop_or_spread(&mut **self, node) + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + ) -> Vec<'a, PropOrSpread<'a>> { + ::fold_prop_or_spreads(&mut **self, node) + } + + #[inline] + fn fold_regex(&mut self, node: Regex) -> Regex { + ::fold_regex(&mut **self, node) + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>) -> RestPat<'a> { + ::fold_rest_pat(&mut **self, node) + } + + #[inline] + fn fold_return_stmt(&mut self, node: ReturnStmt<'a>) -> ReturnStmt<'a> { + ::fold_return_stmt(&mut **self, node) + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + ::fold_script(&mut **self, node) + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>) -> SeqExpr<'a> { + ::fold_seq_expr(&mut **self, node) + } + + #[inline] + fn fold_setter_prop(&mut self, node: SetterProp<'a>) -> SetterProp<'a> { + ::fold_setter_prop(&mut **self, node) + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + ) -> SimpleAssignTarget<'a> { + ::fold_simple_assign_target(&mut **self, node) + } + + #[inline] + fn fold_span(&mut self, node: swc_common::Span) -> swc_common::Span { + ::fold_span(&mut **self, node) + } + + #[inline] + fn fold_spread_element(&mut self, node: SpreadElement<'a>) -> SpreadElement<'a> { + ::fold_spread_element(&mut **self, node) + } + + #[inline] + fn fold_static_block(&mut self, node: StaticBlock<'a>) -> StaticBlock<'a> { + ::fold_static_block(&mut **self, node) + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + ::fold_stmt(&mut **self, node) + } + + #[inline] + fn fold_stmts(&mut self, node: Vec<'a, Stmt<'a>>) -> Vec<'a, Stmt<'a>> { + ::fold_stmts(&mut **self, node) + } + + #[inline] + fn fold_str(&mut self, node: Str) -> Str { + ::fold_str(&mut **self, node) + } + + #[inline] + fn fold_super(&mut self, node: Super) -> Super { + ::fold_super(&mut **self, node) + } + + #[inline] + fn fold_super_prop(&mut self, node: SuperProp<'a>) -> SuperProp<'a> { + ::fold_super_prop(&mut **self, node) + } + + #[inline] + fn fold_super_prop_expr(&mut self, node: SuperPropExpr<'a>) -> SuperPropExpr<'a> { + ::fold_super_prop_expr(&mut **self, node) + } + + #[inline] + fn fold_switch_case(&mut self, node: SwitchCase<'a>) -> SwitchCase<'a> { + ::fold_switch_case(&mut **self, node) + } + + #[inline] + fn fold_switch_cases(&mut self, node: Vec<'a, SwitchCase<'a>>) -> Vec<'a, SwitchCase<'a>> { + ::fold_switch_cases(&mut **self, node) + } + + #[inline] + fn fold_switch_stmt(&mut self, node: SwitchStmt<'a>) -> SwitchStmt<'a> { + ::fold_switch_stmt(&mut **self, node) + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + ) -> swc_common::SyntaxContext { + ::fold_syntax_context(&mut **self, node) + } + + #[inline] + fn fold_tagged_tpl(&mut self, node: TaggedTpl<'a>) -> TaggedTpl<'a> { + ::fold_tagged_tpl(&mut **self, node) + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { + ::fold_this_expr(&mut **self, node) + } + + #[inline] + fn fold_throw_stmt(&mut self, node: ThrowStmt<'a>) -> ThrowStmt<'a> { + ::fold_throw_stmt(&mut **self, node) + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>) -> Tpl<'a> { + ::fold_tpl(&mut **self, node) + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { + ::fold_tpl_element(&mut **self, node) + } + + #[inline] + fn fold_tpl_elements(&mut self, node: Vec<'a, TplElement>) -> Vec<'a, TplElement> { + ::fold_tpl_elements(&mut **self, node) + } + + #[inline] + fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { + ::fold_true_plus_minus(&mut **self, node) + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>) -> TryStmt<'a> { + ::fold_try_stmt(&mut **self, node) + } + + #[inline] + fn fold_ts_array_type(&mut self, node: TsArrayType<'a>) -> TsArrayType<'a> { + ::fold_ts_array_type(&mut **self, node) + } + + #[inline] + fn fold_ts_as_expr(&mut self, node: TsAsExpr<'a>) -> TsAsExpr<'a> { + ::fold_ts_as_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + ) -> TsCallSignatureDecl<'a> { + ::fold_ts_call_signature_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_conditional_type(&mut self, node: TsConditionalType<'a>) -> TsConditionalType<'a> { + ::fold_ts_conditional_type(&mut **self, node) + } + + #[inline] + fn fold_ts_const_assertion(&mut self, node: TsConstAssertion<'a>) -> TsConstAssertion<'a> { + ::fold_ts_const_assertion(&mut **self, node) + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + ) -> TsConstructSignatureDecl<'a> { + ::fold_ts_construct_signature_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_constructor_type(&mut self, node: TsConstructorType<'a>) -> TsConstructorType<'a> { + ::fold_ts_constructor_type(&mut **self, node) + } + + #[inline] + fn fold_ts_entity_name(&mut self, node: TsEntityName<'a>) -> TsEntityName<'a> { + ::fold_ts_entity_name(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_decl(&mut self, node: TsEnumDecl<'a>) -> TsEnumDecl<'a> { + ::fold_ts_enum_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_member(&mut self, node: TsEnumMember<'a>) -> TsEnumMember<'a> { + ::fold_ts_enum_member(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_member_id(&mut self, node: TsEnumMemberId<'a>) -> TsEnumMemberId<'a> { + ::fold_ts_enum_member_id(&mut **self, node) + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + ) -> Vec<'a, TsEnumMember<'a>> { + ::fold_ts_enum_members(&mut **self, node) + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + ) -> TsExportAssignment<'a> { + ::fold_ts_export_assignment(&mut **self, node) + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + ) -> TsExprWithTypeArgs<'a> { + ::fold_ts_expr_with_type_args(&mut **self, node) + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + ::fold_ts_expr_with_type_argss(&mut **self, node) + } + + #[inline] + fn fold_ts_external_module_ref(&mut self, node: TsExternalModuleRef) -> TsExternalModuleRef { + ::fold_ts_external_module_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + ) -> TsFnOrConstructorType<'a> { + ::fold_ts_fn_or_constructor_type(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_param(&mut self, node: TsFnParam<'a>) -> TsFnParam<'a> { + ::fold_ts_fn_param(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_params(&mut self, node: Vec<'a, TsFnParam<'a>>) -> Vec<'a, TsFnParam<'a>> { + ::fold_ts_fn_params(&mut **self, node) + } + + #[inline] + fn fold_ts_fn_type(&mut self, node: TsFnType<'a>) -> TsFnType<'a> { + ::fold_ts_fn_type(&mut **self, node) + } + + #[inline] + fn fold_ts_getter_signature(&mut self, node: TsGetterSignature<'a>) -> TsGetterSignature<'a> { + ::fold_ts_getter_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + ) -> TsImportEqualsDecl<'a> { + ::fold_ts_import_equals_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_import_type(&mut self, node: TsImportType<'a>) -> TsImportType<'a> { + ::fold_ts_import_type(&mut **self, node) + } + + #[inline] + fn fold_ts_index_signature(&mut self, node: TsIndexSignature<'a>) -> TsIndexSignature<'a> { + ::fold_ts_index_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + ) -> TsIndexedAccessType<'a> { + ::fold_ts_indexed_access_type(&mut **self, node) + } + + #[inline] + fn fold_ts_infer_type(&mut self, node: TsInferType<'a>) -> TsInferType<'a> { + ::fold_ts_infer_type(&mut **self, node) + } + + #[inline] + fn fold_ts_instantiation(&mut self, node: TsInstantiation<'a>) -> TsInstantiation<'a> { + ::fold_ts_instantiation(&mut **self, node) + } + + #[inline] + fn fold_ts_interface_body(&mut self, node: TsInterfaceBody<'a>) -> TsInterfaceBody<'a> { + ::fold_ts_interface_body(&mut **self, node) + } + + #[inline] + fn fold_ts_interface_decl(&mut self, node: TsInterfaceDecl<'a>) -> TsInterfaceDecl<'a> { + ::fold_ts_interface_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + ) -> TsIntersectionType<'a> { + ::fold_ts_intersection_type(&mut **self, node) + } + + #[inline] + fn fold_ts_keyword_type(&mut self, node: TsKeywordType) -> TsKeywordType { + ::fold_ts_keyword_type(&mut **self, node) + } + + #[inline] + fn fold_ts_keyword_type_kind(&mut self, node: TsKeywordTypeKind) -> TsKeywordTypeKind { + ::fold_ts_keyword_type_kind(&mut **self, node) + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>) -> TsLit<'a> { + ::fold_ts_lit(&mut **self, node) + } + + #[inline] + fn fold_ts_lit_type(&mut self, node: TsLitType<'a>) -> TsLitType<'a> { + ::fold_ts_lit_type(&mut **self, node) + } + + #[inline] + fn fold_ts_mapped_type(&mut self, node: TsMappedType<'a>) -> TsMappedType<'a> { + ::fold_ts_mapped_type(&mut **self, node) + } + + #[inline] + fn fold_ts_method_signature(&mut self, node: TsMethodSignature<'a>) -> TsMethodSignature<'a> { + ::fold_ts_method_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_module_block(&mut self, node: TsModuleBlock<'a>) -> TsModuleBlock<'a> { + ::fold_ts_module_block(&mut **self, node) + } + + #[inline] + fn fold_ts_module_decl(&mut self, node: TsModuleDecl<'a>) -> TsModuleDecl<'a> { + ::fold_ts_module_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_module_name(&mut self, node: TsModuleName<'a>) -> TsModuleName<'a> { + ::fold_ts_module_name(&mut **self, node) + } + + #[inline] + fn fold_ts_module_ref(&mut self, node: TsModuleRef<'a>) -> TsModuleRef<'a> { + ::fold_ts_module_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_body(&mut self, node: TsNamespaceBody<'a>) -> TsNamespaceBody<'a> { + ::fold_ts_namespace_body(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_decl(&mut self, node: TsNamespaceDecl<'a>) -> TsNamespaceDecl<'a> { + ::fold_ts_namespace_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + ) -> TsNamespaceExportDecl { + ::fold_ts_namespace_export_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_non_null_expr(&mut self, node: TsNonNullExpr<'a>) -> TsNonNullExpr<'a> { + ::fold_ts_non_null_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_optional_type(&mut self, node: TsOptionalType<'a>) -> TsOptionalType<'a> { + ::fold_ts_optional_type(&mut **self, node) + } + + #[inline] + fn fold_ts_param_prop(&mut self, node: TsParamProp<'a>) -> TsParamProp<'a> { + ::fold_ts_param_prop(&mut **self, node) + } + + #[inline] + fn fold_ts_param_prop_param(&mut self, node: TsParamPropParam<'a>) -> TsParamPropParam<'a> { + ::fold_ts_param_prop_param(&mut **self, node) + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + ) -> TsParenthesizedType<'a> { + ::fold_ts_parenthesized_type(&mut **self, node) + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + ) -> TsPropertySignature<'a> { + ::fold_ts_property_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_qualified_name(&mut self, node: TsQualifiedName<'a>) -> TsQualifiedName<'a> { + ::fold_ts_qualified_name(&mut **self, node) + } + + #[inline] + fn fold_ts_rest_type(&mut self, node: TsRestType<'a>) -> TsRestType<'a> { + ::fold_ts_rest_type(&mut **self, node) + } + + #[inline] + fn fold_ts_satisfies_expr(&mut self, node: TsSatisfiesExpr<'a>) -> TsSatisfiesExpr<'a> { + ::fold_ts_satisfies_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_setter_signature(&mut self, node: TsSetterSignature<'a>) -> TsSetterSignature<'a> { + ::fold_ts_setter_signature(&mut **self, node) + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType) -> TsThisType { + ::fold_ts_this_type(&mut **self, node) + } + + #[inline] + fn fold_ts_this_type_or_ident(&mut self, node: TsThisTypeOrIdent<'a>) -> TsThisTypeOrIdent<'a> { + ::fold_ts_this_type_or_ident(&mut **self, node) + } + + #[inline] + fn fold_ts_tpl_lit_type(&mut self, node: TsTplLitType<'a>) -> TsTplLitType<'a> { + ::fold_ts_tpl_lit_type(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_element(&mut self, node: TsTupleElement<'a>) -> TsTupleElement<'a> { + ::fold_ts_tuple_element(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + ) -> Vec<'a, TsTupleElement<'a>> { + ::fold_ts_tuple_elements(&mut **self, node) + } + + #[inline] + fn fold_ts_tuple_type(&mut self, node: TsTupleType<'a>) -> TsTupleType<'a> { + ::fold_ts_tuple_type(&mut **self, node) + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>) -> TsType<'a> { + ::fold_ts_type(&mut **self, node) + } + + #[inline] + fn fold_ts_type_alias_decl(&mut self, node: TsTypeAliasDecl<'a>) -> TsTypeAliasDecl<'a> { + ::fold_ts_type_alias_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_type_ann(&mut self, node: TsTypeAnn<'a>) -> TsTypeAnn<'a> { + ::fold_ts_type_ann(&mut **self, node) + } + + #[inline] + fn fold_ts_type_assertion(&mut self, node: TsTypeAssertion<'a>) -> TsTypeAssertion<'a> { + ::fold_ts_type_assertion(&mut **self, node) + } + + #[inline] + fn fold_ts_type_element(&mut self, node: TsTypeElement<'a>) -> TsTypeElement<'a> { + ::fold_ts_type_element(&mut **self, node) + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + ) -> Vec<'a, TsTypeElement<'a>> { + ::fold_ts_type_elements(&mut **self, node) + } + + #[inline] + fn fold_ts_type_lit(&mut self, node: TsTypeLit<'a>) -> TsTypeLit<'a> { + ::fold_ts_type_lit(&mut **self, node) + } + + #[inline] + fn fold_ts_type_operator(&mut self, node: TsTypeOperator<'a>) -> TsTypeOperator<'a> { + ::fold_ts_type_operator(&mut **self, node) + } + + #[inline] + fn fold_ts_type_operator_op(&mut self, node: TsTypeOperatorOp) -> TsTypeOperatorOp { + ::fold_ts_type_operator_op(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param(&mut self, node: TsTypeParam<'a>) -> TsTypeParam<'a> { + ::fold_ts_type_param(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param_decl(&mut self, node: TsTypeParamDecl<'a>) -> TsTypeParamDecl<'a> { + ::fold_ts_type_param_decl(&mut **self, node) + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + ) -> TsTypeParamInstantiation<'a> { + ::fold_ts_type_param_instantiation(&mut **self, node) + } + + #[inline] + fn fold_ts_type_params(&mut self, node: Vec<'a, TsTypeParam<'a>>) -> Vec<'a, TsTypeParam<'a>> { + ::fold_ts_type_params(&mut **self, node) + } + + #[inline] + fn fold_ts_type_predicate(&mut self, node: TsTypePredicate<'a>) -> TsTypePredicate<'a> { + ::fold_ts_type_predicate(&mut **self, node) + } + + #[inline] + fn fold_ts_type_query(&mut self, node: TsTypeQuery<'a>) -> TsTypeQuery<'a> { + ::fold_ts_type_query(&mut **self, node) + } + + #[inline] + fn fold_ts_type_query_expr(&mut self, node: TsTypeQueryExpr<'a>) -> TsTypeQueryExpr<'a> { + ::fold_ts_type_query_expr(&mut **self, node) + } + + #[inline] + fn fold_ts_type_ref(&mut self, node: TsTypeRef<'a>) -> TsTypeRef<'a> { + ::fold_ts_type_ref(&mut **self, node) + } + + #[inline] + fn fold_ts_types(&mut self, node: Vec<'a, TsType<'a>>) -> Vec<'a, TsType<'a>> { + ::fold_ts_types(&mut **self, node) + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + ) -> TsUnionOrIntersectionType<'a> { + ::fold_ts_union_or_intersection_type(&mut **self, node) + } + + #[inline] + fn fold_ts_union_type(&mut self, node: TsUnionType<'a>) -> TsUnionType<'a> { + ::fold_ts_union_type(&mut **self, node) + } + + #[inline] + fn fold_unary_expr(&mut self, node: UnaryExpr<'a>) -> UnaryExpr<'a> { + ::fold_unary_expr(&mut **self, node) + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { + ::fold_unary_op(&mut **self, node) + } + + #[inline] + fn fold_update_expr(&mut self, node: UpdateExpr<'a>) -> UpdateExpr<'a> { + ::fold_update_expr(&mut **self, node) + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { + ::fold_update_op(&mut **self, node) + } + + #[inline] + fn fold_using_decl(&mut self, node: UsingDecl<'a>) -> UsingDecl<'a> { + ::fold_using_decl(&mut **self, node) + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>) -> VarDecl<'a> { + ::fold_var_decl(&mut **self, node) + } + + #[inline] + fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { + ::fold_var_decl_kind(&mut **self, node) + } + + #[inline] + fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr<'a>) -> VarDeclOrExpr<'a> { + ::fold_var_decl_or_expr(&mut **self, node) + } + + #[inline] + fn fold_var_declarator(&mut self, node: VarDeclarator<'a>) -> VarDeclarator<'a> { + ::fold_var_declarator(&mut **self, node) + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + ) -> Vec<'a, VarDeclarator<'a>> { + ::fold_var_declarators(&mut **self, node) + } + + #[inline] + fn fold_while_stmt(&mut self, node: WhileStmt<'a>) -> WhileStmt<'a> { + ::fold_while_stmt(&mut **self, node) + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>) -> WithStmt<'a> { + ::fold_with_stmt(&mut **self, node) + } + + #[inline] + fn fold_yield_expr(&mut self, node: YieldExpr<'a>) -> YieldExpr<'a> { + ::fold_yield_expr(&mut **self, node) + } +} +impl<'a, A, B> Fold<'a> for ::swc_visit::Either +where + A: Fold<'a>, + B: Fold<'a>, +{ + #[inline] + fn fold_accessibility(&mut self, node: Accessibility) -> Accessibility { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_accessibility(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_accessibility(visitor, node), + } + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>) -> ArrayLit<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_array_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_array_lit(visitor, node), + } + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>) -> ArrayPat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_array_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_array_pat(visitor, node), + } + } + + #[inline] + fn fold_arrow_expr(&mut self, node: ArrowExpr<'a>) -> ArrowExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_arrow_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_arrow_expr(visitor, node), + } + } + + #[inline] + fn fold_assign_expr(&mut self, node: AssignExpr<'a>) -> AssignExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_expr(visitor, node), + } + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_op(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_op(visitor, node), + } + } + + #[inline] + fn fold_assign_pat(&mut self, node: AssignPat<'a>) -> AssignPat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_pat(visitor, node), + } + } + + #[inline] + fn fold_assign_pat_prop(&mut self, node: AssignPatProp<'a>) -> AssignPatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_pat_prop(visitor, node), + } + } + + #[inline] + fn fold_assign_prop(&mut self, node: AssignProp<'a>) -> AssignProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_prop(visitor, node), + } + } + + #[inline] + fn fold_assign_target(&mut self, node: AssignTarget<'a>) -> AssignTarget<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_target(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_target(visitor, node), + } + } + + #[inline] + fn fold_assign_target_pat(&mut self, node: AssignTargetPat<'a>) -> AssignTargetPat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_assign_target_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_assign_target_pat(visitor, node), + } + } + + #[inline] + fn fold_atom(&mut self, node: swc_atoms::Atom) -> swc_atoms::Atom { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_atom(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_atom(visitor, node), + } + } + + #[inline] + fn fold_auto_accessor(&mut self, node: AutoAccessor<'a>) -> AutoAccessor<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_auto_accessor(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_auto_accessor(visitor, node), + } + } + + #[inline] + fn fold_await_expr(&mut self, node: AwaitExpr<'a>) -> AwaitExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_await_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_await_expr(visitor, node), + } + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>) -> BigInt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_big_int(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_big_int(visitor, node), + } + } + + #[inline] + fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_big_int_value(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_big_int_value(visitor, node), + } + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>) -> BinExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_bin_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_bin_expr(visitor, node), + } + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_binary_op(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_binary_op(visitor, node), + } + } + + #[inline] + fn fold_binding_ident(&mut self, node: BindingIdent<'a>) -> BindingIdent<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_binding_ident(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_binding_ident(visitor, node), + } + } + + #[inline] + fn fold_block_stmt(&mut self, node: BlockStmt<'a>) -> BlockStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_block_stmt(visitor, node), + } + } + + #[inline] + fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr<'a>) -> BlockStmtOrExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_block_stmt_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_block_stmt_or_expr(visitor, node), + } + } + + #[inline] + fn fold_bool(&mut self, node: Bool) -> Bool { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_bool(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_bool(visitor, node), + } + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_break_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_break_stmt(visitor, node), + } + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>) -> CallExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_call_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_call_expr(visitor, node), + } + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>) -> Callee<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_callee(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_callee(visitor, node), + } + } + + #[inline] + fn fold_catch_clause(&mut self, node: CatchClause<'a>) -> CatchClause<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_catch_clause(visitor, node), + } + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>) -> Class<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class(visitor, node), + } + } + + #[inline] + fn fold_class_decl(&mut self, node: ClassDecl<'a>) -> ClassDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_decl(visitor, node), + } + } + + #[inline] + fn fold_class_expr(&mut self, node: ClassExpr<'a>) -> ClassExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_expr(visitor, node), + } + } + + #[inline] + fn fold_class_member(&mut self, node: ClassMember<'a>) -> ClassMember<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_member(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_member(visitor, node), + } + } + + #[inline] + fn fold_class_members(&mut self, node: Vec<'a, ClassMember<'a>>) -> Vec<'a, ClassMember<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_members(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_members(visitor, node), + } + } + + #[inline] + fn fold_class_method(&mut self, node: ClassMethod<'a>) -> ClassMethod<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_method(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_method(visitor, node), + } + } + + #[inline] + fn fold_class_prop(&mut self, node: ClassProp<'a>) -> ClassProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_class_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_class_prop(visitor, node), + } + } + + #[inline] + fn fold_computed_prop_name(&mut self, node: ComputedPropName<'a>) -> ComputedPropName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_computed_prop_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_computed_prop_name(visitor, node), + } + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>) -> CondExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_cond_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_cond_expr(visitor, node), + } + } + + #[inline] + fn fold_constructor(&mut self, node: Constructor<'a>) -> Constructor<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_constructor(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_constructor(visitor, node), + } + } + + #[inline] + fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_continue_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_continue_stmt(visitor, node), + } + } + + #[inline] + fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_debugger_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_debugger_stmt(visitor, node), + } + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>) -> Decl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_decl(visitor, node), + } + } + + #[inline] + fn fold_decorator(&mut self, node: Decorator<'a>) -> Decorator<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_decorator(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_decorator(visitor, node), + } + } + + #[inline] + fn fold_decorators(&mut self, node: Vec<'a, Decorator<'a>>) -> Vec<'a, Decorator<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_decorators(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_decorators(visitor, node), + } + } + + #[inline] + fn fold_default_decl(&mut self, node: DefaultDecl<'a>) -> DefaultDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_default_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_default_decl(visitor, node), + } + } + + #[inline] + fn fold_do_while_stmt(&mut self, node: DoWhileStmt<'a>) -> DoWhileStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_do_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_do_while_stmt(visitor, node), + } + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_empty_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_empty_stmt(visitor, node), + } + } + + #[inline] + fn fold_export_all(&mut self, node: ExportAll<'a>) -> ExportAll<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_all(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_all(visitor, node), + } + } + + #[inline] + fn fold_export_decl(&mut self, node: ExportDecl<'a>) -> ExportDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_decl(visitor, node), + } + } + + #[inline] + fn fold_export_default_decl(&mut self, node: ExportDefaultDecl<'a>) -> ExportDefaultDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_default_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_default_decl(visitor, node), + } + } + + #[inline] + fn fold_export_default_expr(&mut self, node: ExportDefaultExpr<'a>) -> ExportDefaultExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_default_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_default_expr(visitor, node), + } + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + ) -> ExportDefaultSpecifier { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_default_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_default_specifier(visitor, node), + } + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + ) -> ExportNamedSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_named_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_named_specifier(visitor, node), + } + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + ) -> ExportNamespaceSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + Fold::fold_export_namespace_specifier(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Fold::fold_export_namespace_specifier(visitor, node) + } + } + } + + #[inline] + fn fold_export_specifier(&mut self, node: ExportSpecifier<'a>) -> ExportSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_specifier(visitor, node), + } + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + ) -> Vec<'a, ExportSpecifier<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_export_specifiers(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_export_specifiers(visitor, node), + } + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>) -> Expr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_expr(visitor, node), + } + } + + #[inline] + fn fold_expr_or_spread(&mut self, node: ExprOrSpread<'a>) -> ExprOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_expr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_expr_or_spread(visitor, node), + } + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + ) -> Vec<'a, ExprOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>) -> ExprStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_expr_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_expr_stmt(visitor, node), + } + } + + #[inline] + fn fold_exprs(&mut self, node: Vec<'a, Expr<'a>>) -> Vec<'a, Expr<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_exprs(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_exprs(visitor, node), + } + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>) -> FnDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_fn_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_fn_decl(visitor, node), + } + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>) -> FnExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_fn_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_fn_expr(visitor, node), + } + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>) -> ForHead<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_for_head(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_for_head(visitor, node), + } + } + + #[inline] + fn fold_for_in_stmt(&mut self, node: ForInStmt<'a>) -> ForInStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_for_in_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_for_in_stmt(visitor, node), + } + } + + #[inline] + fn fold_for_of_stmt(&mut self, node: ForOfStmt<'a>) -> ForOfStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_for_of_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_for_of_stmt(visitor, node), + } + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>) -> ForStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_for_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_for_stmt(visitor, node), + } + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>) -> Function<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_function(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_function(visitor, node), + } + } + + #[inline] + fn fold_getter_prop(&mut self, node: GetterProp<'a>) -> GetterProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_getter_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_getter_prop(visitor, node), + } + } + + #[inline] + fn fold_ident(&mut self, node: Ident) -> Ident { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ident(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ident(visitor, node), + } + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName) -> IdentName { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ident_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ident_name(visitor, node), + } + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>) -> IfStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_if_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_if_stmt(visitor, node), + } + } + + #[inline] + fn fold_import(&mut self, node: Import) -> Import { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import(visitor, node), + } + } + + #[inline] + fn fold_import_decl(&mut self, node: ImportDecl<'a>) -> ImportDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_decl(visitor, node), + } + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + ) -> ImportDefaultSpecifier { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_default_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_default_specifier(visitor, node), + } + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + ) -> ImportNamedSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_named_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_named_specifier(visitor, node), + } + } + + #[inline] + fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_phase(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_phase(visitor, node), + } + } + + #[inline] + fn fold_import_specifier(&mut self, node: ImportSpecifier<'a>) -> ImportSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_specifier(visitor, node), + } + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + ) -> Vec<'a, ImportSpecifier<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_specifiers(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_specifiers(visitor, node), + } + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + ) -> ImportStarAsSpecifier { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_star_as_specifier(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_star_as_specifier(visitor, node), + } + } + + #[inline] + fn fold_import_with(&mut self, node: ImportWith<'a>) -> ImportWith<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_with(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_with(visitor, node), + } + } + + #[inline] + fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_with_item(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_with_item(visitor, node), + } + } + + #[inline] + fn fold_import_with_items(&mut self, node: Vec<'a, ImportWithItem>) -> Vec<'a, ImportWithItem> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_import_with_items(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_import_with_items(visitor, node), + } + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid) -> Invalid { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_invalid(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_invalid(visitor, node), + } + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>) -> JSXAttr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_attr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_attr(visitor, node), + } + } + + #[inline] + fn fold_jsx_attr_name(&mut self, node: JSXAttrName<'a>) -> JSXAttrName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_attr_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_attr_name(visitor, node), + } + } + + #[inline] + fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread<'a>) -> JSXAttrOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_attr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_attr_or_spread(visitor, node), + } + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_attr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_attr_or_spreads(visitor, node), + } + } + + #[inline] + fn fold_jsx_attr_value(&mut self, node: JSXAttrValue<'a>) -> JSXAttrValue<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_attr_value(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_attr_value(visitor, node), + } + } + + #[inline] + fn fold_jsx_closing_element(&mut self, node: JSXClosingElement<'a>) -> JSXClosingElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_closing_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_closing_element(visitor, node), + } + } + + #[inline] + fn fold_jsx_closing_fragment(&mut self, node: JSXClosingFragment) -> JSXClosingFragment { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_closing_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_closing_fragment(visitor, node), + } + } + + #[inline] + fn fold_jsx_element(&mut self, node: JSXElement<'a>) -> JSXElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_element(visitor, node), + } + } + + #[inline] + fn fold_jsx_element_child(&mut self, node: JSXElementChild<'a>) -> JSXElementChild<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_element_child(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_element_child(visitor, node), + } + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + ) -> Vec<'a, JSXElementChild<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_element_childs(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_element_childs(visitor, node), + } + } + + #[inline] + fn fold_jsx_element_name(&mut self, node: JSXElementName<'a>) -> JSXElementName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_element_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_element_name(visitor, node), + } + } + + #[inline] + fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_empty_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_empty_expr(visitor, node), + } + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>) -> JSXExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_expr(visitor, node), + } + } + + #[inline] + fn fold_jsx_expr_container(&mut self, node: JSXExprContainer<'a>) -> JSXExprContainer<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_expr_container(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_expr_container(visitor, node), + } + } + + #[inline] + fn fold_jsx_fragment(&mut self, node: JSXFragment<'a>) -> JSXFragment<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_fragment(visitor, node), + } + } + + #[inline] + fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr<'a>) -> JSXMemberExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_member_expr(visitor, node), + } + } + + #[inline] + fn fold_jsx_namespaced_name(&mut self, node: JSXNamespacedName) -> JSXNamespacedName { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_namespaced_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_namespaced_name(visitor, node), + } + } + + #[inline] + fn fold_jsx_object(&mut self, node: JSXObject<'a>) -> JSXObject<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_object(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_object(visitor, node), + } + } + + #[inline] + fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement<'a>) -> JSXOpeningElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_opening_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_opening_element(visitor, node), + } + } + + #[inline] + fn fold_jsx_opening_fragment(&mut self, node: JSXOpeningFragment) -> JSXOpeningFragment { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_opening_fragment(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_opening_fragment(visitor, node), + } + } + + #[inline] + fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild<'a>) -> JSXSpreadChild<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_spread_child(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_spread_child(visitor, node), + } + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_jsx_text(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_jsx_text(visitor, node), + } + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>) -> Key<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_key(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_key(visitor, node), + } + } + + #[inline] + fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp<'a>) -> KeyValuePatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_key_value_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_key_value_pat_prop(visitor, node), + } + } + + #[inline] + fn fold_key_value_prop(&mut self, node: KeyValueProp<'a>) -> KeyValueProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_key_value_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_key_value_prop(visitor, node), + } + } + + #[inline] + fn fold_labeled_stmt(&mut self, node: LabeledStmt<'a>) -> LabeledStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_labeled_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_labeled_stmt(visitor, node), + } + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>) -> Lit<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_lit(visitor, node), + } + } + + #[inline] + fn fold_member_expr(&mut self, node: MemberExpr<'a>) -> MemberExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_member_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_member_expr(visitor, node), + } + } + + #[inline] + fn fold_member_prop(&mut self, node: MemberProp<'a>) -> MemberProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_member_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_member_prop(visitor, node), + } + } + + #[inline] + fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_meta_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_meta_prop_expr(visitor, node), + } + } + + #[inline] + fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_meta_prop_kind(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_meta_prop_kind(visitor, node), + } + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_method_kind(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_method_kind(visitor, node), + } + } + + #[inline] + fn fold_method_prop(&mut self, node: MethodProp<'a>) -> MethodProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_method_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_method_prop(visitor, node), + } + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_module(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_module(visitor, node), + } + } + + #[inline] + fn fold_module_decl(&mut self, node: ModuleDecl<'a>) -> ModuleDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_module_decl(visitor, node), + } + } + + #[inline] + fn fold_module_export_name(&mut self, node: ModuleExportName<'a>) -> ModuleExportName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_module_export_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_module_export_name(visitor, node), + } + } + + #[inline] + fn fold_module_item(&mut self, node: ModuleItem<'a>) -> ModuleItem<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_module_item(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_module_item(visitor, node), + } + } + + #[inline] + fn fold_module_items(&mut self, node: Vec<'a, ModuleItem<'a>>) -> Vec<'a, ModuleItem<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_module_items(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_module_items(visitor, node), + } + } + + #[inline] + fn fold_named_export(&mut self, node: NamedExport<'a>) -> NamedExport<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_named_export(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_named_export(visitor, node), + } + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>) -> NewExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_new_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_new_expr(visitor, node), + } + } + + #[inline] + fn fold_null(&mut self, node: Null) -> Null { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_null(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_null(visitor, node), + } + } + + #[inline] + fn fold_number(&mut self, node: Number) -> Number { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_number(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_number(visitor, node), + } + } + + #[inline] + fn fold_object_lit(&mut self, node: ObjectLit<'a>) -> ObjectLit<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_object_lit(visitor, node), + } + } + + #[inline] + fn fold_object_pat(&mut self, node: ObjectPat<'a>) -> ObjectPat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_object_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_object_pat(visitor, node), + } + } + + #[inline] + fn fold_object_pat_prop(&mut self, node: ObjectPatProp<'a>) -> ObjectPatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_object_pat_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_object_pat_prop(visitor, node), + } + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + ) -> Vec<'a, ObjectPatProp<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_object_pat_props(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_object_pat_props(visitor, node), + } + } + + #[inline] + fn fold_opt_accessibility(&mut self, node: Option) -> Option { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_accessibility(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_accessibility(visitor, node), + } + } + + #[inline] + fn fold_opt_atom(&mut self, node: Option) -> Option { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_atom(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_atom(visitor, node), + } + } + + #[inline] + fn fold_opt_block_stmt(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_block_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_block_stmt(visitor, node), + } + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>) -> OptCall<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_call(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_call(visitor, node), + } + } + + #[inline] + fn fold_opt_catch_clause(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_catch_clause(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_catch_clause(visitor, node), + } + } + + #[inline] + fn fold_opt_chain_base(&mut self, node: OptChainBase<'a>) -> OptChainBase<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_chain_base(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_chain_base(visitor, node), + } + } + + #[inline] + fn fold_opt_chain_expr(&mut self, node: OptChainExpr<'a>) -> OptChainExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_chain_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_chain_expr(visitor, node), + } + } + + #[inline] + fn fold_opt_expr(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_expr(visitor, node), + } + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_expr_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_expr_or_spread(visitor, node), + } + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn fold_opt_ident(&mut self, node: Option) -> Option { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ident(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ident(visitor, node), + } + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_jsx_attr_value(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_jsx_attr_value(visitor, node), + } + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_jsx_closing_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_jsx_closing_element(visitor, node), + } + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_module_export_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_module_export_name(visitor, node), + } + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_object_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_object_lit(visitor, node), + } + } + + #[inline] + fn fold_opt_pat(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_pat(visitor, node), + } + } + + #[inline] + fn fold_opt_span(&mut self, node: Option) -> Option { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_span(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_span(visitor, node), + } + } + + #[inline] + fn fold_opt_stmt(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_stmt(visitor, node), + } + } + + #[inline] + fn fold_opt_str(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_str(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_str(visitor, node), + } + } + + #[inline] + fn fold_opt_true_plus_minus(&mut self, node: Option) -> Option { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_true_plus_minus(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_true_plus_minus(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ts_entity_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ts_entity_name(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ts_namespace_body(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ts_namespace_body(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_type(&mut self, node: Option>) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ts_type(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ts_type_ann(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_ts_type_param_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_ts_type_param_decl(visitor, node), + } + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + Fold::fold_opt_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Fold::fold_opt_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_var_decl_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_var_decl_or_expr(visitor, node), + } + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + ) -> Vec<'a, Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_vec_expr_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_vec_expr_or_spreads(visitor, node), + } + } + + #[inline] + fn fold_opt_vec_pats(&mut self, node: Vec<'a, Option>>) -> Vec<'a, Option>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_opt_vec_pats(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_opt_vec_pats(visitor, node), + } + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>) -> Param<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_param(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_param(visitor, node), + } + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + ) -> ParamOrTsParamProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_param_or_ts_param_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_param_or_ts_param_prop(visitor, node), + } + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_param_or_ts_param_props(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_param_or_ts_param_props(visitor, node), + } + } + + #[inline] + fn fold_params(&mut self, node: Vec<'a, Param<'a>>) -> Vec<'a, Param<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_params(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_params(visitor, node), + } + } + + #[inline] + fn fold_paren_expr(&mut self, node: ParenExpr<'a>) -> ParenExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_paren_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_paren_expr(visitor, node), + } + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>) -> Pat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_pat(visitor, node), + } + } + + #[inline] + fn fold_pats(&mut self, node: Vec<'a, Pat<'a>>) -> Vec<'a, Pat<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_pats(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_pats(visitor, node), + } + } + + #[inline] + fn fold_private_method(&mut self, node: PrivateMethod<'a>) -> PrivateMethod<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_private_method(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_private_method(visitor, node), + } + } + + #[inline] + fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_private_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_private_name(visitor, node), + } + } + + #[inline] + fn fold_private_prop(&mut self, node: PrivateProp<'a>) -> PrivateProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_private_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_private_prop(visitor, node), + } + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_program(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_program(visitor, node), + } + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>) -> Prop<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_prop(visitor, node), + } + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>) -> PropName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_prop_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_prop_name(visitor, node), + } + } + + #[inline] + fn fold_prop_or_spread(&mut self, node: PropOrSpread<'a>) -> PropOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_prop_or_spread(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_prop_or_spread(visitor, node), + } + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + ) -> Vec<'a, PropOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_prop_or_spreads(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_prop_or_spreads(visitor, node), + } + } + + #[inline] + fn fold_regex(&mut self, node: Regex) -> Regex { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_regex(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_regex(visitor, node), + } + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>) -> RestPat<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_rest_pat(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_rest_pat(visitor, node), + } + } + + #[inline] + fn fold_return_stmt(&mut self, node: ReturnStmt<'a>) -> ReturnStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_return_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_return_stmt(visitor, node), + } + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_script(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_script(visitor, node), + } + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>) -> SeqExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_seq_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_seq_expr(visitor, node), + } + } + + #[inline] + fn fold_setter_prop(&mut self, node: SetterProp<'a>) -> SetterProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_setter_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_setter_prop(visitor, node), + } + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + ) -> SimpleAssignTarget<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_simple_assign_target(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_simple_assign_target(visitor, node), + } + } + + #[inline] + fn fold_span(&mut self, node: swc_common::Span) -> swc_common::Span { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_span(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_span(visitor, node), + } + } + + #[inline] + fn fold_spread_element(&mut self, node: SpreadElement<'a>) -> SpreadElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_spread_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_spread_element(visitor, node), + } + } + + #[inline] + fn fold_static_block(&mut self, node: StaticBlock<'a>) -> StaticBlock<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_static_block(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_static_block(visitor, node), + } + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_stmt(visitor, node), + } + } + + #[inline] + fn fold_stmts(&mut self, node: Vec<'a, Stmt<'a>>) -> Vec<'a, Stmt<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_stmts(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_stmts(visitor, node), + } + } + + #[inline] + fn fold_str(&mut self, node: Str) -> Str { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_str(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_str(visitor, node), + } + } + + #[inline] + fn fold_super(&mut self, node: Super) -> Super { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_super(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_super(visitor, node), + } + } + + #[inline] + fn fold_super_prop(&mut self, node: SuperProp<'a>) -> SuperProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_super_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_super_prop(visitor, node), + } + } + + #[inline] + fn fold_super_prop_expr(&mut self, node: SuperPropExpr<'a>) -> SuperPropExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_super_prop_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_super_prop_expr(visitor, node), + } + } + + #[inline] + fn fold_switch_case(&mut self, node: SwitchCase<'a>) -> SwitchCase<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_switch_case(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_switch_case(visitor, node), + } + } + + #[inline] + fn fold_switch_cases(&mut self, node: Vec<'a, SwitchCase<'a>>) -> Vec<'a, SwitchCase<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_switch_cases(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_switch_cases(visitor, node), + } + } + + #[inline] + fn fold_switch_stmt(&mut self, node: SwitchStmt<'a>) -> SwitchStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_switch_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_switch_stmt(visitor, node), + } + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + ) -> swc_common::SyntaxContext { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_syntax_context(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_syntax_context(visitor, node), + } + } + + #[inline] + fn fold_tagged_tpl(&mut self, node: TaggedTpl<'a>) -> TaggedTpl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_tagged_tpl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_tagged_tpl(visitor, node), + } + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_this_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_this_expr(visitor, node), + } + } + + #[inline] + fn fold_throw_stmt(&mut self, node: ThrowStmt<'a>) -> ThrowStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_throw_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_throw_stmt(visitor, node), + } + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>) -> Tpl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_tpl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_tpl(visitor, node), + } + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_tpl_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_tpl_element(visitor, node), + } + } + + #[inline] + fn fold_tpl_elements(&mut self, node: Vec<'a, TplElement>) -> Vec<'a, TplElement> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_tpl_elements(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_tpl_elements(visitor, node), + } + } + + #[inline] + fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_true_plus_minus(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_true_plus_minus(visitor, node), + } + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>) -> TryStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_try_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_try_stmt(visitor, node), + } + } + + #[inline] + fn fold_ts_array_type(&mut self, node: TsArrayType<'a>) -> TsArrayType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_array_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_array_type(visitor, node), + } + } + + #[inline] + fn fold_ts_as_expr(&mut self, node: TsAsExpr<'a>) -> TsAsExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_as_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_as_expr(visitor, node), + } + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + ) -> TsCallSignatureDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_call_signature_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_call_signature_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_conditional_type(&mut self, node: TsConditionalType<'a>) -> TsConditionalType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_conditional_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_conditional_type(visitor, node), + } + } + + #[inline] + fn fold_ts_const_assertion(&mut self, node: TsConstAssertion<'a>) -> TsConstAssertion<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_const_assertion(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_const_assertion(visitor, node), + } + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + ) -> TsConstructSignatureDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + Fold::fold_ts_construct_signature_decl(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Fold::fold_ts_construct_signature_decl(visitor, node) + } + } + } + + #[inline] + fn fold_ts_constructor_type(&mut self, node: TsConstructorType<'a>) -> TsConstructorType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_constructor_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_constructor_type(visitor, node), + } + } + + #[inline] + fn fold_ts_entity_name(&mut self, node: TsEntityName<'a>) -> TsEntityName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_entity_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_entity_name(visitor, node), + } + } + + #[inline] + fn fold_ts_enum_decl(&mut self, node: TsEnumDecl<'a>) -> TsEnumDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_enum_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_enum_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_enum_member(&mut self, node: TsEnumMember<'a>) -> TsEnumMember<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_enum_member(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_enum_member(visitor, node), + } + } + + #[inline] + fn fold_ts_enum_member_id(&mut self, node: TsEnumMemberId<'a>) -> TsEnumMemberId<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_enum_member_id(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_enum_member_id(visitor, node), + } + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + ) -> Vec<'a, TsEnumMember<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_enum_members(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_enum_members(visitor, node), + } + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + ) -> TsExportAssignment<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_export_assignment(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_export_assignment(visitor, node), + } + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + ) -> TsExprWithTypeArgs<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_expr_with_type_args(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_expr_with_type_args(visitor, node), + } + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_expr_with_type_argss(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_expr_with_type_argss(visitor, node), + } + } + + #[inline] + fn fold_ts_external_module_ref(&mut self, node: TsExternalModuleRef) -> TsExternalModuleRef { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_external_module_ref(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_external_module_ref(visitor, node), + } + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + ) -> TsFnOrConstructorType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_fn_or_constructor_type(visitor, node), + swc_visit::Either::Right(visitor) => { + Fold::fold_ts_fn_or_constructor_type(visitor, node) + } + } + } + + #[inline] + fn fold_ts_fn_param(&mut self, node: TsFnParam<'a>) -> TsFnParam<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_fn_param(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_fn_param(visitor, node), + } + } + + #[inline] + fn fold_ts_fn_params(&mut self, node: Vec<'a, TsFnParam<'a>>) -> Vec<'a, TsFnParam<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_fn_params(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_fn_params(visitor, node), + } + } + + #[inline] + fn fold_ts_fn_type(&mut self, node: TsFnType<'a>) -> TsFnType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_fn_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_fn_type(visitor, node), + } + } + + #[inline] + fn fold_ts_getter_signature(&mut self, node: TsGetterSignature<'a>) -> TsGetterSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_getter_signature(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_getter_signature(visitor, node), + } + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + ) -> TsImportEqualsDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_import_equals_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_import_equals_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_import_type(&mut self, node: TsImportType<'a>) -> TsImportType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_import_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_import_type(visitor, node), + } + } + + #[inline] + fn fold_ts_index_signature(&mut self, node: TsIndexSignature<'a>) -> TsIndexSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_index_signature(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_index_signature(visitor, node), + } + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + ) -> TsIndexedAccessType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_indexed_access_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_indexed_access_type(visitor, node), + } + } + + #[inline] + fn fold_ts_infer_type(&mut self, node: TsInferType<'a>) -> TsInferType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_infer_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_infer_type(visitor, node), + } + } + + #[inline] + fn fold_ts_instantiation(&mut self, node: TsInstantiation<'a>) -> TsInstantiation<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_instantiation(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_instantiation(visitor, node), + } + } + + #[inline] + fn fold_ts_interface_body(&mut self, node: TsInterfaceBody<'a>) -> TsInterfaceBody<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_interface_body(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_interface_body(visitor, node), + } + } + + #[inline] + fn fold_ts_interface_decl(&mut self, node: TsInterfaceDecl<'a>) -> TsInterfaceDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_interface_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_interface_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + ) -> TsIntersectionType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_intersection_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_intersection_type(visitor, node), + } + } + + #[inline] + fn fold_ts_keyword_type(&mut self, node: TsKeywordType) -> TsKeywordType { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_keyword_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_keyword_type(visitor, node), + } + } + + #[inline] + fn fold_ts_keyword_type_kind(&mut self, node: TsKeywordTypeKind) -> TsKeywordTypeKind { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_keyword_type_kind(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_keyword_type_kind(visitor, node), + } + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>) -> TsLit<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_lit(visitor, node), + } + } + + #[inline] + fn fold_ts_lit_type(&mut self, node: TsLitType<'a>) -> TsLitType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_lit_type(visitor, node), + } + } + + #[inline] + fn fold_ts_mapped_type(&mut self, node: TsMappedType<'a>) -> TsMappedType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_mapped_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_mapped_type(visitor, node), + } + } + + #[inline] + fn fold_ts_method_signature(&mut self, node: TsMethodSignature<'a>) -> TsMethodSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_method_signature(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_method_signature(visitor, node), + } + } + + #[inline] + fn fold_ts_module_block(&mut self, node: TsModuleBlock<'a>) -> TsModuleBlock<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_module_block(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_module_block(visitor, node), + } + } + + #[inline] + fn fold_ts_module_decl(&mut self, node: TsModuleDecl<'a>) -> TsModuleDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_module_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_module_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_module_name(&mut self, node: TsModuleName<'a>) -> TsModuleName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_module_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_module_name(visitor, node), + } + } + + #[inline] + fn fold_ts_module_ref(&mut self, node: TsModuleRef<'a>) -> TsModuleRef<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_module_ref(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_module_ref(visitor, node), + } + } + + #[inline] + fn fold_ts_namespace_body(&mut self, node: TsNamespaceBody<'a>) -> TsNamespaceBody<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_namespace_body(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_namespace_body(visitor, node), + } + } + + #[inline] + fn fold_ts_namespace_decl(&mut self, node: TsNamespaceDecl<'a>) -> TsNamespaceDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_namespace_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_namespace_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + ) -> TsNamespaceExportDecl { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_namespace_export_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_namespace_export_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_non_null_expr(&mut self, node: TsNonNullExpr<'a>) -> TsNonNullExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_non_null_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_non_null_expr(visitor, node), + } + } + + #[inline] + fn fold_ts_optional_type(&mut self, node: TsOptionalType<'a>) -> TsOptionalType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_optional_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_optional_type(visitor, node), + } + } + + #[inline] + fn fold_ts_param_prop(&mut self, node: TsParamProp<'a>) -> TsParamProp<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_param_prop(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_param_prop(visitor, node), + } + } + + #[inline] + fn fold_ts_param_prop_param(&mut self, node: TsParamPropParam<'a>) -> TsParamPropParam<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_param_prop_param(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_param_prop_param(visitor, node), + } + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + ) -> TsParenthesizedType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_parenthesized_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_parenthesized_type(visitor, node), + } + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + ) -> TsPropertySignature<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_property_signature(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_property_signature(visitor, node), + } + } + + #[inline] + fn fold_ts_qualified_name(&mut self, node: TsQualifiedName<'a>) -> TsQualifiedName<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_qualified_name(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_qualified_name(visitor, node), + } + } + + #[inline] + fn fold_ts_rest_type(&mut self, node: TsRestType<'a>) -> TsRestType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_rest_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_rest_type(visitor, node), + } + } + + #[inline] + fn fold_ts_satisfies_expr(&mut self, node: TsSatisfiesExpr<'a>) -> TsSatisfiesExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_satisfies_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_satisfies_expr(visitor, node), + } + } + + #[inline] + fn fold_ts_setter_signature(&mut self, node: TsSetterSignature<'a>) -> TsSetterSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_setter_signature(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_setter_signature(visitor, node), + } + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType) -> TsThisType { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_this_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_this_type(visitor, node), + } + } + + #[inline] + fn fold_ts_this_type_or_ident(&mut self, node: TsThisTypeOrIdent<'a>) -> TsThisTypeOrIdent<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_this_type_or_ident(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_this_type_or_ident(visitor, node), + } + } + + #[inline] + fn fold_ts_tpl_lit_type(&mut self, node: TsTplLitType<'a>) -> TsTplLitType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_tpl_lit_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_tpl_lit_type(visitor, node), + } + } + + #[inline] + fn fold_ts_tuple_element(&mut self, node: TsTupleElement<'a>) -> TsTupleElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_tuple_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_tuple_element(visitor, node), + } + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + ) -> Vec<'a, TsTupleElement<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_tuple_elements(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_tuple_elements(visitor, node), + } + } + + #[inline] + fn fold_ts_tuple_type(&mut self, node: TsTupleType<'a>) -> TsTupleType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_tuple_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_tuple_type(visitor, node), + } + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>) -> TsType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type(visitor, node), + } + } + + #[inline] + fn fold_ts_type_alias_decl(&mut self, node: TsTypeAliasDecl<'a>) -> TsTypeAliasDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_alias_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_alias_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_type_ann(&mut self, node: TsTypeAnn<'a>) -> TsTypeAnn<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_ann(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_ann(visitor, node), + } + } + + #[inline] + fn fold_ts_type_assertion(&mut self, node: TsTypeAssertion<'a>) -> TsTypeAssertion<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_assertion(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_assertion(visitor, node), + } + } + + #[inline] + fn fold_ts_type_element(&mut self, node: TsTypeElement<'a>) -> TsTypeElement<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_element(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_element(visitor, node), + } + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + ) -> Vec<'a, TsTypeElement<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_elements(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_elements(visitor, node), + } + } + + #[inline] + fn fold_ts_type_lit(&mut self, node: TsTypeLit<'a>) -> TsTypeLit<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_lit(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_lit(visitor, node), + } + } + + #[inline] + fn fold_ts_type_operator(&mut self, node: TsTypeOperator<'a>) -> TsTypeOperator<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_operator(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_operator(visitor, node), + } + } + + #[inline] + fn fold_ts_type_operator_op(&mut self, node: TsTypeOperatorOp) -> TsTypeOperatorOp { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_operator_op(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_operator_op(visitor, node), + } + } + + #[inline] + fn fold_ts_type_param(&mut self, node: TsTypeParam<'a>) -> TsTypeParam<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_param(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_param(visitor, node), + } + } + + #[inline] + fn fold_ts_type_param_decl(&mut self, node: TsTypeParamDecl<'a>) -> TsTypeParamDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_param_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_param_decl(visitor, node), + } + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + ) -> TsTypeParamInstantiation<'a> { + match self { + swc_visit::Either::Left(visitor) => { + Fold::fold_ts_type_param_instantiation(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Fold::fold_ts_type_param_instantiation(visitor, node) + } + } + } + + #[inline] + fn fold_ts_type_params(&mut self, node: Vec<'a, TsTypeParam<'a>>) -> Vec<'a, TsTypeParam<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_params(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_params(visitor, node), + } + } + + #[inline] + fn fold_ts_type_predicate(&mut self, node: TsTypePredicate<'a>) -> TsTypePredicate<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_predicate(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_predicate(visitor, node), + } + } + + #[inline] + fn fold_ts_type_query(&mut self, node: TsTypeQuery<'a>) -> TsTypeQuery<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_query(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_query(visitor, node), + } + } + + #[inline] + fn fold_ts_type_query_expr(&mut self, node: TsTypeQueryExpr<'a>) -> TsTypeQueryExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_query_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_query_expr(visitor, node), + } + } + + #[inline] + fn fold_ts_type_ref(&mut self, node: TsTypeRef<'a>) -> TsTypeRef<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_type_ref(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_type_ref(visitor, node), + } + } + + #[inline] + fn fold_ts_types(&mut self, node: Vec<'a, TsType<'a>>) -> Vec<'a, TsType<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_types(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_types(visitor, node), + } + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + ) -> TsUnionOrIntersectionType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + Fold::fold_ts_union_or_intersection_type(visitor, node) + } + swc_visit::Either::Right(visitor) => { + Fold::fold_ts_union_or_intersection_type(visitor, node) + } + } + } + + #[inline] + fn fold_ts_union_type(&mut self, node: TsUnionType<'a>) -> TsUnionType<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_ts_union_type(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_ts_union_type(visitor, node), + } + } + + #[inline] + fn fold_unary_expr(&mut self, node: UnaryExpr<'a>) -> UnaryExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_unary_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_unary_expr(visitor, node), + } + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_unary_op(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_unary_op(visitor, node), + } + } + + #[inline] + fn fold_update_expr(&mut self, node: UpdateExpr<'a>) -> UpdateExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_update_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_update_expr(visitor, node), + } + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_update_op(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_update_op(visitor, node), + } + } + + #[inline] + fn fold_using_decl(&mut self, node: UsingDecl<'a>) -> UsingDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_using_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_using_decl(visitor, node), + } + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>) -> VarDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_var_decl(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_var_decl(visitor, node), + } + } + + #[inline] + fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_var_decl_kind(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_var_decl_kind(visitor, node), + } + } + + #[inline] + fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr<'a>) -> VarDeclOrExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_var_decl_or_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_var_decl_or_expr(visitor, node), + } + } + + #[inline] + fn fold_var_declarator(&mut self, node: VarDeclarator<'a>) -> VarDeclarator<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_var_declarator(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_var_declarator(visitor, node), + } + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + ) -> Vec<'a, VarDeclarator<'a>> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_var_declarators(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_var_declarators(visitor, node), + } + } + + #[inline] + fn fold_while_stmt(&mut self, node: WhileStmt<'a>) -> WhileStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_while_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_while_stmt(visitor, node), + } + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>) -> WithStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_with_stmt(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_with_stmt(visitor, node), + } + } + + #[inline] + fn fold_yield_expr(&mut self, node: YieldExpr<'a>) -> YieldExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => Fold::fold_yield_expr(visitor, node), + swc_visit::Either::Right(visitor) => Fold::fold_yield_expr(visitor, node), + } + } +} +impl<'a, V> Fold<'a> for ::swc_visit::Optional +where + V: Fold<'a>, +{ + #[inline] + fn fold_accessibility(&mut self, node: Accessibility) -> Accessibility { + if self.enabled { + ::fold_accessibility(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>) -> ArrayLit<'a> { + if self.enabled { + ::fold_array_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>) -> ArrayPat<'a> { + if self.enabled { + ::fold_array_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_arrow_expr(&mut self, node: ArrowExpr<'a>) -> ArrowExpr<'a> { + if self.enabled { + ::fold_arrow_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_expr(&mut self, node: AssignExpr<'a>) -> AssignExpr<'a> { + if self.enabled { + ::fold_assign_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp) -> AssignOp { + if self.enabled { + ::fold_assign_op(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_pat(&mut self, node: AssignPat<'a>) -> AssignPat<'a> { + if self.enabled { + ::fold_assign_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_pat_prop(&mut self, node: AssignPatProp<'a>) -> AssignPatProp<'a> { + if self.enabled { + ::fold_assign_pat_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_prop(&mut self, node: AssignProp<'a>) -> AssignProp<'a> { + if self.enabled { + ::fold_assign_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_target(&mut self, node: AssignTarget<'a>) -> AssignTarget<'a> { + if self.enabled { + ::fold_assign_target(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_assign_target_pat(&mut self, node: AssignTargetPat<'a>) -> AssignTargetPat<'a> { + if self.enabled { + ::fold_assign_target_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_atom(&mut self, node: swc_atoms::Atom) -> swc_atoms::Atom { + if self.enabled { + ::fold_atom(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_auto_accessor(&mut self, node: AutoAccessor<'a>) -> AutoAccessor<'a> { + if self.enabled { + ::fold_auto_accessor(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_await_expr(&mut self, node: AwaitExpr<'a>) -> AwaitExpr<'a> { + if self.enabled { + ::fold_await_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>) -> BigInt<'a> { + if self.enabled { + ::fold_big_int(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_big_int_value(&mut self, node: BigIntValue) -> BigIntValue { + if self.enabled { + ::fold_big_int_value(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>) -> BinExpr<'a> { + if self.enabled { + ::fold_bin_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp) -> BinaryOp { + if self.enabled { + ::fold_binary_op(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_binding_ident(&mut self, node: BindingIdent<'a>) -> BindingIdent<'a> { + if self.enabled { + ::fold_binding_ident(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_block_stmt(&mut self, node: BlockStmt<'a>) -> BlockStmt<'a> { + if self.enabled { + ::fold_block_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_block_stmt_or_expr(&mut self, node: BlockStmtOrExpr<'a>) -> BlockStmtOrExpr<'a> { + if self.enabled { + ::fold_block_stmt_or_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_bool(&mut self, node: Bool) -> Bool { + if self.enabled { + ::fold_bool(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt) -> BreakStmt { + if self.enabled { + ::fold_break_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>) -> CallExpr<'a> { + if self.enabled { + ::fold_call_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>) -> Callee<'a> { + if self.enabled { + ::fold_callee(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_catch_clause(&mut self, node: CatchClause<'a>) -> CatchClause<'a> { + if self.enabled { + ::fold_catch_clause(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>) -> Class<'a> { + if self.enabled { + ::fold_class(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_decl(&mut self, node: ClassDecl<'a>) -> ClassDecl<'a> { + if self.enabled { + ::fold_class_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_expr(&mut self, node: ClassExpr<'a>) -> ClassExpr<'a> { + if self.enabled { + ::fold_class_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_member(&mut self, node: ClassMember<'a>) -> ClassMember<'a> { + if self.enabled { + ::fold_class_member(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_members(&mut self, node: Vec<'a, ClassMember<'a>>) -> Vec<'a, ClassMember<'a>> { + if self.enabled { + ::fold_class_members(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_method(&mut self, node: ClassMethod<'a>) -> ClassMethod<'a> { + if self.enabled { + ::fold_class_method(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_class_prop(&mut self, node: ClassProp<'a>) -> ClassProp<'a> { + if self.enabled { + ::fold_class_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_computed_prop_name(&mut self, node: ComputedPropName<'a>) -> ComputedPropName<'a> { + if self.enabled { + ::fold_computed_prop_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>) -> CondExpr<'a> { + if self.enabled { + ::fold_cond_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_constructor(&mut self, node: Constructor<'a>) -> Constructor<'a> { + if self.enabled { + ::fold_constructor(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_continue_stmt(&mut self, node: ContinueStmt) -> ContinueStmt { + if self.enabled { + ::fold_continue_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_debugger_stmt(&mut self, node: DebuggerStmt) -> DebuggerStmt { + if self.enabled { + ::fold_debugger_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>) -> Decl<'a> { + if self.enabled { + ::fold_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_decorator(&mut self, node: Decorator<'a>) -> Decorator<'a> { + if self.enabled { + ::fold_decorator(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_decorators(&mut self, node: Vec<'a, Decorator<'a>>) -> Vec<'a, Decorator<'a>> { + if self.enabled { + ::fold_decorators(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_default_decl(&mut self, node: DefaultDecl<'a>) -> DefaultDecl<'a> { + if self.enabled { + ::fold_default_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_do_while_stmt(&mut self, node: DoWhileStmt<'a>) -> DoWhileStmt<'a> { + if self.enabled { + ::fold_do_while_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt) -> EmptyStmt { + if self.enabled { + ::fold_empty_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_all(&mut self, node: ExportAll<'a>) -> ExportAll<'a> { + if self.enabled { + ::fold_export_all(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_decl(&mut self, node: ExportDecl<'a>) -> ExportDecl<'a> { + if self.enabled { + ::fold_export_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_default_decl(&mut self, node: ExportDefaultDecl<'a>) -> ExportDefaultDecl<'a> { + if self.enabled { + ::fold_export_default_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_default_expr(&mut self, node: ExportDefaultExpr<'a>) -> ExportDefaultExpr<'a> { + if self.enabled { + ::fold_export_default_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + ) -> ExportDefaultSpecifier { + if self.enabled { + ::fold_export_default_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + ) -> ExportNamedSpecifier<'a> { + if self.enabled { + ::fold_export_named_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + ) -> ExportNamespaceSpecifier<'a> { + if self.enabled { + ::fold_export_namespace_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_specifier(&mut self, node: ExportSpecifier<'a>) -> ExportSpecifier<'a> { + if self.enabled { + ::fold_export_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + ) -> Vec<'a, ExportSpecifier<'a>> { + if self.enabled { + ::fold_export_specifiers(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>) -> Expr<'a> { + if self.enabled { + ::fold_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_expr_or_spread(&mut self, node: ExprOrSpread<'a>) -> ExprOrSpread<'a> { + if self.enabled { + ::fold_expr_or_spread(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + ) -> Vec<'a, ExprOrSpread<'a>> { + if self.enabled { + ::fold_expr_or_spreads(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>) -> ExprStmt<'a> { + if self.enabled { + ::fold_expr_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_exprs(&mut self, node: Vec<'a, Expr<'a>>) -> Vec<'a, Expr<'a>> { + if self.enabled { + ::fold_exprs(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>) -> FnDecl<'a> { + if self.enabled { + ::fold_fn_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>) -> FnExpr<'a> { + if self.enabled { + ::fold_fn_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>) -> ForHead<'a> { + if self.enabled { + ::fold_for_head(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_for_in_stmt(&mut self, node: ForInStmt<'a>) -> ForInStmt<'a> { + if self.enabled { + ::fold_for_in_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_for_of_stmt(&mut self, node: ForOfStmt<'a>) -> ForOfStmt<'a> { + if self.enabled { + ::fold_for_of_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>) -> ForStmt<'a> { + if self.enabled { + ::fold_for_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>) -> Function<'a> { + if self.enabled { + ::fold_function(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_getter_prop(&mut self, node: GetterProp<'a>) -> GetterProp<'a> { + if self.enabled { + ::fold_getter_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ident(&mut self, node: Ident) -> Ident { + if self.enabled { + ::fold_ident(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName) -> IdentName { + if self.enabled { + ::fold_ident_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>) -> IfStmt<'a> { + if self.enabled { + ::fold_if_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import(&mut self, node: Import) -> Import { + if self.enabled { + ::fold_import(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_decl(&mut self, node: ImportDecl<'a>) -> ImportDecl<'a> { + if self.enabled { + ::fold_import_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + ) -> ImportDefaultSpecifier { + if self.enabled { + ::fold_import_default_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + ) -> ImportNamedSpecifier<'a> { + if self.enabled { + ::fold_import_named_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_phase(&mut self, node: ImportPhase) -> ImportPhase { + if self.enabled { + ::fold_import_phase(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_specifier(&mut self, node: ImportSpecifier<'a>) -> ImportSpecifier<'a> { + if self.enabled { + ::fold_import_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + ) -> Vec<'a, ImportSpecifier<'a>> { + if self.enabled { + ::fold_import_specifiers(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + ) -> ImportStarAsSpecifier { + if self.enabled { + ::fold_import_star_as_specifier(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_with(&mut self, node: ImportWith<'a>) -> ImportWith<'a> { + if self.enabled { + ::fold_import_with(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_with_item(&mut self, node: ImportWithItem) -> ImportWithItem { + if self.enabled { + ::fold_import_with_item(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_import_with_items(&mut self, node: Vec<'a, ImportWithItem>) -> Vec<'a, ImportWithItem> { + if self.enabled { + ::fold_import_with_items(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid) -> Invalid { + if self.enabled { + ::fold_invalid(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>) -> JSXAttr<'a> { + if self.enabled { + ::fold_jsx_attr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_name(&mut self, node: JSXAttrName<'a>) -> JSXAttrName<'a> { + if self.enabled { + ::fold_jsx_attr_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_or_spread(&mut self, node: JSXAttrOrSpread<'a>) -> JSXAttrOrSpread<'a> { + if self.enabled { + ::fold_jsx_attr_or_spread(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + if self.enabled { + ::fold_jsx_attr_or_spreads(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_value(&mut self, node: JSXAttrValue<'a>) -> JSXAttrValue<'a> { + if self.enabled { + ::fold_jsx_attr_value(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_closing_element(&mut self, node: JSXClosingElement<'a>) -> JSXClosingElement<'a> { + if self.enabled { + ::fold_jsx_closing_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_closing_fragment(&mut self, node: JSXClosingFragment) -> JSXClosingFragment { + if self.enabled { + ::fold_jsx_closing_fragment(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_element(&mut self, node: JSXElement<'a>) -> JSXElement<'a> { + if self.enabled { + ::fold_jsx_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_child(&mut self, node: JSXElementChild<'a>) -> JSXElementChild<'a> { + if self.enabled { + ::fold_jsx_element_child(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + ) -> Vec<'a, JSXElementChild<'a>> { + if self.enabled { + ::fold_jsx_element_childs(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_name(&mut self, node: JSXElementName<'a>) -> JSXElementName<'a> { + if self.enabled { + ::fold_jsx_element_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_empty_expr(&mut self, node: JSXEmptyExpr) -> JSXEmptyExpr { + if self.enabled { + ::fold_jsx_empty_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>) -> JSXExpr<'a> { + if self.enabled { + ::fold_jsx_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_expr_container(&mut self, node: JSXExprContainer<'a>) -> JSXExprContainer<'a> { + if self.enabled { + ::fold_jsx_expr_container(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_fragment(&mut self, node: JSXFragment<'a>) -> JSXFragment<'a> { + if self.enabled { + ::fold_jsx_fragment(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_member_expr(&mut self, node: JSXMemberExpr<'a>) -> JSXMemberExpr<'a> { + if self.enabled { + ::fold_jsx_member_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_namespaced_name(&mut self, node: JSXNamespacedName) -> JSXNamespacedName { + if self.enabled { + ::fold_jsx_namespaced_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_object(&mut self, node: JSXObject<'a>) -> JSXObject<'a> { + if self.enabled { + ::fold_jsx_object(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement<'a>) -> JSXOpeningElement<'a> { + if self.enabled { + ::fold_jsx_opening_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_opening_fragment(&mut self, node: JSXOpeningFragment) -> JSXOpeningFragment { + if self.enabled { + ::fold_jsx_opening_fragment(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_spread_child(&mut self, node: JSXSpreadChild<'a>) -> JSXSpreadChild<'a> { + if self.enabled { + ::fold_jsx_spread_child(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText) -> JSXText { + if self.enabled { + ::fold_jsx_text(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>) -> Key<'a> { + if self.enabled { + ::fold_key(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_key_value_pat_prop(&mut self, node: KeyValuePatProp<'a>) -> KeyValuePatProp<'a> { + if self.enabled { + ::fold_key_value_pat_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_key_value_prop(&mut self, node: KeyValueProp<'a>) -> KeyValueProp<'a> { + if self.enabled { + ::fold_key_value_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_labeled_stmt(&mut self, node: LabeledStmt<'a>) -> LabeledStmt<'a> { + if self.enabled { + ::fold_labeled_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>) -> Lit<'a> { + if self.enabled { + ::fold_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_member_expr(&mut self, node: MemberExpr<'a>) -> MemberExpr<'a> { + if self.enabled { + ::fold_member_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_member_prop(&mut self, node: MemberProp<'a>) -> MemberProp<'a> { + if self.enabled { + ::fold_member_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_meta_prop_expr(&mut self, node: MetaPropExpr) -> MetaPropExpr { + if self.enabled { + ::fold_meta_prop_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_meta_prop_kind(&mut self, node: MetaPropKind) -> MetaPropKind { + if self.enabled { + ::fold_meta_prop_kind(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind) -> MethodKind { + if self.enabled { + ::fold_method_kind(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_method_prop(&mut self, node: MethodProp<'a>) -> MethodProp<'a> { + if self.enabled { + ::fold_method_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + if self.enabled { + ::fold_module(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_module_decl(&mut self, node: ModuleDecl<'a>) -> ModuleDecl<'a> { + if self.enabled { + ::fold_module_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_module_export_name(&mut self, node: ModuleExportName<'a>) -> ModuleExportName<'a> { + if self.enabled { + ::fold_module_export_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_module_item(&mut self, node: ModuleItem<'a>) -> ModuleItem<'a> { + if self.enabled { + ::fold_module_item(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_module_items(&mut self, node: Vec<'a, ModuleItem<'a>>) -> Vec<'a, ModuleItem<'a>> { + if self.enabled { + ::fold_module_items(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_named_export(&mut self, node: NamedExport<'a>) -> NamedExport<'a> { + if self.enabled { + ::fold_named_export(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>) -> NewExpr<'a> { + if self.enabled { + ::fold_new_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_null(&mut self, node: Null) -> Null { + if self.enabled { + ::fold_null(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_number(&mut self, node: Number) -> Number { + if self.enabled { + ::fold_number(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_object_lit(&mut self, node: ObjectLit<'a>) -> ObjectLit<'a> { + if self.enabled { + ::fold_object_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_object_pat(&mut self, node: ObjectPat<'a>) -> ObjectPat<'a> { + if self.enabled { + ::fold_object_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_object_pat_prop(&mut self, node: ObjectPatProp<'a>) -> ObjectPatProp<'a> { + if self.enabled { + ::fold_object_pat_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + ) -> Vec<'a, ObjectPatProp<'a>> { + if self.enabled { + ::fold_object_pat_props(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_accessibility(&mut self, node: Option) -> Option { + if self.enabled { + ::fold_opt_accessibility(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_atom(&mut self, node: Option) -> Option { + if self.enabled { + ::fold_opt_atom(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_block_stmt(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_block_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>) -> OptCall<'a> { + if self.enabled { + ::fold_opt_call(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_catch_clause(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_catch_clause(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_chain_base(&mut self, node: OptChainBase<'a>) -> OptChainBase<'a> { + if self.enabled { + ::fold_opt_chain_base(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_chain_expr(&mut self, node: OptChainExpr<'a>) -> OptChainExpr<'a> { + if self.enabled { + ::fold_opt_chain_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_expr(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_expr_or_spread(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + ) -> Option>> { + if self.enabled { + ::fold_opt_expr_or_spreads(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ident(&mut self, node: Option) -> Option { + if self.enabled { + ::fold_opt_ident(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_jsx_attr_value(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_jsx_closing_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_module_export_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + ) -> Option>> { + if self.enabled { + ::fold_opt_object_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_pat(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_span(&mut self, node: Option) -> Option { + if self.enabled { + ::fold_opt_span(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_stmt(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_str(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_str(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_true_plus_minus(&mut self, node: Option) -> Option { + if self.enabled { + ::fold_opt_true_plus_minus(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_ts_entity_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_ts_namespace_body(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type(&mut self, node: Option>) -> Option> { + if self.enabled { + ::fold_opt_ts_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_ann(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_param_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_param_instantiation(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + ) -> Option> { + if self.enabled { + ::fold_opt_var_decl_or_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + ) -> Vec<'a, Option>> { + if self.enabled { + ::fold_opt_vec_expr_or_spreads(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_opt_vec_pats(&mut self, node: Vec<'a, Option>>) -> Vec<'a, Option>> { + if self.enabled { + ::fold_opt_vec_pats(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>) -> Param<'a> { + if self.enabled { + ::fold_param(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + ) -> ParamOrTsParamProp<'a> { + if self.enabled { + ::fold_param_or_ts_param_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + if self.enabled { + ::fold_param_or_ts_param_props(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_params(&mut self, node: Vec<'a, Param<'a>>) -> Vec<'a, Param<'a>> { + if self.enabled { + ::fold_params(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_paren_expr(&mut self, node: ParenExpr<'a>) -> ParenExpr<'a> { + if self.enabled { + ::fold_paren_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>) -> Pat<'a> { + if self.enabled { + ::fold_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_pats(&mut self, node: Vec<'a, Pat<'a>>) -> Vec<'a, Pat<'a>> { + if self.enabled { + ::fold_pats(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_private_method(&mut self, node: PrivateMethod<'a>) -> PrivateMethod<'a> { + if self.enabled { + ::fold_private_method(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_private_name(&mut self, node: PrivateName) -> PrivateName { + if self.enabled { + ::fold_private_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_private_prop(&mut self, node: PrivateProp<'a>) -> PrivateProp<'a> { + if self.enabled { + ::fold_private_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + if self.enabled { + ::fold_program(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>) -> Prop<'a> { + if self.enabled { + ::fold_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>) -> PropName<'a> { + if self.enabled { + ::fold_prop_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_prop_or_spread(&mut self, node: PropOrSpread<'a>) -> PropOrSpread<'a> { + if self.enabled { + ::fold_prop_or_spread(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + ) -> Vec<'a, PropOrSpread<'a>> { + if self.enabled { + ::fold_prop_or_spreads(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_regex(&mut self, node: Regex) -> Regex { + if self.enabled { + ::fold_regex(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>) -> RestPat<'a> { + if self.enabled { + ::fold_rest_pat(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_return_stmt(&mut self, node: ReturnStmt<'a>) -> ReturnStmt<'a> { + if self.enabled { + ::fold_return_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + if self.enabled { + ::fold_script(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>) -> SeqExpr<'a> { + if self.enabled { + ::fold_seq_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_setter_prop(&mut self, node: SetterProp<'a>) -> SetterProp<'a> { + if self.enabled { + ::fold_setter_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + ) -> SimpleAssignTarget<'a> { + if self.enabled { + ::fold_simple_assign_target(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_span(&mut self, node: swc_common::Span) -> swc_common::Span { + if self.enabled { + ::fold_span(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_spread_element(&mut self, node: SpreadElement<'a>) -> SpreadElement<'a> { + if self.enabled { + ::fold_spread_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_static_block(&mut self, node: StaticBlock<'a>) -> StaticBlock<'a> { + if self.enabled { + ::fold_static_block(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + if self.enabled { + ::fold_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_stmts(&mut self, node: Vec<'a, Stmt<'a>>) -> Vec<'a, Stmt<'a>> { + if self.enabled { + ::fold_stmts(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_str(&mut self, node: Str) -> Str { + if self.enabled { + ::fold_str(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_super(&mut self, node: Super) -> Super { + if self.enabled { + ::fold_super(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_super_prop(&mut self, node: SuperProp<'a>) -> SuperProp<'a> { + if self.enabled { + ::fold_super_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_super_prop_expr(&mut self, node: SuperPropExpr<'a>) -> SuperPropExpr<'a> { + if self.enabled { + ::fold_super_prop_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_switch_case(&mut self, node: SwitchCase<'a>) -> SwitchCase<'a> { + if self.enabled { + ::fold_switch_case(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_switch_cases(&mut self, node: Vec<'a, SwitchCase<'a>>) -> Vec<'a, SwitchCase<'a>> { + if self.enabled { + ::fold_switch_cases(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_switch_stmt(&mut self, node: SwitchStmt<'a>) -> SwitchStmt<'a> { + if self.enabled { + ::fold_switch_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + ) -> swc_common::SyntaxContext { + if self.enabled { + ::fold_syntax_context(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_tagged_tpl(&mut self, node: TaggedTpl<'a>) -> TaggedTpl<'a> { + if self.enabled { + ::fold_tagged_tpl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr) -> ThisExpr { + if self.enabled { + ::fold_this_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_throw_stmt(&mut self, node: ThrowStmt<'a>) -> ThrowStmt<'a> { + if self.enabled { + ::fold_throw_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>) -> Tpl<'a> { + if self.enabled { + ::fold_tpl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement) -> TplElement { + if self.enabled { + ::fold_tpl_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_tpl_elements(&mut self, node: Vec<'a, TplElement>) -> Vec<'a, TplElement> { + if self.enabled { + ::fold_tpl_elements(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_true_plus_minus(&mut self, node: TruePlusMinus) -> TruePlusMinus { + if self.enabled { + ::fold_true_plus_minus(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>) -> TryStmt<'a> { + if self.enabled { + ::fold_try_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_array_type(&mut self, node: TsArrayType<'a>) -> TsArrayType<'a> { + if self.enabled { + ::fold_ts_array_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_as_expr(&mut self, node: TsAsExpr<'a>) -> TsAsExpr<'a> { + if self.enabled { + ::fold_ts_as_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + ) -> TsCallSignatureDecl<'a> { + if self.enabled { + ::fold_ts_call_signature_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_conditional_type(&mut self, node: TsConditionalType<'a>) -> TsConditionalType<'a> { + if self.enabled { + ::fold_ts_conditional_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_const_assertion(&mut self, node: TsConstAssertion<'a>) -> TsConstAssertion<'a> { + if self.enabled { + ::fold_ts_const_assertion(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + ) -> TsConstructSignatureDecl<'a> { + if self.enabled { + ::fold_ts_construct_signature_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_constructor_type(&mut self, node: TsConstructorType<'a>) -> TsConstructorType<'a> { + if self.enabled { + ::fold_ts_constructor_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_entity_name(&mut self, node: TsEntityName<'a>) -> TsEntityName<'a> { + if self.enabled { + ::fold_ts_entity_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_decl(&mut self, node: TsEnumDecl<'a>) -> TsEnumDecl<'a> { + if self.enabled { + ::fold_ts_enum_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_member(&mut self, node: TsEnumMember<'a>) -> TsEnumMember<'a> { + if self.enabled { + ::fold_ts_enum_member(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_member_id(&mut self, node: TsEnumMemberId<'a>) -> TsEnumMemberId<'a> { + if self.enabled { + ::fold_ts_enum_member_id(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + ) -> Vec<'a, TsEnumMember<'a>> { + if self.enabled { + ::fold_ts_enum_members(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + ) -> TsExportAssignment<'a> { + if self.enabled { + ::fold_ts_export_assignment(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + ) -> TsExprWithTypeArgs<'a> { + if self.enabled { + ::fold_ts_expr_with_type_args(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + if self.enabled { + ::fold_ts_expr_with_type_argss(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_external_module_ref(&mut self, node: TsExternalModuleRef) -> TsExternalModuleRef { + if self.enabled { + ::fold_ts_external_module_ref(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + ) -> TsFnOrConstructorType<'a> { + if self.enabled { + ::fold_ts_fn_or_constructor_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_param(&mut self, node: TsFnParam<'a>) -> TsFnParam<'a> { + if self.enabled { + ::fold_ts_fn_param(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_params(&mut self, node: Vec<'a, TsFnParam<'a>>) -> Vec<'a, TsFnParam<'a>> { + if self.enabled { + ::fold_ts_fn_params(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_type(&mut self, node: TsFnType<'a>) -> TsFnType<'a> { + if self.enabled { + ::fold_ts_fn_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_getter_signature(&mut self, node: TsGetterSignature<'a>) -> TsGetterSignature<'a> { + if self.enabled { + ::fold_ts_getter_signature(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + ) -> TsImportEqualsDecl<'a> { + if self.enabled { + ::fold_ts_import_equals_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_import_type(&mut self, node: TsImportType<'a>) -> TsImportType<'a> { + if self.enabled { + ::fold_ts_import_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_index_signature(&mut self, node: TsIndexSignature<'a>) -> TsIndexSignature<'a> { + if self.enabled { + ::fold_ts_index_signature(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + ) -> TsIndexedAccessType<'a> { + if self.enabled { + ::fold_ts_indexed_access_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_infer_type(&mut self, node: TsInferType<'a>) -> TsInferType<'a> { + if self.enabled { + ::fold_ts_infer_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_instantiation(&mut self, node: TsInstantiation<'a>) -> TsInstantiation<'a> { + if self.enabled { + ::fold_ts_instantiation(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_interface_body(&mut self, node: TsInterfaceBody<'a>) -> TsInterfaceBody<'a> { + if self.enabled { + ::fold_ts_interface_body(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_interface_decl(&mut self, node: TsInterfaceDecl<'a>) -> TsInterfaceDecl<'a> { + if self.enabled { + ::fold_ts_interface_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + ) -> TsIntersectionType<'a> { + if self.enabled { + ::fold_ts_intersection_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_keyword_type(&mut self, node: TsKeywordType) -> TsKeywordType { + if self.enabled { + ::fold_ts_keyword_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_keyword_type_kind(&mut self, node: TsKeywordTypeKind) -> TsKeywordTypeKind { + if self.enabled { + ::fold_ts_keyword_type_kind(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>) -> TsLit<'a> { + if self.enabled { + ::fold_ts_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_lit_type(&mut self, node: TsLitType<'a>) -> TsLitType<'a> { + if self.enabled { + ::fold_ts_lit_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_mapped_type(&mut self, node: TsMappedType<'a>) -> TsMappedType<'a> { + if self.enabled { + ::fold_ts_mapped_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_method_signature(&mut self, node: TsMethodSignature<'a>) -> TsMethodSignature<'a> { + if self.enabled { + ::fold_ts_method_signature(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_module_block(&mut self, node: TsModuleBlock<'a>) -> TsModuleBlock<'a> { + if self.enabled { + ::fold_ts_module_block(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_module_decl(&mut self, node: TsModuleDecl<'a>) -> TsModuleDecl<'a> { + if self.enabled { + ::fold_ts_module_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_module_name(&mut self, node: TsModuleName<'a>) -> TsModuleName<'a> { + if self.enabled { + ::fold_ts_module_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_module_ref(&mut self, node: TsModuleRef<'a>) -> TsModuleRef<'a> { + if self.enabled { + ::fold_ts_module_ref(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_body(&mut self, node: TsNamespaceBody<'a>) -> TsNamespaceBody<'a> { + if self.enabled { + ::fold_ts_namespace_body(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_decl(&mut self, node: TsNamespaceDecl<'a>) -> TsNamespaceDecl<'a> { + if self.enabled { + ::fold_ts_namespace_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + ) -> TsNamespaceExportDecl { + if self.enabled { + ::fold_ts_namespace_export_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_non_null_expr(&mut self, node: TsNonNullExpr<'a>) -> TsNonNullExpr<'a> { + if self.enabled { + ::fold_ts_non_null_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_optional_type(&mut self, node: TsOptionalType<'a>) -> TsOptionalType<'a> { + if self.enabled { + ::fold_ts_optional_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_param_prop(&mut self, node: TsParamProp<'a>) -> TsParamProp<'a> { + if self.enabled { + ::fold_ts_param_prop(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_param_prop_param(&mut self, node: TsParamPropParam<'a>) -> TsParamPropParam<'a> { + if self.enabled { + ::fold_ts_param_prop_param(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + ) -> TsParenthesizedType<'a> { + if self.enabled { + ::fold_ts_parenthesized_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + ) -> TsPropertySignature<'a> { + if self.enabled { + ::fold_ts_property_signature(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_qualified_name(&mut self, node: TsQualifiedName<'a>) -> TsQualifiedName<'a> { + if self.enabled { + ::fold_ts_qualified_name(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_rest_type(&mut self, node: TsRestType<'a>) -> TsRestType<'a> { + if self.enabled { + ::fold_ts_rest_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_satisfies_expr(&mut self, node: TsSatisfiesExpr<'a>) -> TsSatisfiesExpr<'a> { + if self.enabled { + ::fold_ts_satisfies_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_setter_signature(&mut self, node: TsSetterSignature<'a>) -> TsSetterSignature<'a> { + if self.enabled { + ::fold_ts_setter_signature(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType) -> TsThisType { + if self.enabled { + ::fold_ts_this_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_this_type_or_ident(&mut self, node: TsThisTypeOrIdent<'a>) -> TsThisTypeOrIdent<'a> { + if self.enabled { + ::fold_ts_this_type_or_ident(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_tpl_lit_type(&mut self, node: TsTplLitType<'a>) -> TsTplLitType<'a> { + if self.enabled { + ::fold_ts_tpl_lit_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_element(&mut self, node: TsTupleElement<'a>) -> TsTupleElement<'a> { + if self.enabled { + ::fold_ts_tuple_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + ) -> Vec<'a, TsTupleElement<'a>> { + if self.enabled { + ::fold_ts_tuple_elements(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_type(&mut self, node: TsTupleType<'a>) -> TsTupleType<'a> { + if self.enabled { + ::fold_ts_tuple_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>) -> TsType<'a> { + if self.enabled { + ::fold_ts_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_alias_decl(&mut self, node: TsTypeAliasDecl<'a>) -> TsTypeAliasDecl<'a> { + if self.enabled { + ::fold_ts_type_alias_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_ann(&mut self, node: TsTypeAnn<'a>) -> TsTypeAnn<'a> { + if self.enabled { + ::fold_ts_type_ann(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_assertion(&mut self, node: TsTypeAssertion<'a>) -> TsTypeAssertion<'a> { + if self.enabled { + ::fold_ts_type_assertion(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_element(&mut self, node: TsTypeElement<'a>) -> TsTypeElement<'a> { + if self.enabled { + ::fold_ts_type_element(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + ) -> Vec<'a, TsTypeElement<'a>> { + if self.enabled { + ::fold_ts_type_elements(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_lit(&mut self, node: TsTypeLit<'a>) -> TsTypeLit<'a> { + if self.enabled { + ::fold_ts_type_lit(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_operator(&mut self, node: TsTypeOperator<'a>) -> TsTypeOperator<'a> { + if self.enabled { + ::fold_ts_type_operator(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_operator_op(&mut self, node: TsTypeOperatorOp) -> TsTypeOperatorOp { + if self.enabled { + ::fold_ts_type_operator_op(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param(&mut self, node: TsTypeParam<'a>) -> TsTypeParam<'a> { + if self.enabled { + ::fold_ts_type_param(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param_decl(&mut self, node: TsTypeParamDecl<'a>) -> TsTypeParamDecl<'a> { + if self.enabled { + ::fold_ts_type_param_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + ) -> TsTypeParamInstantiation<'a> { + if self.enabled { + ::fold_ts_type_param_instantiation(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_params(&mut self, node: Vec<'a, TsTypeParam<'a>>) -> Vec<'a, TsTypeParam<'a>> { + if self.enabled { + ::fold_ts_type_params(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_predicate(&mut self, node: TsTypePredicate<'a>) -> TsTypePredicate<'a> { + if self.enabled { + ::fold_ts_type_predicate(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_query(&mut self, node: TsTypeQuery<'a>) -> TsTypeQuery<'a> { + if self.enabled { + ::fold_ts_type_query(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_query_expr(&mut self, node: TsTypeQueryExpr<'a>) -> TsTypeQueryExpr<'a> { + if self.enabled { + ::fold_ts_type_query_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_type_ref(&mut self, node: TsTypeRef<'a>) -> TsTypeRef<'a> { + if self.enabled { + ::fold_ts_type_ref(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_types(&mut self, node: Vec<'a, TsType<'a>>) -> Vec<'a, TsType<'a>> { + if self.enabled { + ::fold_ts_types(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + ) -> TsUnionOrIntersectionType<'a> { + if self.enabled { + ::fold_ts_union_or_intersection_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_ts_union_type(&mut self, node: TsUnionType<'a>) -> TsUnionType<'a> { + if self.enabled { + ::fold_ts_union_type(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_unary_expr(&mut self, node: UnaryExpr<'a>) -> UnaryExpr<'a> { + if self.enabled { + ::fold_unary_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp) -> UnaryOp { + if self.enabled { + ::fold_unary_op(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_update_expr(&mut self, node: UpdateExpr<'a>) -> UpdateExpr<'a> { + if self.enabled { + ::fold_update_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp) -> UpdateOp { + if self.enabled { + ::fold_update_op(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_using_decl(&mut self, node: UsingDecl<'a>) -> UsingDecl<'a> { + if self.enabled { + ::fold_using_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>) -> VarDecl<'a> { + if self.enabled { + ::fold_var_decl(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_var_decl_kind(&mut self, node: VarDeclKind) -> VarDeclKind { + if self.enabled { + ::fold_var_decl_kind(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_var_decl_or_expr(&mut self, node: VarDeclOrExpr<'a>) -> VarDeclOrExpr<'a> { + if self.enabled { + ::fold_var_decl_or_expr(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_var_declarator(&mut self, node: VarDeclarator<'a>) -> VarDeclarator<'a> { + if self.enabled { + ::fold_var_declarator(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + ) -> Vec<'a, VarDeclarator<'a>> { + if self.enabled { + ::fold_var_declarators(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_while_stmt(&mut self, node: WhileStmt<'a>) -> WhileStmt<'a> { + if self.enabled { + ::fold_while_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>) -> WithStmt<'a> { + if self.enabled { + ::fold_with_stmt(&mut self.visitor, node) + } else { + node + } + } + + #[inline] + fn fold_yield_expr(&mut self, node: YieldExpr<'a>) -> YieldExpr<'a> { + if self.enabled { + ::fold_yield_expr(&mut self.visitor, node) + } else { + node + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +pub trait FoldWith<'a, V: ?Sized + Fold<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn fold_with(self, visitor: &mut V) -> Self; + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn fold_children_with(self, visitor: &mut V) -> Self; +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Accessibility { + #[doc = "Calls [Fold`::fold_accessibility`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_accessibility(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Accessibility::Public => Accessibility::Public, + Accessibility::Protected => Accessibility::Protected, + Accessibility::Private => Accessibility::Private, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ArrayLit<'a> { + #[doc = "Calls [Fold`::fold_array_lit`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_array_lit(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ArrayLit { span, elems } => { + let span = { >::fold_with(span, visitor) }; + let elems = { + >> as FoldWith>::fold_with(elems, visitor) + }; + ArrayLit { span, elems } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ArrayPat<'a> { + #[doc = "Calls [Fold`::fold_array_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_array_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let elems = + { >> as FoldWith>::fold_with(elems, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + ArrayPat { + span, + elems, + optional, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [Fold`::fold_arrow_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_arrow_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let params = { > as FoldWith>::fold_with(params, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let return_type = { + >> as FoldWith>::fold_with(return_type, visitor) + }; + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignExpr<'a> { + #[doc = "Calls [Fold`::fold_assign_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + let span = { >::fold_with(span, visitor) }; + let op = { >::fold_with(op, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { as FoldWith>::fold_with(right, visitor) }; + AssignExpr { + span, + op, + left, + right, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignPat<'a> { + #[doc = "Calls [Fold`::fold_assign_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignPat { span, left, right } => { + let span = { >::fold_with(span, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { as FoldWith>::fold_with(right, visitor) }; + AssignPat { span, left, right } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [Fold`::fold_assign_pat_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_pat_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignPatProp { span, key, value } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let value = { > as FoldWith>::fold_with(value, visitor) }; + AssignPatProp { span, key, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignProp<'a> { + #[doc = "Calls [Fold`::fold_assign_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignProp { span, key, value } => { + let span = { >::fold_with(span, visitor) }; + let key = { >::fold_with(key, visitor) }; + let value = { as FoldWith>::fold_with(value, visitor) }; + AssignProp { span, key, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignTarget<'a> { + #[doc = "Calls [Fold`::fold_assign_target`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_target(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignTarget::Simple { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + AssignTarget::Simple { 0: _field_0 } + } + AssignTarget::Pat { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + AssignTarget::Pat { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [Fold`::fold_assign_target_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_target_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + AssignTargetPat::Array { 0: _field_0 } + } + AssignTargetPat::Object { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + AssignTargetPat::Object { 0: _field_0 } + } + AssignTargetPat::Invalid { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + AssignTargetPat::Invalid { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [Fold`::fold_auto_accessor`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_auto_accessor(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let value = { > as FoldWith>::fold_with(value, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [Fold`::fold_await_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_await_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + AwaitExpr { span, arg } => { + let span = { >::fold_with(span, visitor) }; + let arg = { as FoldWith>::fold_with(arg, visitor) }; + AwaitExpr { span, arg } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BigInt<'a> { + #[doc = "Calls [Fold`::fold_big_int`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_big_int(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BigInt { span, value, raw } => { + let span = { >::fold_with(span, visitor) }; + let value = { as FoldWith>::fold_with(value, visitor) }; + let raw = { as FoldWith>::fold_with(raw, visitor) }; + BigInt { span, value, raw } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BinExpr<'a> { + #[doc = "Calls [Fold`::fold_bin_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_bin_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BinExpr { + span, + op, + left, + right, + } => { + let span = { >::fold_with(span, visitor) }; + let op = { >::fold_with(op, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { as FoldWith>::fold_with(right, visitor) }; + BinExpr { + span, + op, + left, + right, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BindingIdent<'a> { + #[doc = "Calls [Fold`::fold_binding_ident`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_binding_ident(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BindingIdent { id, type_ann } => { + let id = { >::fold_with(id, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + BindingIdent { id, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BlockStmt<'a> { + #[doc = "Calls [Fold`::fold_block_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_block_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BlockStmt { span, ctxt, stmts } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let stmts = { > as FoldWith>::fold_with(stmts, visitor) }; + BlockStmt { span, ctxt, stmts } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [Fold`::fold_block_stmt_or_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_block_stmt_or_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + BlockStmtOrExpr::BlockStmt { 0: _field_0 } + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + BlockStmtOrExpr::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Bool { + #[doc = "Calls [Fold`::fold_bool`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_bool(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Bool { span, value } => { + let span = { >::fold_with(span, visitor) }; + Bool { span, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BreakStmt { + #[doc = "Calls [Fold`::fold_break_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_break_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + BreakStmt { span, label } => { + let span = { >::fold_with(span, visitor) }; + let label = { as FoldWith>::fold_with(label, visitor) }; + BreakStmt { span, label } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for CallExpr<'a> { + #[doc = "Calls [Fold`::fold_call_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_call_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let callee = { as FoldWith>::fold_with(callee, visitor) }; + let args = { > as FoldWith>::fold_with(args, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Callee<'a> { + #[doc = "Calls [Fold`::fold_callee`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_callee(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Callee::Super { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Callee::Super { 0: _field_0 } + } + Callee::Import { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Callee::Import { 0: _field_0 } + } + Callee::Expr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Callee::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for CatchClause<'a> { + #[doc = "Calls [Fold`::fold_catch_clause`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_catch_clause(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + CatchClause { span, param, body } => { + let span = { >::fold_with(span, visitor) }; + let param = { > as FoldWith>::fold_with(param, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + CatchClause { span, param, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Class<'a> { + #[doc = "Calls [Fold`::fold_class`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + let super_class = + { > as FoldWith>::fold_with(super_class, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let super_type_params = { + >> as FoldWith>::fold_with( + super_type_params, + visitor, + ) + }; + let implements = { + > as FoldWith>::fold_with(implements, visitor) + }; + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ClassDecl<'a> { + #[doc = "Calls [Fold`::fold_class_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ClassDecl { + ident, + declare, + class, + } => { + let ident = { >::fold_with(ident, visitor) }; + let class = { > as FoldWith>::fold_with(class, visitor) }; + ClassDecl { + ident, + declare, + class, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ClassExpr<'a> { + #[doc = "Calls [Fold`::fold_class_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ClassExpr { ident, class } => { + let ident = { as FoldWith>::fold_with(ident, visitor) }; + let class = { > as FoldWith>::fold_with(class, visitor) }; + ClassExpr { ident, class } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ClassMember<'a> { + #[doc = "Calls [Fold`::fold_class_member`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_member(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ClassMember::Constructor { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::Constructor { 0: _field_0 } + } + ClassMember::Method { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::Method { 0: _field_0 } + } + ClassMember::PrivateMethod { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::PrivateMethod { 0: _field_0 } + } + ClassMember::ClassProp { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::ClassProp { 0: _field_0 } + } + ClassMember::PrivateProp { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::PrivateProp { 0: _field_0 } + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::TsIndexSignature { 0: _field_0 } + } + ClassMember::Empty { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ClassMember::Empty { 0: _field_0 } + } + ClassMember::StaticBlock { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::StaticBlock { 0: _field_0 } + } + ClassMember::AutoAccessor { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ClassMember::AutoAccessor { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ClassMethod<'a> { + #[doc = "Calls [Fold`::fold_class_method`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_method(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let function = + { > as FoldWith>::fold_with(function, visitor) }; + let kind = { >::fold_with(kind, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ClassProp<'a> { + #[doc = "Calls [Fold`::fold_class_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let value = { > as FoldWith>::fold_with(value, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [Fold`::fold_computed_prop_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_computed_prop_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ComputedPropName { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + ComputedPropName { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for CondExpr<'a> { + #[doc = "Calls [Fold`::fold_cond_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_cond_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + let span = { >::fold_with(span, visitor) }; + let test = { as FoldWith>::fold_with(test, visitor) }; + let cons = { as FoldWith>::fold_with(cons, visitor) }; + let alt = { as FoldWith>::fold_with(alt, visitor) }; + CondExpr { + span, + test, + cons, + alt, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Constructor<'a> { + #[doc = "Calls [Fold`::fold_constructor`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_constructor(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let params = { + > as FoldWith>::fold_with(params, visitor) + }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ContinueStmt { + #[doc = "Calls [Fold`::fold_continue_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_continue_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ContinueStmt { span, label } => { + let span = { >::fold_with(span, visitor) }; + let label = { as FoldWith>::fold_with(label, visitor) }; + ContinueStmt { span, label } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for DebuggerStmt { + #[doc = "Calls [Fold`::fold_debugger_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_debugger_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + DebuggerStmt { span } => { + let span = { >::fold_with(span, visitor) }; + DebuggerStmt { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Decl<'a> { + #[doc = "Calls [Fold`::fold_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Decl::Class { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::Class { 0: _field_0 } + } + Decl::Fn { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Decl::Fn { 0: _field_0 } + } + Decl::Var { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Decl::Var { 0: _field_0 } + } + Decl::Using { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::Using { 0: _field_0 } + } + Decl::TsInterface { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::TsInterface { 0: _field_0 } + } + Decl::TsTypeAlias { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::TsTypeAlias { 0: _field_0 } + } + Decl::TsEnum { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::TsEnum { 0: _field_0 } + } + Decl::TsModule { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Decl::TsModule { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Decorator<'a> { + #[doc = "Calls [Fold`::fold_decorator`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_decorator(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Decorator { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + Decorator { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [Fold`::fold_default_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_default_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + DefaultDecl::Class { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + DefaultDecl::Class { 0: _field_0 } + } + DefaultDecl::Fn { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + DefaultDecl::Fn { 0: _field_0 } + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + DefaultDecl::TsInterfaceDecl { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [Fold`::fold_do_while_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_do_while_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + DoWhileStmt { span, test, body } => { + let span = { >::fold_with(span, visitor) }; + let test = { as FoldWith>::fold_with(test, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + DoWhileStmt { span, test, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for EmptyStmt { + #[doc = "Calls [Fold`::fold_empty_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_empty_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + EmptyStmt { span } => { + let span = { >::fold_with(span, visitor) }; + EmptyStmt { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportAll<'a> { + #[doc = "Calls [Fold`::fold_export_all`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_all(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + let span = { >::fold_with(span, visitor) }; + let src = { as FoldWith>::fold_with(src, visitor) }; + let with = + { >> as FoldWith>::fold_with(with, visitor) }; + ExportAll { + span, + src, + type_only, + with, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportDecl<'a> { + #[doc = "Calls [Fold`::fold_export_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportDecl { span, decl } => { + let span = { >::fold_with(span, visitor) }; + let decl = { as FoldWith>::fold_with(decl, visitor) }; + ExportDecl { span, decl } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [Fold`::fold_export_default_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_default_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportDefaultDecl { span, decl } => { + let span = { >::fold_with(span, visitor) }; + let decl = { as FoldWith>::fold_with(decl, visitor) }; + ExportDefaultDecl { span, decl } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [Fold`::fold_export_default_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_default_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportDefaultExpr { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + ExportDefaultExpr { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [Fold`::fold_export_default_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_default_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportDefaultSpecifier { exported } => { + let exported = { >::fold_with(exported, visitor) }; + ExportDefaultSpecifier { exported } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [Fold`::fold_export_named_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_named_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + let span = { >::fold_with(span, visitor) }; + let orig = { as FoldWith>::fold_with(orig, visitor) }; + let exported = + { > as FoldWith>::fold_with(exported, visitor) }; + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportNamespaceSpecifier<'a> { + #[doc = "Calls [Fold`::fold_export_namespace_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_namespace_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportNamespaceSpecifier { span, name } => { + let span = { >::fold_with(span, visitor) }; + let name = { as FoldWith>::fold_with(name, visitor) }; + ExportNamespaceSpecifier { span, name } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [Fold`::fold_export_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + ExportSpecifier::Namespace { 0: _field_0 } + } + ExportSpecifier::Default { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + ExportSpecifier::Default { 0: _field_0 } + } + ExportSpecifier::Named { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + ExportSpecifier::Named { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Expr<'a> { + #[doc = "Calls [Fold`::fold_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Expr::This { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::This { 0: _field_0 } + } + Expr::Array { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Array { 0: _field_0 } + } + Expr::Object { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Object { 0: _field_0 } + } + Expr::Fn { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Fn { 0: _field_0 } + } + Expr::Unary { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Unary { 0: _field_0 } + } + Expr::Update { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Update { 0: _field_0 } + } + Expr::Bin { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Bin { 0: _field_0 } + } + Expr::Assign { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Assign { 0: _field_0 } + } + Expr::Member { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Member { 0: _field_0 } + } + Expr::SuperProp { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::SuperProp { 0: _field_0 } + } + Expr::Cond { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Cond { 0: _field_0 } + } + Expr::Call { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Call { 0: _field_0 } + } + Expr::New { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::New { 0: _field_0 } + } + Expr::Seq { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Seq { 0: _field_0 } + } + Expr::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::Ident { 0: _field_0 } + } + Expr::Lit { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Lit { 0: _field_0 } + } + Expr::Tpl { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::Tpl { 0: _field_0 } + } + Expr::TaggedTpl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TaggedTpl { 0: _field_0 } + } + Expr::Arrow { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Arrow { 0: _field_0 } + } + Expr::Class { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Class { 0: _field_0 } + } + Expr::Yield { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Yield { 0: _field_0 } + } + Expr::MetaProp { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::MetaProp { 0: _field_0 } + } + Expr::Await { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Await { 0: _field_0 } + } + Expr::Paren { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::Paren { 0: _field_0 } + } + Expr::JSXMember { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::JSXMember { 0: _field_0 } + } + Expr::JSXNamespacedName { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + Expr::JSXNamespacedName { 0: _field_0 } + } + Expr::JSXEmpty { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::JSXEmpty { 0: _field_0 } + } + Expr::JSXElement { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::JSXElement { 0: _field_0 } + } + Expr::JSXFragment { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::JSXFragment { 0: _field_0 } + } + Expr::TsTypeAssertion { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsTypeAssertion { 0: _field_0 } + } + Expr::TsConstAssertion { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsConstAssertion { 0: _field_0 } + } + Expr::TsNonNull { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsNonNull { 0: _field_0 } + } + Expr::TsAs { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsAs { 0: _field_0 } + } + Expr::TsInstantiation { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsInstantiation { 0: _field_0 } + } + Expr::TsSatisfies { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::TsSatisfies { 0: _field_0 } + } + Expr::PrivateName { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::PrivateName { 0: _field_0 } + } + Expr::OptChain { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Expr::OptChain { 0: _field_0 } + } + Expr::Invalid { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Expr::Invalid { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [Fold`::fold_expr_or_spread`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_expr_or_spread(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExprOrSpread { spread, expr } => { + let spread = + { as FoldWith>::fold_with(spread, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + ExprOrSpread { spread, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ExprStmt<'a> { + #[doc = "Calls [Fold`::fold_expr_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_expr_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ExprStmt { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + ExprStmt { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for FnDecl<'a> { + #[doc = "Calls [Fold`::fold_fn_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_fn_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + FnDecl { + ident, + declare, + function, + } => { + let ident = { >::fold_with(ident, visitor) }; + let function = + { > as FoldWith>::fold_with(function, visitor) }; + FnDecl { + ident, + declare, + function, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for FnExpr<'a> { + #[doc = "Calls [Fold`::fold_fn_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_fn_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + FnExpr { ident, function } => { + let ident = { as FoldWith>::fold_with(ident, visitor) }; + let function = + { > as FoldWith>::fold_with(function, visitor) }; + FnExpr { ident, function } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ForHead<'a> { + #[doc = "Calls [Fold`::fold_for_head`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_for_head(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ForHead::VarDecl { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + ForHead::VarDecl { 0: _field_0 } + } + ForHead::UsingDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ForHead::UsingDecl { 0: _field_0 } + } + ForHead::Pat { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ForHead::Pat { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ForInStmt<'a> { + #[doc = "Calls [Fold`::fold_for_in_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_for_in_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { as FoldWith>::fold_with(right, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + ForInStmt { + span, + left, + right, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [Fold`::fold_for_of_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_for_of_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { as FoldWith>::fold_with(right, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + ForOfStmt { + span, + is_await, + left, + right, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ForStmt<'a> { + #[doc = "Calls [Fold`::fold_for_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_for_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let init = { > as FoldWith>::fold_with(init, visitor) }; + let test = { > as FoldWith>::fold_with(test, visitor) }; + let update = { > as FoldWith>::fold_with(update, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + ForStmt { + span, + init, + test, + update, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Function<'a> { + #[doc = "Calls [Fold`::fold_function`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_function(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + let params = { > as FoldWith>::fold_with(params, visitor) }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let return_type = { + >> as FoldWith>::fold_with(return_type, visitor) + }; + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for GetterProp<'a> { + #[doc = "Calls [Fold`::fold_getter_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_getter_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + GetterProp { + span, + key, + type_ann, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Ident { + #[doc = "Calls [Fold`::fold_ident`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ident(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let sym = { >::fold_with(sym, visitor) }; + Ident { + span, + ctxt, + sym, + optional, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for IdentName { + #[doc = "Calls [Fold`::fold_ident_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ident_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + IdentName { span, sym } => { + let span = { >::fold_with(span, visitor) }; + let sym = { >::fold_with(sym, visitor) }; + IdentName { span, sym } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for IfStmt<'a> { + #[doc = "Calls [Fold`::fold_if_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_if_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + let span = { >::fold_with(span, visitor) }; + let test = { as FoldWith>::fold_with(test, visitor) }; + let cons = { as FoldWith>::fold_with(cons, visitor) }; + let alt = { > as FoldWith>::fold_with(alt, visitor) }; + IfStmt { + span, + test, + cons, + alt, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Import { + #[doc = "Calls [Fold`::fold_import`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Import { span, phase } => { + let span = { >::fold_with(span, visitor) }; + let phase = { >::fold_with(phase, visitor) }; + Import { span, phase } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportDecl<'a> { + #[doc = "Calls [Fold`::fold_import_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + let span = { >::fold_with(span, visitor) }; + let specifiers = { + > as FoldWith>::fold_with(specifiers, visitor) + }; + let src = { as FoldWith>::fold_with(src, visitor) }; + let with = + { >> as FoldWith>::fold_with(with, visitor) }; + let phase = { >::fold_with(phase, visitor) }; + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [Fold`::fold_import_default_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_default_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportDefaultSpecifier { span, local } => { + let span = { >::fold_with(span, visitor) }; + let local = { >::fold_with(local, visitor) }; + ImportDefaultSpecifier { span, local } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [Fold`::fold_import_named_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_named_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + let span = { >::fold_with(span, visitor) }; + let local = { >::fold_with(local, visitor) }; + let imported = + { > as FoldWith>::fold_with(imported, visitor) }; + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportPhase { + #[doc = "Calls [Fold`::fold_import_phase`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_phase(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportPhase::Evaluation => ImportPhase::Evaluation, + ImportPhase::Source => ImportPhase::Source, + ImportPhase::Defer => ImportPhase::Defer, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [Fold`::fold_import_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + ImportSpecifier::Named { 0: _field_0 } + } + ImportSpecifier::Default { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + ImportSpecifier::Default { 0: _field_0 } + } + ImportSpecifier::Namespace { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + ImportSpecifier::Namespace { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [Fold`::fold_import_star_as_specifier`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_star_as_specifier(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportStarAsSpecifier { span, local } => { + let span = { >::fold_with(span, visitor) }; + let local = { >::fold_with(local, visitor) }; + ImportStarAsSpecifier { span, local } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportWith<'a> { + #[doc = "Calls [Fold`::fold_import_with`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_with(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportWith { span, values } => { + let span = { >::fold_with(span, visitor) }; + let values = + { as FoldWith>::fold_with(values, visitor) }; + ImportWith { span, values } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ImportWithItem { + #[doc = "Calls [Fold`::fold_import_with_item`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_with_item(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ImportWithItem { key, value } => { + let key = { >::fold_with(key, visitor) }; + let value = { >::fold_with(value, visitor) }; + ImportWithItem { key, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Invalid { + #[doc = "Calls [Fold`::fold_invalid`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_invalid(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Invalid { span } => { + let span = { >::fold_with(span, visitor) }; + Invalid { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXAttr<'a> { + #[doc = "Calls [Fold`::fold_jsx_attr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_attr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXAttr { span, name, value } => { + let span = { >::fold_with(span, visitor) }; + let name = { as FoldWith>::fold_with(name, visitor) }; + let value = + { > as FoldWith>::fold_with(value, visitor) }; + JSXAttr { span, name, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [Fold`::fold_jsx_attr_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_attr_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXAttrName::Ident { 0: _field_0 } + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + JSXAttrName::JSXNamespacedName { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [Fold`::fold_jsx_attr_or_spread`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_attr_or_spread(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrOrSpread::JSXAttr { 0: _field_0 } + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrOrSpread::SpreadElement { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [Fold`::fold_jsx_attr_value`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_attr_value(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrValue::Lit { 0: _field_0 } + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrValue::JSXExprContainer { 0: _field_0 } + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrValue::JSXElement { 0: _field_0 } + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXAttrValue::JSXFragment { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [Fold`::fold_jsx_closing_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_closing_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXClosingElement { span, name } => { + let span = { >::fold_with(span, visitor) }; + let name = { as FoldWith>::fold_with(name, visitor) }; + JSXClosingElement { span, name } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXClosingFragment { + #[doc = "Calls [Fold`::fold_jsx_closing_fragment`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_closing_fragment(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXClosingFragment { span } => { + let span = { >::fold_with(span, visitor) }; + JSXClosingFragment { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXElement<'a> { + #[doc = "Calls [Fold`::fold_jsx_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + let span = { >::fold_with(span, visitor) }; + let opening = + { as FoldWith>::fold_with(opening, visitor) }; + let children = + { > as FoldWith>::fold_with(children, visitor) }; + let closing = + { > as FoldWith>::fold_with(closing, visitor) }; + JSXElement { + span, + opening, + children, + closing, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [Fold`::fold_jsx_element_child`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_element_child(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXElementChild::JSXText { 0: _field_0 } + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXElementChild::JSXExprContainer { 0: _field_0 } + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXElementChild::JSXSpreadChild { 0: _field_0 } + } + JSXElementChild::JSXElement { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXElementChild::JSXElement { 0: _field_0 } + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXElementChild::JSXFragment { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXElementName<'a> { + #[doc = "Calls [Fold`::fold_jsx_element_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_element_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXElementName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXElementName::Ident { 0: _field_0 } + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXElementName::JSXMemberExpr { 0: _field_0 } + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + JSXElementName::JSXNamespacedName { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXEmptyExpr { + #[doc = "Calls [Fold`::fold_jsx_empty_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_empty_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXEmptyExpr { span } => { + let span = { >::fold_with(span, visitor) }; + JSXEmptyExpr { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXExpr<'a> { + #[doc = "Calls [Fold`::fold_jsx_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXExpr::JSXEmptyExpr { 0: _field_0 } + } + JSXExpr::Expr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXExpr::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [Fold`::fold_jsx_expr_container`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_expr_container(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXExprContainer { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + JSXExprContainer { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXFragment<'a> { + #[doc = "Calls [Fold`::fold_jsx_fragment`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_fragment(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + let span = { >::fold_with(span, visitor) }; + let opening = { >::fold_with(opening, visitor) }; + let children = + { > as FoldWith>::fold_with(children, visitor) }; + let closing = { >::fold_with(closing, visitor) }; + JSXFragment { + span, + opening, + children, + closing, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [Fold`::fold_jsx_member_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_member_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXMemberExpr { span, obj, prop } => { + let span = { >::fold_with(span, visitor) }; + let obj = { as FoldWith>::fold_with(obj, visitor) }; + let prop = { >::fold_with(prop, visitor) }; + JSXMemberExpr { span, obj, prop } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXNamespacedName { + #[doc = "Calls [Fold`::fold_jsx_namespaced_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_namespaced_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXNamespacedName { span, ns, name } => { + let span = { >::fold_with(span, visitor) }; + let ns = { >::fold_with(ns, visitor) }; + let name = { >::fold_with(name, visitor) }; + JSXNamespacedName { span, ns, name } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXObject<'a> { + #[doc = "Calls [Fold`::fold_jsx_object`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_object(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + JSXObject::JSXMemberExpr { 0: _field_0 } + } + JSXObject::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + JSXObject::Ident { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [Fold`::fold_jsx_opening_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_opening_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + let name = { as FoldWith>::fold_with(name, visitor) }; + let span = { >::fold_with(span, visitor) }; + let attrs = + { > as FoldWith>::fold_with(attrs, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXOpeningFragment { + #[doc = "Calls [Fold`::fold_jsx_opening_fragment`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_opening_fragment(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXOpeningFragment { span } => { + let span = { >::fold_with(span, visitor) }; + JSXOpeningFragment { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [Fold`::fold_jsx_spread_child`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_spread_child(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXSpreadChild { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + JSXSpreadChild { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for JSXText { + #[doc = "Calls [Fold`::fold_jsx_text`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_text(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + JSXText { span, value, raw } => { + let span = { >::fold_with(span, visitor) }; + let value = { >::fold_with(value, visitor) }; + let raw = { >::fold_with(raw, visitor) }; + JSXText { span, value, raw } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Key<'a> { + #[doc = "Calls [Fold`::fold_key`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_key(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Key::Private { 0: _field_0 } => { + let _field_0 = >::fold_with(_field_0, visitor); + Key::Private { 0: _field_0 } + } + Key::Public { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Key::Public { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [Fold`::fold_key_value_pat_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_key_value_pat_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + KeyValuePatProp { key, value } => { + let key = { as FoldWith>::fold_with(key, visitor) }; + let value = { as FoldWith>::fold_with(value, visitor) }; + KeyValuePatProp { key, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [Fold`::fold_key_value_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_key_value_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + KeyValueProp { key, value } => { + let key = { as FoldWith>::fold_with(key, visitor) }; + let value = { as FoldWith>::fold_with(value, visitor) }; + KeyValueProp { key, value } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [Fold`::fold_labeled_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_labeled_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + LabeledStmt { span, label, body } => { + let span = { >::fold_with(span, visitor) }; + let label = { >::fold_with(label, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + LabeledStmt { span, label, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Lit<'a> { + #[doc = "Calls [Fold`::fold_lit`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_lit(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Lit::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::Str { 0: _field_0 } + } + Lit::Bool { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::Bool { 0: _field_0 } + } + Lit::Null { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::Null { 0: _field_0 } + } + Lit::Num { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::Num { 0: _field_0 } + } + Lit::BigInt { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Lit::BigInt { 0: _field_0 } + } + Lit::Regex { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::Regex { 0: _field_0 } + } + Lit::JSXText { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Lit::JSXText { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MemberExpr<'a> { + #[doc = "Calls [Fold`::fold_member_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_member_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MemberExpr { span, obj, prop } => { + let span = { >::fold_with(span, visitor) }; + let obj = { as FoldWith>::fold_with(obj, visitor) }; + let prop = { as FoldWith>::fold_with(prop, visitor) }; + MemberExpr { span, obj, prop } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MemberProp<'a> { + #[doc = "Calls [Fold`::fold_member_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_member_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MemberProp::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + MemberProp::Ident { 0: _field_0 } + } + MemberProp::PrivateName { 0: _field_0 } => { + let _field_0 = >::fold_with(_field_0, visitor); + MemberProp::PrivateName { 0: _field_0 } + } + MemberProp::Computed { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + MemberProp::Computed { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MetaPropExpr { + #[doc = "Calls [Fold`::fold_meta_prop_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_meta_prop_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MetaPropExpr { span, kind } => { + let span = { >::fold_with(span, visitor) }; + let kind = { >::fold_with(kind, visitor) }; + MetaPropExpr { span, kind } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MetaPropKind { + #[doc = "Calls [Fold`::fold_meta_prop_kind`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_meta_prop_kind(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MetaPropKind::NewTarget => MetaPropKind::NewTarget, + MetaPropKind::ImportMeta => MetaPropKind::ImportMeta, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MethodKind { + #[doc = "Calls [Fold`::fold_method_kind`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_method_kind(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MethodKind::Method => MethodKind::Method, + MethodKind::Getter => MethodKind::Getter, + MethodKind::Setter => MethodKind::Setter, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for MethodProp<'a> { + #[doc = "Calls [Fold`::fold_method_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_method_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + MethodProp { key, function } => { + let key = { as FoldWith>::fold_with(key, visitor) }; + let function = + { > as FoldWith>::fold_with(function, visitor) }; + MethodProp { key, function } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Module<'a> { + #[doc = "Calls [Fold`::fold_module`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_module(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Module { + span, + body, + shebang, + } => { + let span = { >::fold_with(span, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + let shebang = + { as FoldWith>::fold_with(shebang, visitor) }; + Module { + span, + body, + shebang, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [Fold`::fold_module_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_module_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ModuleDecl::Import { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::Import { 0: _field_0 } + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::ExportDecl { 0: _field_0 } + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::ExportNamed { 0: _field_0 } + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::ExportDefaultDecl { 0: _field_0 } + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::ExportDefaultExpr { 0: _field_0 } + } + ModuleDecl::ExportAll { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::ExportAll { 0: _field_0 } + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::TsImportEquals { 0: _field_0 } + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::TsExportAssignment { 0: _field_0 } + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + ModuleDecl::TsNamespaceExport { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [Fold`::fold_module_export_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_module_export_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ModuleExportName::Ident { 0: _field_0 } + } + ModuleExportName::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ModuleExportName::Str { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ModuleItem<'a> { + #[doc = "Calls [Fold`::fold_module_item`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_module_item(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ModuleItem::ModuleDecl { 0: _field_0 } + } + ModuleItem::Stmt { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + ModuleItem::Stmt { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for NamedExport<'a> { + #[doc = "Calls [Fold`::fold_named_export`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_named_export(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + let span = { >::fold_with(span, visitor) }; + let specifiers = { + > as FoldWith>::fold_with(specifiers, visitor) + }; + let src = { > as FoldWith>::fold_with(src, visitor) }; + let with = + { >> as FoldWith>::fold_with(with, visitor) }; + NamedExport { + span, + specifiers, + src, + type_only, + with, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for NewExpr<'a> { + #[doc = "Calls [Fold`::fold_new_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_new_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let callee = { as FoldWith>::fold_with(callee, visitor) }; + let args = { + >> as FoldWith>::fold_with(args, visitor) + }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Null { + #[doc = "Calls [Fold`::fold_null`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_null(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Null { span } => { + let span = { >::fold_with(span, visitor) }; + Null { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Number { + #[doc = "Calls [Fold`::fold_number`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_number(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Number { span, value, raw } => { + let span = { >::fold_with(span, visitor) }; + let raw = { as FoldWith>::fold_with(raw, visitor) }; + Number { span, value, raw } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ObjectLit<'a> { + #[doc = "Calls [Fold`::fold_object_lit`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_object_lit(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ObjectLit { span, props } => { + let span = { >::fold_with(span, visitor) }; + let props = + { > as FoldWith>::fold_with(props, visitor) }; + ObjectLit { span, props } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ObjectPat<'a> { + #[doc = "Calls [Fold`::fold_object_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_object_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let props = + { > as FoldWith>::fold_with(props, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + ObjectPat { + span, + props, + optional, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [Fold`::fold_object_pat_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_object_pat_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ObjectPatProp::KeyValue { 0: _field_0 } + } + ObjectPatProp::Assign { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ObjectPatProp::Assign { 0: _field_0 } + } + ObjectPatProp::Rest { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + ObjectPatProp::Rest { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for OptCall<'a> { + #[doc = "Calls [Fold`::fold_opt_call`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_call(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let callee = { as FoldWith>::fold_with(callee, visitor) }; + let args = { > as FoldWith>::fold_with(args, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + OptCall { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for OptChainBase<'a> { + #[doc = "Calls [Fold`::fold_opt_chain_base`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_chain_base(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + OptChainBase::Member { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + OptChainBase::Member { 0: _field_0 } + } + OptChainBase::Call { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + OptChainBase::Call { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [Fold`::fold_opt_chain_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_chain_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + OptChainExpr { + span, + optional, + base, + } => { + let span = { >::fold_with(span, visitor) }; + let base = { as FoldWith>::fold_with(base, visitor) }; + OptChainExpr { + span, + optional, + base, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Param<'a> { + #[doc = "Calls [Fold`::fold_param`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_param(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Param { + span, + decorators, + pat, + } => { + let span = { >::fold_with(span, visitor) }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let pat = { as FoldWith>::fold_with(pat, visitor) }; + Param { + span, + decorators, + pat, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [Fold`::fold_param_or_ts_param_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_param_or_ts_param_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + ParamOrTsParamProp::TsParamProp { 0: _field_0 } + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + ParamOrTsParamProp::Param { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ParenExpr<'a> { + #[doc = "Calls [Fold`::fold_paren_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_paren_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ParenExpr { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + ParenExpr { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Pat<'a> { + #[doc = "Calls [Fold`::fold_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Pat::Ident { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Pat::Ident { 0: _field_0 } + } + Pat::Array { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Pat::Array { 0: _field_0 } + } + Pat::Rest { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Pat::Rest { 0: _field_0 } + } + Pat::Object { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Pat::Object { 0: _field_0 } + } + Pat::Assign { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Pat::Assign { 0: _field_0 } + } + Pat::Invalid { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Pat::Invalid { 0: _field_0 } + } + Pat::Expr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Pat::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [Fold`::fold_private_method`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_private_method(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { >::fold_with(key, visitor) }; + let function = + { > as FoldWith>::fold_with(function, visitor) }; + let kind = { >::fold_with(kind, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for PrivateName { + #[doc = "Calls [Fold`::fold_private_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_private_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + PrivateName { span, name } => { + let span = { >::fold_with(span, visitor) }; + let name = { >::fold_with(name, visitor) }; + PrivateName { span, name } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for PrivateProp<'a> { + #[doc = "Calls [Fold`::fold_private_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_private_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let key = { >::fold_with(key, visitor) }; + let value = { > as FoldWith>::fold_with(value, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Program<'a> { + #[doc = "Calls [Fold`::fold_program`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_program(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Program::Module { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Program::Module { 0: _field_0 } + } + Program::Script { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Program::Script { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Prop<'a> { + #[doc = "Calls [Fold`::fold_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Prop::Shorthand { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Prop::Shorthand { 0: _field_0 } + } + Prop::KeyValue { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Prop::KeyValue { 0: _field_0 } + } + Prop::Assign { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Prop::Assign { 0: _field_0 } + } + Prop::Getter { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Prop::Getter { 0: _field_0 } + } + Prop::Setter { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Prop::Setter { 0: _field_0 } + } + Prop::Method { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Prop::Method { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for PropName<'a> { + #[doc = "Calls [Fold`::fold_prop_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_prop_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + PropName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + PropName::Ident { 0: _field_0 } + } + PropName::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + PropName::Str { 0: _field_0 } + } + PropName::Num { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + PropName::Num { 0: _field_0 } + } + PropName::Computed { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + PropName::Computed { 0: _field_0 } + } + PropName::BigInt { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + PropName::BigInt { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [Fold`::fold_prop_or_spread`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_prop_or_spread(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + PropOrSpread::Spread { 0: _field_0 } + } + PropOrSpread::Prop { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + PropOrSpread::Prop { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Regex { + #[doc = "Calls [Fold`::fold_regex`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_regex(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Regex { span, exp, flags } => { + let span = { >::fold_with(span, visitor) }; + let exp = { >::fold_with(exp, visitor) }; + let flags = { >::fold_with(flags, visitor) }; + Regex { span, exp, flags } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for RestPat<'a> { + #[doc = "Calls [Fold`::fold_rest_pat`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_rest_pat(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let dot3_token = + { >::fold_with(dot3_token, visitor) }; + let arg = { as FoldWith>::fold_with(arg, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + RestPat { + span, + dot3_token, + arg, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [Fold`::fold_return_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_return_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ReturnStmt { span, arg } => { + let span = { >::fold_with(span, visitor) }; + let arg = { > as FoldWith>::fold_with(arg, visitor) }; + ReturnStmt { span, arg } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Script<'a> { + #[doc = "Calls [Fold`::fold_script`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_script(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Script { + span, + body, + shebang, + } => { + let span = { >::fold_with(span, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + let shebang = + { as FoldWith>::fold_with(shebang, visitor) }; + Script { + span, + body, + shebang, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SeqExpr<'a> { + #[doc = "Calls [Fold`::fold_seq_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_seq_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SeqExpr { span, exprs } => { + let span = { >::fold_with(span, visitor) }; + let exprs = { > as FoldWith>::fold_with(exprs, visitor) }; + SeqExpr { span, exprs } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SetterProp<'a> { + #[doc = "Calls [Fold`::fold_setter_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_setter_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let this_param = + { > as FoldWith>::fold_with(this_param, visitor) }; + let param = { as FoldWith>::fold_with(param, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + SetterProp { + span, + key, + this_param, + param, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [Fold`::fold_simple_assign_target`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_simple_assign_target(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::Ident { 0: _field_0 } + } + SimpleAssignTarget::Member { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::Member { 0: _field_0 } + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::SuperProp { 0: _field_0 } + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::Paren { 0: _field_0 } + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::OptChain { 0: _field_0 } + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::TsAs { 0: _field_0 } + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::TsSatisfies { 0: _field_0 } + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::TsNonNull { 0: _field_0 } + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::TsInstantiation { 0: _field_0 } + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + SimpleAssignTarget::Invalid { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SpreadElement<'a> { + #[doc = "Calls [Fold`::fold_spread_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_spread_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SpreadElement { dot3_token, expr } => { + let dot3_token = + { >::fold_with(dot3_token, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + SpreadElement { dot3_token, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for StaticBlock<'a> { + #[doc = "Calls [Fold`::fold_static_block`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_static_block(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + StaticBlock { span, body } => { + let span = { >::fold_with(span, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + StaticBlock { span, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Stmt<'a> { + #[doc = "Calls [Fold`::fold_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Stmt::Block { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Block { 0: _field_0 } + } + Stmt::Empty { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Stmt::Empty { 0: _field_0 } + } + Stmt::Debugger { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Stmt::Debugger { 0: _field_0 } + } + Stmt::With { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::With { 0: _field_0 } + } + Stmt::Return { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Return { 0: _field_0 } + } + Stmt::Labeled { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Labeled { 0: _field_0 } + } + Stmt::Break { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Stmt::Break { 0: _field_0 } + } + Stmt::Continue { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + Stmt::Continue { 0: _field_0 } + } + Stmt::If { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::If { 0: _field_0 } + } + Stmt::Switch { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Switch { 0: _field_0 } + } + Stmt::Throw { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Throw { 0: _field_0 } + } + Stmt::Try { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Try { 0: _field_0 } + } + Stmt::While { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::While { 0: _field_0 } + } + Stmt::DoWhile { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::DoWhile { 0: _field_0 } + } + Stmt::For { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::For { 0: _field_0 } + } + Stmt::ForIn { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::ForIn { 0: _field_0 } + } + Stmt::ForOf { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + Stmt::ForOf { 0: _field_0 } + } + Stmt::Decl { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Decl { 0: _field_0 } + } + Stmt::Expr { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + Stmt::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Str { + #[doc = "Calls [Fold`::fold_str`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_str(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Str { span, value, raw } => { + let span = { >::fold_with(span, visitor) }; + let value = { >::fold_with(value, visitor) }; + let raw = { as FoldWith>::fold_with(raw, visitor) }; + Str { span, value, raw } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Super { + #[doc = "Calls [Fold`::fold_super`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_super(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Super { span } => { + let span = { >::fold_with(span, visitor) }; + Super { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SuperProp<'a> { + #[doc = "Calls [Fold`::fold_super_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_super_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SuperProp::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + SuperProp::Ident { 0: _field_0 } + } + SuperProp::Computed { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + SuperProp::Computed { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [Fold`::fold_super_prop_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_super_prop_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SuperPropExpr { span, obj, prop } => { + let span = { >::fold_with(span, visitor) }; + let obj = { >::fold_with(obj, visitor) }; + let prop = { as FoldWith>::fold_with(prop, visitor) }; + SuperPropExpr { span, obj, prop } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SwitchCase<'a> { + #[doc = "Calls [Fold`::fold_switch_case`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_switch_case(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SwitchCase { span, test, cons } => { + let span = { >::fold_with(span, visitor) }; + let test = { > as FoldWith>::fold_with(test, visitor) }; + let cons = { > as FoldWith>::fold_with(cons, visitor) }; + SwitchCase { span, test, cons } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [Fold`::fold_switch_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_switch_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + let span = { >::fold_with(span, visitor) }; + let discriminant = { as FoldWith>::fold_with(discriminant, visitor) }; + let cases = { > as FoldWith>::fold_with(cases, visitor) }; + SwitchStmt { + span, + discriminant, + cases, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [Fold`::fold_tagged_tpl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_tagged_tpl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let tag = { as FoldWith>::fold_with(tag, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let tpl = { > as FoldWith>::fold_with(tpl, visitor) }; + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ThisExpr { + #[doc = "Calls [Fold`::fold_this_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_this_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ThisExpr { span } => { + let span = { >::fold_with(span, visitor) }; + ThisExpr { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [Fold`::fold_throw_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_throw_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + ThrowStmt { span, arg } => { + let span = { >::fold_with(span, visitor) }; + let arg = { as FoldWith>::fold_with(arg, visitor) }; + ThrowStmt { span, arg } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Tpl<'a> { + #[doc = "Calls [Fold`::fold_tpl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_tpl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + Tpl { + span, + exprs, + quasis, + } => { + let span = { >::fold_with(span, visitor) }; + let exprs = { > as FoldWith>::fold_with(exprs, visitor) }; + let quasis = { as FoldWith>::fold_with(quasis, visitor) }; + Tpl { + span, + exprs, + quasis, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TplElement { + #[doc = "Calls [Fold`::fold_tpl_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_tpl_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + let span = { >::fold_with(span, visitor) }; + let cooked = + { as FoldWith>::fold_with(cooked, visitor) }; + let raw = { >::fold_with(raw, visitor) }; + TplElement { + span, + tail, + cooked, + raw, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TruePlusMinus { + #[doc = "Calls [Fold`::fold_true_plus_minus`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_true_plus_minus(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TruePlusMinus::True => TruePlusMinus::True, + TruePlusMinus::Plus => TruePlusMinus::Plus, + TruePlusMinus::Minus => TruePlusMinus::Minus, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TryStmt<'a> { + #[doc = "Calls [Fold`::fold_try_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_try_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + let span = { >::fold_with(span, visitor) }; + let block = { as FoldWith>::fold_with(block, visitor) }; + let handler = + { > as FoldWith>::fold_with(handler, visitor) }; + let finalizer = + { > as FoldWith>::fold_with(finalizer, visitor) }; + TryStmt { + span, + block, + handler, + finalizer, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsArrayType<'a> { + #[doc = "Calls [Fold`::fold_ts_array_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_array_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsArrayType { span, elem_type } => { + let span = { >::fold_with(span, visitor) }; + let elem_type = { as FoldWith>::fold_with(elem_type, visitor) }; + TsArrayType { span, elem_type } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [Fold`::fold_ts_as_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_as_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsAsExpr { + span, + expr, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_call_signature_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_call_signature_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + let span = { >::fold_with(span, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [Fold`::fold_ts_conditional_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_conditional_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + let span = { >::fold_with(span, visitor) }; + let check_type = { as FoldWith>::fold_with(check_type, visitor) }; + let extends_type = + { as FoldWith>::fold_with(extends_type, visitor) }; + let true_type = { as FoldWith>::fold_with(true_type, visitor) }; + let false_type = { as FoldWith>::fold_with(false_type, visitor) }; + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [Fold`::fold_ts_const_assertion`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_const_assertion(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsConstAssertion { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + TsConstAssertion { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsConstructSignatureDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_construct_signature_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_construct_signature_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + let span = { >::fold_with(span, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [Fold`::fold_ts_constructor_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_constructor_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + let span = { >::fold_with(span, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let type_ann = + { > as FoldWith>::fold_with(type_ann, visitor) }; + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsEntityName<'a> { + #[doc = "Calls [Fold`::fold_ts_entity_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_entity_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsEntityName::TsQualifiedName { 0: _field_0 } + } + TsEntityName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsEntityName::Ident { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_enum_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_enum_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + let members = + { > as FoldWith>::fold_with(members, visitor) }; + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [Fold`::fold_ts_enum_member`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_enum_member(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsEnumMember { span, id, init } => { + let span = { >::fold_with(span, visitor) }; + let id = { as FoldWith>::fold_with(id, visitor) }; + let init = { > as FoldWith>::fold_with(init, visitor) }; + TsEnumMember { span, id, init } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [Fold`::fold_ts_enum_member_id`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_enum_member_id(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsEnumMemberId::Ident { 0: _field_0 } + } + TsEnumMemberId::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsEnumMemberId::Str { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [Fold`::fold_ts_export_assignment`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_export_assignment(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsExportAssignment { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + TsExportAssignment { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [Fold`::fold_ts_expr_with_type_args`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_expr_with_type_args(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + TsExprWithTypeArgs { + span, + expr, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsExternalModuleRef { + #[doc = "Calls [Fold`::fold_ts_external_module_ref`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_external_module_ref(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsExternalModuleRef { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { >::fold_with(expr, visitor) }; + TsExternalModuleRef { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [Fold`::fold_ts_fn_or_constructor_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_fn_or_constructor_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + TsFnOrConstructorType::TsFnType { 0: _field_0 } + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsFnParam<'a> { + #[doc = "Calls [Fold`::fold_ts_fn_param`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_fn_param(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsFnParam::Ident { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsFnParam::Ident { 0: _field_0 } + } + TsFnParam::Array { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + TsFnParam::Array { 0: _field_0 } + } + TsFnParam::Rest { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + TsFnParam::Rest { 0: _field_0 } + } + TsFnParam::Object { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsFnParam::Object { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsFnType<'a> { + #[doc = "Calls [Fold`::fold_ts_fn_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_fn_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let type_ann = + { > as FoldWith>::fold_with(type_ann, visitor) }; + TsFnType { + span, + params, + type_params, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [Fold`::fold_ts_getter_signature`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_getter_signature(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + TsGetterSignature { + span, + key, + computed, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_import_equals_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_import_equals_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + let module_ref = + { as FoldWith>::fold_with(module_ref, visitor) }; + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsImportType<'a> { + #[doc = "Calls [Fold`::fold_ts_import_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_import_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let arg = { >::fold_with(arg, visitor) }; + let qualifier = + { > as FoldWith>::fold_with(qualifier, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + TsImportType { + span, + arg, + qualifier, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [Fold`::fold_ts_index_signature`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_index_signature(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let span = { >::fold_with(span, visitor) }; + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [Fold`::fold_ts_indexed_access_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_indexed_access_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + let span = { >::fold_with(span, visitor) }; + let obj_type = { as FoldWith>::fold_with(obj_type, visitor) }; + let index_type = { as FoldWith>::fold_with(index_type, visitor) }; + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsInferType<'a> { + #[doc = "Calls [Fold`::fold_ts_infer_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_infer_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsInferType { span, type_param } => { + let span = { >::fold_with(span, visitor) }; + let type_param = + { as FoldWith>::fold_with(type_param, visitor) }; + TsInferType { span, type_param } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [Fold`::fold_ts_instantiation`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_instantiation(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + let type_args = { + > as FoldWith>::fold_with( + type_args, visitor, + ) + }; + TsInstantiation { + span, + expr, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [Fold`::fold_ts_interface_body`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_interface_body(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsInterfaceBody { span, body } => { + let span = { >::fold_with(span, visitor) }; + let body = + { > as FoldWith>::fold_with(body, visitor) }; + TsInterfaceBody { span, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_interface_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_interface_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let extends = { + > as FoldWith>::fold_with(extends, visitor) + }; + let body = { as FoldWith>::fold_with(body, visitor) }; + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [Fold`::fold_ts_intersection_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_intersection_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsIntersectionType { span, types } => { + let span = { >::fold_with(span, visitor) }; + let types = { > as FoldWith>::fold_with(types, visitor) }; + TsIntersectionType { span, types } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsKeywordType { + #[doc = "Calls [Fold`::fold_ts_keyword_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_keyword_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsKeywordType { span, kind } => { + let span = { >::fold_with(span, visitor) }; + let kind = { >::fold_with(kind, visitor) }; + TsKeywordType { span, kind } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [Fold`::fold_ts_keyword_type_kind`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_keyword_type_kind(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsKeywordTypeKind::TsAnyKeyword => TsKeywordTypeKind::TsAnyKeyword, + TsKeywordTypeKind::TsUnknownKeyword => TsKeywordTypeKind::TsUnknownKeyword, + TsKeywordTypeKind::TsNumberKeyword => TsKeywordTypeKind::TsNumberKeyword, + TsKeywordTypeKind::TsObjectKeyword => TsKeywordTypeKind::TsObjectKeyword, + TsKeywordTypeKind::TsBooleanKeyword => TsKeywordTypeKind::TsBooleanKeyword, + TsKeywordTypeKind::TsBigIntKeyword => TsKeywordTypeKind::TsBigIntKeyword, + TsKeywordTypeKind::TsStringKeyword => TsKeywordTypeKind::TsStringKeyword, + TsKeywordTypeKind::TsSymbolKeyword => TsKeywordTypeKind::TsSymbolKeyword, + TsKeywordTypeKind::TsVoidKeyword => TsKeywordTypeKind::TsVoidKeyword, + TsKeywordTypeKind::TsUndefinedKeyword => TsKeywordTypeKind::TsUndefinedKeyword, + TsKeywordTypeKind::TsNullKeyword => TsKeywordTypeKind::TsNullKeyword, + TsKeywordTypeKind::TsNeverKeyword => TsKeywordTypeKind::TsNeverKeyword, + TsKeywordTypeKind::TsIntrinsicKeyword => TsKeywordTypeKind::TsIntrinsicKeyword, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsLit<'a> { + #[doc = "Calls [Fold`::fold_ts_lit`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_lit(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsLit::Number { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsLit::Number { 0: _field_0 } + } + TsLit::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsLit::Str { 0: _field_0 } + } + TsLit::Bool { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsLit::Bool { 0: _field_0 } + } + TsLit::BigInt { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + TsLit::BigInt { 0: _field_0 } + } + TsLit::Tpl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsLit::Tpl { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsLitType<'a> { + #[doc = "Calls [Fold`::fold_ts_lit_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_lit_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsLitType { span, lit } => { + let span = { >::fold_with(span, visitor) }; + let lit = { as FoldWith>::fold_with(lit, visitor) }; + TsLitType { span, lit } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsMappedType<'a> { + #[doc = "Calls [Fold`::fold_ts_mapped_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_mapped_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let readonly = + { as FoldWith>::fold_with(readonly, visitor) }; + let type_param = + { as FoldWith>::fold_with(type_param, visitor) }; + let name_type = + { > as FoldWith>::fold_with(name_type, visitor) }; + let optional = + { as FoldWith>::fold_with(optional, visitor) }; + let type_ann = + { > as FoldWith>::fold_with(type_ann, visitor) }; + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [Fold`::fold_ts_method_signature`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_method_signature(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [Fold`::fold_ts_module_block`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_module_block(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsModuleBlock { span, body } => { + let span = { >::fold_with(span, visitor) }; + let body = { > as FoldWith>::fold_with(body, visitor) }; + TsModuleBlock { span, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_module_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_module_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { as FoldWith>::fold_with(id, visitor) }; + let body = + { > as FoldWith>::fold_with(body, visitor) }; + TsModuleDecl { + span, + declare, + global, + id, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsModuleName<'a> { + #[doc = "Calls [Fold`::fold_ts_module_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_module_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsModuleName::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsModuleName::Ident { 0: _field_0 } + } + TsModuleName::Str { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsModuleName::Str { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [Fold`::fold_ts_module_ref`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_module_ref(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsModuleRef::TsEntityName { 0: _field_0 } + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + TsModuleRef::TsExternalModuleRef { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [Fold`::fold_ts_namespace_body`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_namespace_body(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsNamespaceBody::TsModuleBlock { 0: _field_0 } + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_namespace_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_namespace_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + let body = + { > as FoldWith>::fold_with(body, visitor) }; + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [Fold`::fold_ts_namespace_export_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_namespace_export_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsNamespaceExportDecl { span, id } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + TsNamespaceExportDecl { span, id } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [Fold`::fold_ts_non_null_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_non_null_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsNonNullExpr { span, expr } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + TsNonNullExpr { span, expr } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [Fold`::fold_ts_optional_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_optional_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsOptionalType { span, type_ann } => { + let span = { >::fold_with(span, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsOptionalType { span, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsParamProp<'a> { + #[doc = "Calls [Fold`::fold_ts_param_prop`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_param_prop(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + let span = { >::fold_with(span, visitor) }; + let decorators = + { > as FoldWith>::fold_with(decorators, visitor) }; + let accessibility = + { as FoldWith>::fold_with(accessibility, visitor) }; + let param = { as FoldWith>::fold_with(param, visitor) }; + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [Fold`::fold_ts_param_prop_param`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_param_prop_param(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsParamPropParam::Ident { 0: _field_0 } + } + TsParamPropParam::Assign { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsParamPropParam::Assign { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [Fold`::fold_ts_parenthesized_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_parenthesized_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsParenthesizedType { span, type_ann } => { + let span = { >::fold_with(span, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsParenthesizedType { span, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [Fold`::fold_ts_property_signature`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_property_signature(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [Fold`::fold_ts_qualified_name`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_qualified_name(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsQualifiedName { span, left, right } => { + let span = { >::fold_with(span, visitor) }; + let left = { as FoldWith>::fold_with(left, visitor) }; + let right = { >::fold_with(right, visitor) }; + TsQualifiedName { span, left, right } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsRestType<'a> { + #[doc = "Calls [Fold`::fold_ts_rest_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_rest_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsRestType { span, type_ann } => { + let span = { >::fold_with(span, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsRestType { span, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [Fold`::fold_ts_satisfies_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_satisfies_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsSatisfiesExpr { + span, + expr, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [Fold`::fold_ts_setter_signature`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_setter_signature(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + let span = { >::fold_with(span, visitor) }; + let key = { as FoldWith>::fold_with(key, visitor) }; + let param = { as FoldWith>::fold_with(param, visitor) }; + TsSetterSignature { + span, + key, + computed, + param, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsThisType { + #[doc = "Calls [Fold`::fold_ts_this_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_this_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsThisType { span } => { + let span = { >::fold_with(span, visitor) }; + TsThisType { span } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [Fold`::fold_ts_this_type_or_ident`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_this_type_or_ident(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsThisTypeOrIdent::TsThisType { 0: _field_0 } + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsThisTypeOrIdent::Ident { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [Fold`::fold_ts_tpl_lit_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_tpl_lit_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + let span = { >::fold_with(span, visitor) }; + let types = { > as FoldWith>::fold_with(types, visitor) }; + let quasis = { as FoldWith>::fold_with(quasis, visitor) }; + TsTplLitType { + span, + types, + quasis, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [Fold`::fold_ts_tuple_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_tuple_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTupleElement { span, label, ty } => { + let span = { >::fold_with(span, visitor) }; + let label = { > as FoldWith>::fold_with(label, visitor) }; + let ty = { as FoldWith>::fold_with(ty, visitor) }; + TsTupleElement { span, label, ty } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTupleType<'a> { + #[doc = "Calls [Fold`::fold_ts_tuple_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_tuple_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTupleType { span, elem_types } => { + let span = { >::fold_with(span, visitor) }; + let elem_types = { + > as FoldWith>::fold_with(elem_types, visitor) + }; + TsTupleType { span, elem_types } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsType<'a> { + #[doc = "Calls [Fold`::fold_ts_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + let _field_0 = + as FoldWith>::fold_with(_field_0, visitor); + TsType::TsKeywordType { 0: _field_0 } + } + TsType::TsThisType { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + TsType::TsThisType { 0: _field_0 } + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + TsType::TsFnOrConstructorType { 0: _field_0 } + } + TsType::TsTypeRef { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTypeRef { 0: _field_0 } + } + TsType::TsTypeQuery { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTypeQuery { 0: _field_0 } + } + TsType::TsTypeLit { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTypeLit { 0: _field_0 } + } + TsType::TsArrayType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsArrayType { 0: _field_0 } + } + TsType::TsTupleType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTupleType { 0: _field_0 } + } + TsType::TsOptionalType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsOptionalType { 0: _field_0 } + } + TsType::TsRestType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsRestType { 0: _field_0 } + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + TsType::TsUnionOrIntersectionType { 0: _field_0 } + } + TsType::TsConditionalType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsConditionalType { 0: _field_0 } + } + TsType::TsInferType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsInferType { 0: _field_0 } + } + TsType::TsParenthesizedType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsParenthesizedType { 0: _field_0 } + } + TsType::TsTypeOperator { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTypeOperator { 0: _field_0 } + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsIndexedAccessType { 0: _field_0 } + } + TsType::TsMappedType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsMappedType { 0: _field_0 } + } + TsType::TsLitType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsLitType { 0: _field_0 } + } + TsType::TsTypePredicate { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsTypePredicate { 0: _field_0 } + } + TsType::TsImportType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsType::TsImportType { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_type_alias_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_alias_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let id = { >::fold_with(id, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [Fold`::fold_ts_type_ann`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_ann(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeAnn { span, type_ann } => { + let span = { >::fold_with(span, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsTypeAnn { span, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [Fold`::fold_ts_type_assertion`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_assertion(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let expr = { as FoldWith>::fold_with(expr, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsTypeAssertion { + span, + expr, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [Fold`::fold_ts_type_element`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_element(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with( + _field_0, visitor, + ); + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsPropertySignature { 0: _field_0 } + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsGetterSignature { 0: _field_0 } + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsSetterSignature { 0: _field_0 } + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsMethodSignature { 0: _field_0 } + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeElement::TsIndexSignature { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [Fold`::fold_ts_type_lit`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_lit(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeLit { span, members } => { + let span = { >::fold_with(span, visitor) }; + let members = + { > as FoldWith>::fold_with(members, visitor) }; + TsTypeLit { span, members } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [Fold`::fold_ts_type_operator`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_operator(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeOperator { span, op, type_ann } => { + let span = { >::fold_with(span, visitor) }; + let op = { >::fold_with(op, visitor) }; + let type_ann = { as FoldWith>::fold_with(type_ann, visitor) }; + TsTypeOperator { span, op, type_ann } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [Fold`::fold_ts_type_operator_op`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_operator_op(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeOperatorOp::KeyOf => TsTypeOperatorOp::KeyOf, + TsTypeOperatorOp::Unique => TsTypeOperatorOp::Unique, + TsTypeOperatorOp::ReadOnly => TsTypeOperatorOp::ReadOnly, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [Fold`::fold_ts_type_param`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_param(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + let span = { >::fold_with(span, visitor) }; + let name = { >::fold_with(name, visitor) }; + let constraint = + { > as FoldWith>::fold_with(constraint, visitor) }; + let default = { > as FoldWith>::fold_with(default, visitor) }; + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [Fold`::fold_ts_type_param_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_param_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeParamDecl { span, params } => { + let span = { >::fold_with(span, visitor) }; + let params = + { > as FoldWith>::fold_with(params, visitor) }; + TsTypeParamDecl { span, params } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeParamInstantiation<'a> { + #[doc = "Calls [Fold`::fold_ts_type_param_instantiation`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_param_instantiation(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeParamInstantiation { span, params } => { + let span = { >::fold_with(span, visitor) }; + let params = { > as FoldWith>::fold_with(params, visitor) }; + TsTypeParamInstantiation { span, params } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [Fold`::fold_ts_type_predicate`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_predicate(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + let span = { >::fold_with(span, visitor) }; + let param_name = + { as FoldWith>::fold_with(param_name, visitor) }; + let type_ann = { + >> as FoldWith>::fold_with(type_ann, visitor) + }; + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [Fold`::fold_ts_type_query`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_query(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + let span = { >::fold_with(span, visitor) }; + let expr_name = + { as FoldWith>::fold_with(expr_name, visitor) }; + let type_args = { + >> as FoldWith>::fold_with( + type_args, visitor, + ) + }; + TsTypeQuery { + span, + expr_name, + type_args, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [Fold`::fold_ts_type_query_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_query_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeQueryExpr::TsEntityName { 0: _field_0 } + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsTypeQueryExpr::Import { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [Fold`::fold_ts_type_ref`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_ref(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + let span = { >::fold_with(span, visitor) }; + let type_name = + { as FoldWith>::fold_with(type_name, visitor) }; + let type_params = { + >> as FoldWith>::fold_with( + type_params, + visitor, + ) + }; + TsTypeRef { + span, + type_name, + type_params, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsUnionOrIntersectionType<'a> { + #[doc = "Calls [Fold`::fold_ts_union_or_intersection_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_union_or_intersection_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + let _field_0 = + > as FoldWith>::fold_with(_field_0, visitor); + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for TsUnionType<'a> { + #[doc = "Calls [Fold`::fold_ts_union_type`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_union_type(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + TsUnionType { span, types } => { + let span = { >::fold_with(span, visitor) }; + let types = { > as FoldWith>::fold_with(types, visitor) }; + TsUnionType { span, types } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [Fold`::fold_unary_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_unary_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + UnaryExpr { span, op, arg } => { + let span = { >::fold_with(span, visitor) }; + let op = { >::fold_with(op, visitor) }; + let arg = { as FoldWith>::fold_with(arg, visitor) }; + UnaryExpr { span, op, arg } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [Fold`::fold_update_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_update_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + let span = { >::fold_with(span, visitor) }; + let op = { >::fold_with(op, visitor) }; + let arg = { as FoldWith>::fold_with(arg, visitor) }; + UpdateExpr { + span, + op, + prefix, + arg, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for UsingDecl<'a> { + #[doc = "Calls [Fold`::fold_using_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_using_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + let span = { >::fold_with(span, visitor) }; + let decls = + { > as FoldWith>::fold_with(decls, visitor) }; + UsingDecl { + span, + is_await, + decls, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for VarDecl<'a> { + #[doc = "Calls [Fold`::fold_var_decl`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_var_decl(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + let span = { >::fold_with(span, visitor) }; + let ctxt = { >::fold_with(ctxt, visitor) }; + let kind = { >::fold_with(kind, visitor) }; + let decls = + { > as FoldWith>::fold_with(decls, visitor) }; + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for VarDeclKind { + #[doc = "Calls [Fold`::fold_var_decl_kind`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_var_decl_kind(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + VarDeclKind::Var => VarDeclKind::Var, + VarDeclKind::Let => VarDeclKind::Let, + VarDeclKind::Const => VarDeclKind::Const, + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [Fold`::fold_var_decl_or_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_var_decl_or_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + let _field_0 = > as FoldWith>::fold_with(_field_0, visitor); + VarDeclOrExpr::VarDecl { 0: _field_0 } + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + let _field_0 = as FoldWith>::fold_with(_field_0, visitor); + VarDeclOrExpr::Expr { 0: _field_0 } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [Fold`::fold_var_declarator`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_var_declarator(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + let span = { >::fold_with(span, visitor) }; + let name = { as FoldWith>::fold_with(name, visitor) }; + let init = { > as FoldWith>::fold_with(init, visitor) }; + VarDeclarator { + span, + name, + init, + definite, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for WhileStmt<'a> { + #[doc = "Calls [Fold`::fold_while_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_while_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + WhileStmt { span, test, body } => { + let span = { >::fold_with(span, visitor) }; + let test = { as FoldWith>::fold_with(test, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + WhileStmt { span, test, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for WithStmt<'a> { + #[doc = "Calls [Fold`::fold_with_stmt`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_with_stmt(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + WithStmt { span, obj, body } => { + let span = { >::fold_with(span, visitor) }; + let obj = { as FoldWith>::fold_with(obj, visitor) }; + let body = { as FoldWith>::fold_with(body, visitor) }; + WithStmt { span, obj, body } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for YieldExpr<'a> { + #[doc = "Calls [Fold`::fold_yield_expr`] with `self`."] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_yield_expr(visitor, self) + } + + fn fold_children_with(self, visitor: &mut V) -> Self { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + let span = { >::fold_with(span, visitor) }; + let arg = { > as FoldWith>::fold_with(arg, visitor) }; + YieldExpr { + span, + arg, + delegate, + } + } + } + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for AssignOp { + #[doc = "Calls [Fold`::fold_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_assign_op(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for swc_atoms::Atom { + #[doc = "Calls [Fold`::fold_atom`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_atom(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BigIntValue { + #[doc = "Calls [Fold`::fold_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_big_int_value(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for BinaryOp { + #[doc = "Calls [Fold`::fold_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_binary_op(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ClassMember<'a>> { + #[doc = "Calls [Fold`::fold_class_members`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_class_members(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Decorator<'a>> { + #[doc = "Calls [Fold`::fold_decorators`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_decorators(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ExportSpecifier<'a>> { + #[doc = "Calls [Fold`::fold_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_export_specifiers(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ExprOrSpread<'a>> { + #[doc = "Calls [Fold`::fold_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_expr_or_spreads(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Expr<'a>> { + #[doc = "Calls [Fold`::fold_exprs`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_exprs(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ImportSpecifier<'a>> { + #[doc = "Calls [Fold`::fold_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_specifiers(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ImportWithItem> { + #[doc = "Calls [Fold`::fold_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_import_with_items(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + >::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, JSXAttrOrSpread<'a>> { + #[doc = "Calls [Fold`::fold_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_attr_or_spreads(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, JSXElementChild<'a>> { + #[doc = "Calls [Fold`::fold_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_jsx_element_childs(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ModuleItem<'a>> { + #[doc = "Calls [Fold`::fold_module_items`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_module_items(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ObjectPatProp<'a>> { + #[doc = "Calls [Fold`::fold_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_object_pat_props(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option { + #[doc = "Calls [Fold`::fold_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_accessibility(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| >::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option { + #[doc = "Calls [Fold`::fold_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_atom(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| >::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_block_stmt(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_catch_clause(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_expr(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_expr_or_spread(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option>> { + #[doc = "Calls [Fold`::fold_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_expr_or_spreads(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| > as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option { + #[doc = "Calls [Fold`::fold_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ident(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| >::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_jsx_attr_value(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_jsx_closing_element(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_module_export_name(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option>> { + #[doc = "Calls [Fold`::fold_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_object_lit(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| > as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_pat(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option { + #[doc = "Calls [Fold`::fold_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_span(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| >::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_stmt(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_str(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option { + #[doc = "Calls [Fold`::fold_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_true_plus_minus(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| >::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_entity_name(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_namespace_body(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_type(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option>> { + #[doc = "Calls [Fold`::fold_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_type_ann(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| > as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option>> { + #[doc = "Calls [Fold`::fold_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_type_param_decl(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| > as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option>> { + #[doc = "Calls [Fold`::fold_opt_ts_type_param_instantiation`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_ts_type_param_instantiation(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| { + > as FoldWith>::fold_with(inner, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Option> { + #[doc = "Calls [Fold`::fold_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_var_decl_or_expr(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self.map(|inner| as FoldWith>::fold_with(inner, visitor)) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [Fold`::fold_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_vec_expr_or_spreads(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + > as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [Fold`::fold_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_opt_vec_pats(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + > as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, ParamOrTsParamProp<'a>> { + #[doc = "Calls [Fold`::fold_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_param_or_ts_param_props(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Param<'a>> { + #[doc = "Calls [Fold`::fold_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_params(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Pat<'a>> { + #[doc = "Calls [Fold`::fold_pats`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_pats(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, PropOrSpread<'a>> { + #[doc = "Calls [Fold`::fold_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_prop_or_spreads(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for swc_common::Span { + #[doc = "Calls [Fold`::fold_span`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_span(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, Stmt<'a>> { + #[doc = "Calls [Fold`::fold_stmts`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_stmts(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, SwitchCase<'a>> { + #[doc = "Calls [Fold`::fold_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_switch_cases(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [Fold`::fold_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_syntax_context(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TplElement> { + #[doc = "Calls [Fold`::fold_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_tpl_elements(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + >::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsEnumMember<'a>> { + #[doc = "Calls [Fold`::fold_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_enum_members(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsExprWithTypeArgs<'a>> { + #[doc = "Calls [Fold`::fold_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_expr_with_type_argss(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsFnParam<'a>> { + #[doc = "Calls [Fold`::fold_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_fn_params(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsTupleElement<'a>> { + #[doc = "Calls [Fold`::fold_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_tuple_elements(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsTypeElement<'a>> { + #[doc = "Calls [Fold`::fold_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_elements(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsTypeParam<'a>> { + #[doc = "Calls [Fold`::fold_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_type_params(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, TsType<'a>> { + #[doc = "Calls [Fold`::fold_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_ts_types(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for UnaryOp { + #[doc = "Calls [Fold`::fold_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_unary_op(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for UpdateOp { + #[doc = "Calls [Fold`::fold_update_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_update_op(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + self + } +} +impl<'a, V: ?Sized + Fold<'a>> FoldWith<'a, V> for Vec<'a, VarDeclarator<'a>> { + #[doc = "Calls [Fold`::fold_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + ::fold_var_declarators(visitor, self) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + as FoldWith>::fold_with(item, visitor) + }) + } +} +impl<'a, V, T> FoldWith<'a, V> for Box<'a, T> +where + V: ?Sized + Fold<'a>, + T: FoldWith<'a, V>, +{ + #[inline] + fn fold_with(self, visitor: &mut V) -> Self { + swc_visit::util::map::Map::map(self, |inner| >::fold_with(inner, visitor)) + } + + #[inline] + fn fold_children_with(self, visitor: &mut V) -> Self { + swc_visit::util::map::Map::map(self, |inner| { + >::fold_children_with(inner, visitor) + }) + } +} +#[doc = r" A visitor trait for traversing the AST."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait FoldAstPath<'a> { + #[doc = "Visit a node of type `Accessibility`.\n\nBy default, this method calls \ + [`Accessibility::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_accessibility( + &mut self, + node: Accessibility, + __ast_path: &mut AstKindPath, + ) -> Accessibility { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ArrayLit < 'a >`.\n\nBy default, this method calls [`ArrayLit < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>, __ast_path: &mut AstKindPath) -> ArrayLit<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ArrayPat < 'a >`.\n\nBy default, this method calls [`ArrayPat < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>, __ast_path: &mut AstKindPath) -> ArrayPat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ArrowExpr < 'a >`.\n\nBy default, this method calls [`ArrowExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_arrow_expr( + &mut self, + node: ArrowExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ArrowExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignExpr < 'a >`.\n\nBy default, this method calls \ + [`AssignExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_assign_expr( + &mut self, + node: AssignExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignOp`.\n\nBy default, this method calls \ + [`AssignOp::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_assign_op(&mut self, node: AssignOp, __ast_path: &mut AstKindPath) -> AssignOp { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `AssignPat < 'a >`.\n\nBy default, this method calls [`AssignPat \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_assign_pat( + &mut self, + node: AssignPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignPatProp < 'a >`.\n\nBy default, this method calls \ + [`AssignPatProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_assign_pat_prop( + &mut self, + node: AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPatProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignProp < 'a >`.\n\nBy default, this method calls \ + [`AssignProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_assign_prop( + &mut self, + node: AssignProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTarget < 'a >`.\n\nBy default, this method calls \ + [`AssignTarget < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_assign_target( + &mut self, + node: AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTarget<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AssignTargetPat < 'a >`.\n\nBy default, this method calls \ + [`AssignTargetPat < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_assign_target_pat( + &mut self, + node: AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTargetPat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_atoms :: Atom`.\n\nBy default, this method calls \ + [`swc_atoms :: Atom::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_atom( + &mut self, + node: swc_atoms::Atom, + __ast_path: &mut AstKindPath, + ) -> swc_atoms::Atom { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AutoAccessor < 'a >`.\n\nBy default, this method calls \ + [`AutoAccessor < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_auto_accessor( + &mut self, + node: AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) -> AutoAccessor<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `AwaitExpr < 'a >`.\n\nBy default, this method calls [`AwaitExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_await_expr( + &mut self, + node: AwaitExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AwaitExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BigInt < 'a >`.\n\nBy default, this method calls [`BigInt < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>, __ast_path: &mut AstKindPath) -> BigInt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BigIntValue`.\n\nBy default, this method calls \ + [`BigIntValue::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_big_int_value( + &mut self, + node: BigIntValue, + __ast_path: &mut AstKindPath, + ) -> BigIntValue { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BinExpr < 'a >`.\n\nBy default, this method calls [`BinExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>, __ast_path: &mut AstKindPath) -> BinExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BinaryOp`.\n\nBy default, this method calls \ + [`BinaryOp::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp, __ast_path: &mut AstKindPath) -> BinaryOp { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BindingIdent < 'a >`.\n\nBy default, this method calls \ + [`BindingIdent < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_binding_ident( + &mut self, + node: BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> BindingIdent<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmt < 'a >`.\n\nBy default, this method calls [`BlockStmt \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_block_stmt( + &mut self, + node: BlockStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `BlockStmtOrExpr < 'a >`.\n\nBy default, this method calls \ + [`BlockStmtOrExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_block_stmt_or_expr( + &mut self, + node: BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmtOrExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Bool`.\n\nBy default, this method calls \ + [`Bool::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_bool(&mut self, node: Bool, __ast_path: &mut AstKindPath) -> Bool { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `BreakStmt`.\n\nBy default, this method calls \ + [`BreakStmt::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt, __ast_path: &mut AstKindPath) -> BreakStmt { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `CallExpr < 'a >`.\n\nBy default, this method calls [`CallExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>, __ast_path: &mut AstKindPath) -> CallExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Callee < 'a >`.\n\nBy default, this method calls [`Callee < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_callee(&mut self, node: Callee<'a>, __ast_path: &mut AstKindPath) -> Callee<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `CatchClause < 'a >`.\n\nBy default, this method calls \ + [`CatchClause < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_catch_clause( + &mut self, + node: CatchClause<'a>, + __ast_path: &mut AstKindPath, + ) -> CatchClause<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Class < 'a >`.\n\nBy default, this method calls [`Class < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_class(&mut self, node: Class<'a>, __ast_path: &mut AstKindPath) -> Class<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ClassDecl < 'a >`.\n\nBy default, this method calls [`ClassDecl \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_class_decl( + &mut self, + node: ClassDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassExpr < 'a >`.\n\nBy default, this method calls [`ClassExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_class_expr( + &mut self, + node: ClassExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMember < 'a >`.\n\nBy default, this method calls \ + [`ClassMember < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_class_member( + &mut self, + node: ClassMember<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMember<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ClassMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ClassMember < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_class_members( + &mut self, + node: Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ClassMember<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassMethod < 'a >`.\n\nBy default, this method calls \ + [`ClassMethod < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_class_method( + &mut self, + node: ClassMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMethod<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ClassProp < 'a >`.\n\nBy default, this method calls [`ClassProp \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_class_prop( + &mut self, + node: ClassProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ComputedPropName < 'a >`.\n\nBy default, this method calls \ + [`ComputedPropName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_computed_prop_name( + &mut self, + node: ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) -> ComputedPropName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `CondExpr < 'a >`.\n\nBy default, this method calls [`CondExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>, __ast_path: &mut AstKindPath) -> CondExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Constructor < 'a >`.\n\nBy default, this method calls \ + [`Constructor < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_constructor( + &mut self, + node: Constructor<'a>, + __ast_path: &mut AstKindPath, + ) -> Constructor<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ContinueStmt`.\n\nBy default, this method calls \ + [`ContinueStmt::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_continue_stmt( + &mut self, + node: ContinueStmt, + __ast_path: &mut AstKindPath, + ) -> ContinueStmt { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `DebuggerStmt`.\n\nBy default, this method calls \ + [`DebuggerStmt::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_debugger_stmt( + &mut self, + node: DebuggerStmt, + __ast_path: &mut AstKindPath, + ) -> DebuggerStmt { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Decl < 'a >`.\n\nBy default, this method calls [`Decl < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_decl(&mut self, node: Decl<'a>, __ast_path: &mut AstKindPath) -> Decl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Decorator < 'a >`.\n\nBy default, this method calls [`Decorator \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_decorator( + &mut self, + node: Decorator<'a>, + __ast_path: &mut AstKindPath, + ) -> Decorator<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Decorator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Decorator < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_decorators( + &mut self, + node: Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Decorator<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`DefaultDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_default_decl( + &mut self, + node: DefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> DefaultDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `DoWhileStmt < 'a >`.\n\nBy default, this method calls \ + [`DoWhileStmt < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_do_while_stmt( + &mut self, + node: DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> DoWhileStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `EmptyStmt`.\n\nBy default, this method calls \ + [`EmptyStmt::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt, __ast_path: &mut AstKindPath) -> EmptyStmt { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ExportAll < 'a >`.\n\nBy default, this method calls [`ExportAll \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_export_all( + &mut self, + node: ExportAll<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportAll<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_export_decl( + &mut self, + node: ExportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultDecl < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_export_default_decl( + &mut self, + node: ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultExpr < 'a >`.\n\nBy default, this method calls \ + [`ExportDefaultExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_export_default_expr( + &mut self, + node: ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ExportDefaultSpecifier::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultSpecifier { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportNamedSpecifier < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamedSpecifier<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportNamespaceSpecifier < 'a >`.\n\nBy default, this method \ + calls [`ExportNamespaceSpecifier < 'a >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamespaceSpecifier<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ExportSpecifier < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_export_specifier( + &mut self, + node: ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportSpecifier<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ExportSpecifier < 'a > >::fold_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExportSpecifier<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Expr < 'a >`.\n\nBy default, this method calls [`Expr < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_expr(&mut self, node: Expr<'a>, __ast_path: &mut AstKindPath) -> Expr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ExprOrSpread < 'a >`.\n\nBy default, this method calls \ + [`ExprOrSpread < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_expr_or_spread( + &mut self, + node: ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> ExprOrSpread<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ExprOrSpread < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExprOrSpread<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ExprStmt < 'a >`.\n\nBy default, this method calls [`ExprStmt < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>, __ast_path: &mut AstKindPath) -> ExprStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Expr < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Expr < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_exprs( + &mut self, + node: Vec<'a, Expr<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Expr<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `FnDecl < 'a >`.\n\nBy default, this method calls [`FnDecl < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>, __ast_path: &mut AstKindPath) -> FnDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `FnExpr < 'a >`.\n\nBy default, this method calls [`FnExpr < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>, __ast_path: &mut AstKindPath) -> FnExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ForHead < 'a >`.\n\nBy default, this method calls [`ForHead < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>, __ast_path: &mut AstKindPath) -> ForHead<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ForInStmt < 'a >`.\n\nBy default, this method calls [`ForInStmt \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_for_in_stmt( + &mut self, + node: ForInStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForInStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForOfStmt < 'a >`.\n\nBy default, this method calls [`ForOfStmt \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_for_of_stmt( + &mut self, + node: ForOfStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForOfStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ForStmt < 'a >`.\n\nBy default, this method calls [`ForStmt < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>, __ast_path: &mut AstKindPath) -> ForStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Function < 'a >`.\n\nBy default, this method calls [`Function < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_function(&mut self, node: Function<'a>, __ast_path: &mut AstKindPath) -> Function<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `GetterProp < 'a >`.\n\nBy default, this method calls \ + [`GetterProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_getter_prop( + &mut self, + node: GetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> GetterProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Ident`.\n\nBy default, this method calls \ + [`Ident::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ident(&mut self, node: Ident, __ast_path: &mut AstKindPath) -> Ident { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `IdentName`.\n\nBy default, this method calls \ + [`IdentName::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ident_name(&mut self, node: IdentName, __ast_path: &mut AstKindPath) -> IdentName { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `IfStmt < 'a >`.\n\nBy default, this method calls [`IfStmt < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>, __ast_path: &mut AstKindPath) -> IfStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Import`.\n\nBy default, this method calls \ + [`Import::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_import(&mut self, node: Import, __ast_path: &mut AstKindPath) -> Import { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ImportDecl < 'a >`.\n\nBy default, this method calls \ + [`ImportDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_import_decl( + &mut self, + node: ImportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportDefaultSpecifier`.\n\nBy default, this method calls \ + [`ImportDefaultSpecifier::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportDefaultSpecifier { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportNamedSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportNamedSpecifier < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportNamedSpecifier<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportPhase`.\n\nBy default, this method calls \ + [`ImportPhase::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_import_phase( + &mut self, + node: ImportPhase, + __ast_path: &mut AstKindPath, + ) -> ImportPhase { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ImportSpecifier < 'a >`.\n\nBy default, this method calls \ + [`ImportSpecifier < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_import_specifier( + &mut self, + node: ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportSpecifier<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportSpecifier < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ImportSpecifier < 'a > >::fold_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportSpecifier<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportStarAsSpecifier`.\n\nBy default, this method calls \ + [`ImportStarAsSpecifier::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportStarAsSpecifier { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWith < 'a >`.\n\nBy default, this method calls \ + [`ImportWith < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_import_with( + &mut self, + node: ImportWith<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportWith<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ImportWithItem`.\n\nBy default, this method calls \ + [`ImportWithItem::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_import_with_item( + &mut self, + node: ImportWithItem, + __ast_path: &mut AstKindPath, + ) -> ImportWithItem { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ImportWithItem >`.\n\nBy default, this method calls \ + [`Vec < 'a , ImportWithItem >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_import_with_items( + &mut self, + node: Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportWithItem> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Invalid`.\n\nBy default, this method calls \ + [`Invalid::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_invalid(&mut self, node: Invalid, __ast_path: &mut AstKindPath) -> Invalid { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `JSXAttr < 'a >`.\n\nBy default, this method calls [`JSXAttr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>, __ast_path: &mut AstKindPath) -> JSXAttr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `JSXAttrName < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_attr_name( + &mut self, + node: JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrOrSpread < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrOrSpread < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_attr_or_spread( + &mut self, + node: JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrOrSpread<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXAttrOrSpread < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXAttrOrSpread < 'a > >::fold_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXAttrValue < 'a >`.\n\nBy default, this method calls \ + [`JSXAttrValue < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_attr_value( + &mut self, + node: JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrValue<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingElement < 'a >`.\n\nBy default, this method calls \ + [`JSXClosingElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_jsx_closing_element( + &mut self, + node: JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXClosingElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXClosingFragment`.\n\nBy default, this method calls \ + [`JSXClosingFragment::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_closing_fragment( + &mut self, + node: JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) -> JSXClosingFragment { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElement < 'a >`.\n\nBy default, this method calls \ + [`JSXElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_element( + &mut self, + node: JSXElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElementChild < 'a >`.\n\nBy default, this method calls \ + [`JSXElementChild < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_element_child( + &mut self, + node: JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementChild<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , JSXElementChild < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , JSXElementChild < 'a > >::fold_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXElementChild<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXElementName < 'a >`.\n\nBy default, this method calls \ + [`JSXElementName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_element_name( + &mut self, + node: JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXEmptyExpr`.\n\nBy default, this method calls \ + [`JSXEmptyExpr::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_jsx_empty_expr( + &mut self, + node: JSXEmptyExpr, + __ast_path: &mut AstKindPath, + ) -> JSXEmptyExpr { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `JSXExpr < 'a >`.\n\nBy default, this method calls [`JSXExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>, __ast_path: &mut AstKindPath) -> JSXExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `JSXExprContainer < 'a >`.\n\nBy default, this method calls \ + [`JSXExprContainer < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_expr_container( + &mut self, + node: JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXExprContainer<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXFragment < 'a >`.\n\nBy default, this method calls \ + [`JSXFragment < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_fragment( + &mut self, + node: JSXFragment<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXFragment<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXMemberExpr < 'a >`.\n\nBy default, this method calls \ + [`JSXMemberExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_member_expr( + &mut self, + node: JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXMemberExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXNamespacedName`.\n\nBy default, this method calls \ + [`JSXNamespacedName::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_namespaced_name( + &mut self, + node: JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) -> JSXNamespacedName { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXObject < 'a >`.\n\nBy default, this method calls [`JSXObject \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_jsx_object( + &mut self, + node: JSXObject<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXObject<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningElement < 'a >`.\n\nBy default, this method calls \ + [`JSXOpeningElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_jsx_opening_element( + &mut self, + node: JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXOpeningFragment`.\n\nBy default, this method calls \ + [`JSXOpeningFragment::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_jsx_opening_fragment( + &mut self, + node: JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningFragment { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXSpreadChild < 'a >`.\n\nBy default, this method calls \ + [`JSXSpreadChild < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_jsx_spread_child( + &mut self, + node: JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXSpreadChild<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `JSXText`.\n\nBy default, this method calls \ + [`JSXText::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_jsx_text(&mut self, node: JSXText, __ast_path: &mut AstKindPath) -> JSXText { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Key < 'a >`.\n\nBy default, this method calls [`Key < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_key(&mut self, node: Key<'a>, __ast_path: &mut AstKindPath) -> Key<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `KeyValuePatProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValuePatProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_key_value_pat_prop( + &mut self, + node: KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValuePatProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `KeyValueProp < 'a >`.\n\nBy default, this method calls \ + [`KeyValueProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_key_value_prop( + &mut self, + node: KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValueProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `LabeledStmt < 'a >`.\n\nBy default, this method calls \ + [`LabeledStmt < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_labeled_stmt( + &mut self, + node: LabeledStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> LabeledStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Lit < 'a >`.\n\nBy default, this method calls [`Lit < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_lit(&mut self, node: Lit<'a>, __ast_path: &mut AstKindPath) -> Lit<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MemberExpr < 'a >`.\n\nBy default, this method calls \ + [`MemberExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_member_expr( + &mut self, + node: MemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MemberProp < 'a >`.\n\nBy default, this method calls \ + [`MemberProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_member_prop( + &mut self, + node: MemberProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `MetaPropExpr`.\n\nBy default, this method calls \ + [`MetaPropExpr::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_meta_prop_expr( + &mut self, + node: MetaPropExpr, + __ast_path: &mut AstKindPath, + ) -> MetaPropExpr { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MetaPropKind`.\n\nBy default, this method calls \ + [`MetaPropKind::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_meta_prop_kind( + &mut self, + node: MetaPropKind, + __ast_path: &mut AstKindPath, + ) -> MetaPropKind { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MethodKind`.\n\nBy default, this method calls \ + [`MethodKind::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_method_kind(&mut self, node: MethodKind, __ast_path: &mut AstKindPath) -> MethodKind { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `MethodProp < 'a >`.\n\nBy default, this method calls \ + [`MethodProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_method_prop( + &mut self, + node: MethodProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MethodProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Module < 'a >`.\n\nBy default, this method calls [`Module < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_module(&mut self, node: Module<'a>, __ast_path: &mut AstKindPath) -> Module<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`ModuleDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_module_decl( + &mut self, + node: ModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleExportName < 'a >`.\n\nBy default, this method calls \ + [`ModuleExportName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_module_export_name( + &mut self, + node: ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleExportName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ModuleItem < 'a >`.\n\nBy default, this method calls \ + [`ModuleItem < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_module_item( + &mut self, + node: ModuleItem<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleItem<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ModuleItem < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ModuleItem < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_module_items( + &mut self, + node: Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ModuleItem<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NamedExport < 'a >`.\n\nBy default, this method calls \ + [`NamedExport < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_named_export( + &mut self, + node: NamedExport<'a>, + __ast_path: &mut AstKindPath, + ) -> NamedExport<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `NewExpr < 'a >`.\n\nBy default, this method calls [`NewExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>, __ast_path: &mut AstKindPath) -> NewExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Null`.\n\nBy default, this method calls \ + [`Null::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_null(&mut self, node: Null, __ast_path: &mut AstKindPath) -> Null { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Number`.\n\nBy default, this method calls \ + [`Number::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_number(&mut self, node: Number, __ast_path: &mut AstKindPath) -> Number { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ObjectLit < 'a >`.\n\nBy default, this method calls [`ObjectLit \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_object_lit( + &mut self, + node: ObjectLit<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectLit<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPat < 'a >`.\n\nBy default, this method calls [`ObjectPat \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_object_pat( + &mut self, + node: ObjectPat<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ObjectPatProp < 'a >`.\n\nBy default, this method calls \ + [`ObjectPatProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_object_pat_prop( + &mut self, + node: ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPatProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ObjectPatProp < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , ObjectPatProp < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ObjectPatProp<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Accessibility >`.\n\nBy default, this method calls \ + [`Option < Accessibility >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_accessibility( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_atoms :: Atom >`.\n\nBy default, this method calls \ + [`Option < swc_atoms :: Atom >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_atom( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < BlockStmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < BlockStmt < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_block_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptCall < 'a >`.\n\nBy default, this method calls [`OptCall < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>, __ast_path: &mut AstKindPath) -> OptCall<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Option < CatchClause < 'a > >`.\n\nBy default, this method \ + calls [`Option < CatchClause < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_catch_clause( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainBase < 'a >`.\n\nBy default, this method calls \ + [`OptChainBase < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_chain_base( + &mut self, + node: OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainBase<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `OptChainExpr < 'a >`.\n\nBy default, this method calls \ + [`OptChainExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_chain_expr( + &mut self, + node: OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Expr < 'a > >`.\n\nBy default, this method calls \ + [`Option < Expr < 'a > >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < ExprOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Option < ExprOrSpread < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Vec < 'a , ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Vec < 'a , ExprOrSpread < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Ident >`.\n\nBy default, this method calls [`Option < \ + Ident >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_ident( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXAttrValue < 'a > >`.\n\nBy default, this method \ + calls [`Option < JSXAttrValue < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < JSXClosingElement < 'a > >`.\n\nBy default, this \ + method calls [`Option < JSXClosingElement < 'a > >::fold_children_with_ast_path`]. If \ + you want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < ModuleExportName < 'a > >`.\n\nBy default, this method \ + calls [`Option < ModuleExportName < 'a > >::fold_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , ObjectLit < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , ObjectLit < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Pat < 'a > >`.\n\nBy default, this method calls \ + [`Option < Pat < 'a > >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_pat( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < swc_common :: Span >`.\n\nBy default, this method \ + calls [`Option < swc_common :: Span >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_span( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Option < Stmt < 'a > >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_opt_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , Str > >`.\n\nBy default, this method calls \ + [`Option < Box < 'a , Str > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_str( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TruePlusMinus >`.\n\nBy default, this method calls \ + [`Option < TruePlusMinus >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_true_plus_minus( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsEntityName < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsEntityName < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsNamespaceBody < 'a > >`.\n\nBy default, this method \ + calls [`Option < TsNamespaceBody < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < TsType < 'a > >`.\n\nBy default, this method calls \ + [`Option < TsType < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_opt_ts_type( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeAnn < 'a > > >`.\n\nBy default, this \ + method calls [`Option < Box < 'a , TsTypeAnn < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamDecl < 'a > > >`.\n\nBy default, \ + this method calls [`Option < Box < 'a , TsTypeParamDecl < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Option < Box < 'a , TsTypeParamInstantiation < 'a > > >`.\n\nBy \ + default, this method calls [`Option < Box < 'a , TsTypeParamInstantiation < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < Self > > :: fold_children_with_ast_path (node , self , __ast_path) + } + #[doc = "Visit a node of type `Option < VarDeclOrExpr < 'a > >`.\n\nBy default, this method \ + calls [`Option < VarDeclOrExpr < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < ExprOrSpread < 'a > > >`.\n\nBy default, \ + this method calls [`Vec < 'a , Option < ExprOrSpread < 'a > > \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Option < Pat < 'a > > >`.\n\nBy default, this method \ + calls [`Vec < 'a , Option < Pat < 'a > > >::fold_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_opt_vec_pats( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + >> as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Param < 'a >`.\n\nBy default, this method calls [`Param < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_param(&mut self, node: Param<'a>, __ast_path: &mut AstKindPath) -> Param<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ParamOrTsParamProp < 'a >`.\n\nBy default, this method calls \ + [`ParamOrTsParamProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ParamOrTsParamProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , ParamOrTsParamProp < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , ParamOrTsParamProp < 'a > >::fold_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , Param < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Param < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_params( + &mut self, + node: Vec<'a, Param<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Param<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ParenExpr < 'a >`.\n\nBy default, this method calls [`ParenExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_paren_expr( + &mut self, + node: ParenExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ParenExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Pat < 'a >`.\n\nBy default, this method calls [`Pat < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_pat(&mut self, node: Pat<'a>, __ast_path: &mut AstKindPath) -> Pat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Pat < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Pat < 'a > >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_pats( + &mut self, + node: Vec<'a, Pat<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Pat<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateMethod < 'a >`.\n\nBy default, this method calls \ + [`PrivateMethod < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_private_method( + &mut self, + node: PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateMethod<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `PrivateName`.\n\nBy default, this method calls \ + [`PrivateName::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_private_name( + &mut self, + node: PrivateName, + __ast_path: &mut AstKindPath, + ) -> PrivateName { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `PrivateProp < 'a >`.\n\nBy default, this method calls \ + [`PrivateProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_private_prop( + &mut self, + node: PrivateProp<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Program < 'a >`.\n\nBy default, this method calls [`Program < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_program(&mut self, node: Program<'a>, __ast_path: &mut AstKindPath) -> Program<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Prop < 'a >`.\n\nBy default, this method calls [`Prop < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_prop(&mut self, node: Prop<'a>, __ast_path: &mut AstKindPath) -> Prop<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `PropName < 'a >`.\n\nBy default, this method calls [`PropName < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>, __ast_path: &mut AstKindPath) -> PropName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `PropOrSpread < 'a >`.\n\nBy default, this method calls \ + [`PropOrSpread < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_prop_or_spread( + &mut self, + node: PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> PropOrSpread<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , PropOrSpread < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , PropOrSpread < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, PropOrSpread<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Regex`.\n\nBy default, this method calls \ + [`Regex::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_regex(&mut self, node: Regex, __ast_path: &mut AstKindPath) -> Regex { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `RestPat < 'a >`.\n\nBy default, this method calls [`RestPat < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>, __ast_path: &mut AstKindPath) -> RestPat<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ReturnStmt < 'a >`.\n\nBy default, this method calls \ + [`ReturnStmt < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_return_stmt( + &mut self, + node: ReturnStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ReturnStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Script < 'a >`.\n\nBy default, this method calls [`Script < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_script(&mut self, node: Script<'a>, __ast_path: &mut AstKindPath) -> Script<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `SeqExpr < 'a >`.\n\nBy default, this method calls [`SeqExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>, __ast_path: &mut AstKindPath) -> SeqExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `SetterProp < 'a >`.\n\nBy default, this method calls \ + [`SetterProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_setter_prop( + &mut self, + node: SetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SetterProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SimpleAssignTarget < 'a >`.\n\nBy default, this method calls \ + [`SimpleAssignTarget < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> SimpleAssignTarget<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: Span`.\n\nBy default, this method calls \ + [`swc_common :: Span::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_span( + &mut self, + node: swc_common::Span, + __ast_path: &mut AstKindPath, + ) -> swc_common::Span { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SpreadElement < 'a >`.\n\nBy default, this method calls \ + [`SpreadElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_spread_element( + &mut self, + node: SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) -> SpreadElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `StaticBlock < 'a >`.\n\nBy default, this method calls \ + [`StaticBlock < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_static_block( + &mut self, + node: StaticBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> StaticBlock<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Stmt < 'a >`.\n\nBy default, this method calls [`Stmt < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>, __ast_path: &mut AstKindPath) -> Stmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , Stmt < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , Stmt < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_stmts( + &mut self, + node: Vec<'a, Stmt<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Stmt<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Str`.\n\nBy default, this method calls \ + [`Str::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_str(&mut self, node: Str, __ast_path: &mut AstKindPath) -> Str { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Super`.\n\nBy default, this method calls \ + [`Super::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_super(&mut self, node: Super, __ast_path: &mut AstKindPath) -> Super { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `SuperProp < 'a >`.\n\nBy default, this method calls [`SuperProp \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_super_prop( + &mut self, + node: SuperProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SuperPropExpr < 'a >`.\n\nBy default, this method calls \ + [`SuperPropExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_super_prop_expr( + &mut self, + node: SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperPropExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchCase < 'a >`.\n\nBy default, this method calls \ + [`SwitchCase < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_switch_case( + &mut self, + node: SwitchCase<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchCase<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , SwitchCase < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , SwitchCase < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_switch_cases( + &mut self, + node: Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, SwitchCase<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `SwitchStmt < 'a >`.\n\nBy default, this method calls \ + [`SwitchStmt < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_switch_stmt( + &mut self, + node: SwitchStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `swc_common :: SyntaxContext`.\n\nBy default, this method calls \ + [`swc_common :: SyntaxContext::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) -> swc_common::SyntaxContext { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TaggedTpl < 'a >`.\n\nBy default, this method calls [`TaggedTpl \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_tagged_tpl( + &mut self, + node: TaggedTpl<'a>, + __ast_path: &mut AstKindPath, + ) -> TaggedTpl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `ThisExpr`.\n\nBy default, this method calls \ + [`ThisExpr::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr, __ast_path: &mut AstKindPath) -> ThisExpr { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `ThrowStmt < 'a >`.\n\nBy default, this method calls [`ThrowStmt \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_throw_stmt( + &mut self, + node: ThrowStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ThrowStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Tpl < 'a >`.\n\nBy default, this method calls [`Tpl < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>, __ast_path: &mut AstKindPath) -> Tpl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TplElement`.\n\nBy default, this method calls \ + [`TplElement::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_tpl_element(&mut self, node: TplElement, __ast_path: &mut AstKindPath) -> TplElement { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `Vec < 'a , TplElement >`.\n\nBy default, this method calls \ + [`Vec < 'a , TplElement >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_tpl_elements( + &mut self, + node: Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TplElement> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TruePlusMinus`.\n\nBy default, this method calls \ + [`TruePlusMinus::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_true_plus_minus( + &mut self, + node: TruePlusMinus, + __ast_path: &mut AstKindPath, + ) -> TruePlusMinus { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TryStmt < 'a >`.\n\nBy default, this method calls [`TryStmt < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>, __ast_path: &mut AstKindPath) -> TryStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsArrayType < 'a >`.\n\nBy default, this method calls \ + [`TsArrayType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_array_type( + &mut self, + node: TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsArrayType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsAsExpr < 'a >`.\n\nBy default, this method calls [`TsAsExpr < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_as_expr( + &mut self, + node: TsAsExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsAsExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsCallSignatureDecl < 'a >`.\n\nBy default, this method calls \ + [`TsCallSignatureDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsCallSignatureDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConditionalType < 'a >`.\n\nBy default, this method calls \ + [`TsConditionalType < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_conditional_type( + &mut self, + node: TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConditionalType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsConstAssertion < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_const_assertion( + &mut self, + node: TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstAssertion<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstructSignatureDecl < 'a >`.\n\nBy default, this method \ + calls [`TsConstructSignatureDecl < 'a >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructSignatureDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsConstructorType < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_constructor_type( + &mut self, + node: TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructorType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEntityName < 'a >`.\n\nBy default, this method calls \ + [`TsEntityName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_entity_name( + &mut self, + node: TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEntityName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumDecl < 'a >`.\n\nBy default, this method calls \ + [`TsEnumDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_enum_decl( + &mut self, + node: TsEnumDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMember < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMember < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_enum_member( + &mut self, + node: TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMember<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsEnumMemberId < 'a >`.\n\nBy default, this method calls \ + [`TsEnumMemberId < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_enum_member_id( + &mut self, + node: TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMemberId<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsEnumMember < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsEnumMember < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsEnumMember<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExportAssignment < 'a >`.\n\nBy default, this method calls \ + [`TsExportAssignment < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExportAssignment<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExprWithTypeArgs < 'a >`.\n\nBy default, this method calls \ + [`TsExprWithTypeArgs < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExprWithTypeArgs<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsExprWithTypeArgs < 'a > >`.\n\nBy default, this \ + method calls [`Vec < 'a , TsExprWithTypeArgs < 'a > >::fold_children_with_ast_path`]. \ + If you want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsExternalModuleRef`.\n\nBy default, this method calls \ + [`TsExternalModuleRef::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_external_module_ref( + &mut self, + node: TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) -> TsExternalModuleRef { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnOrConstructorType < 'a >`.\n\nBy default, this method calls \ + [`TsFnOrConstructorType < 'a >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnOrConstructorType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnParam < 'a >`.\n\nBy default, this method calls [`TsFnParam \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_fn_param( + &mut self, + node: TsFnParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnParam<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsFnParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsFnParam < 'a > >::fold_children_with_ast_path`]. If you want to \ + recurse, you need to call it manually."] + #[inline] + fn fold_ts_fn_params( + &mut self, + node: Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsFnParam<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsFnType < 'a >`.\n\nBy default, this method calls [`TsFnType < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_fn_type( + &mut self, + node: TsFnType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsGetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsGetterSignature < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_getter_signature( + &mut self, + node: TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsGetterSignature<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportEqualsDecl < 'a >`.\n\nBy default, this method calls \ + [`TsImportEqualsDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportEqualsDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsImportType < 'a >`.\n\nBy default, this method calls \ + [`TsImportType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_import_type( + &mut self, + node: TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexSignature < 'a >`.\n\nBy default, this method calls \ + [`TsIndexSignature < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_index_signature( + &mut self, + node: TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexSignature<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIndexedAccessType < 'a >`.\n\nBy default, this method calls \ + [`TsIndexedAccessType < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexedAccessType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInferType < 'a >`.\n\nBy default, this method calls \ + [`TsInferType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_infer_type( + &mut self, + node: TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInferType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInstantiation < 'a >`.\n\nBy default, this method calls \ + [`TsInstantiation < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_instantiation( + &mut self, + node: TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInstantiation<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceBody < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_interface_body( + &mut self, + node: TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceBody<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsInterfaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsInterfaceDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_interface_decl( + &mut self, + node: TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsIntersectionType < 'a >`.\n\nBy default, this method calls \ + [`TsIntersectionType < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIntersectionType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordType`.\n\nBy default, this method calls \ + [`TsKeywordType::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_ts_keyword_type( + &mut self, + node: TsKeywordType, + __ast_path: &mut AstKindPath, + ) -> TsKeywordType { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsKeywordTypeKind`.\n\nBy default, this method calls \ + [`TsKeywordTypeKind::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_keyword_type_kind( + &mut self, + node: TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) -> TsKeywordTypeKind { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsLit < 'a >`.\n\nBy default, this method calls [`TsLit < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>, __ast_path: &mut AstKindPath) -> TsLit<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsLitType < 'a >`.\n\nBy default, this method calls [`TsLitType \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_lit_type( + &mut self, + node: TsLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsLitType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMappedType < 'a >`.\n\nBy default, this method calls \ + [`TsMappedType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_mapped_type( + &mut self, + node: TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMappedType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsMethodSignature < 'a >`.\n\nBy default, this method calls \ + [`TsMethodSignature < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_method_signature( + &mut self, + node: TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMethodSignature<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleBlock < 'a >`.\n\nBy default, this method calls \ + [`TsModuleBlock < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_module_block( + &mut self, + node: TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleBlock<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleDecl < 'a >`.\n\nBy default, this method calls \ + [`TsModuleDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_module_decl( + &mut self, + node: TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleName < 'a >`.\n\nBy default, this method calls \ + [`TsModuleName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_module_name( + &mut self, + node: TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsModuleRef < 'a >`.\n\nBy default, this method calls \ + [`TsModuleRef < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_module_ref( + &mut self, + node: TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleRef<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceBody < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceBody < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_namespace_body( + &mut self, + node: TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceBody<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceDecl < 'a >`.\n\nBy default, this method calls \ + [`TsNamespaceDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_namespace_decl( + &mut self, + node: TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNamespaceExportDecl`.\n\nBy default, this method calls \ + [`TsNamespaceExportDecl::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceExportDecl { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsNonNullExpr < 'a >`.\n\nBy default, this method calls \ + [`TsNonNullExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_non_null_expr( + &mut self, + node: TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNonNullExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsOptionalType < 'a >`.\n\nBy default, this method calls \ + [`TsOptionalType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_optional_type( + &mut self, + node: TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsOptionalType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamProp < 'a >`.\n\nBy default, this method calls \ + [`TsParamProp < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_param_prop( + &mut self, + node: TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamProp<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParamPropParam < 'a >`.\n\nBy default, this method calls \ + [`TsParamPropParam < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_param_prop_param( + &mut self, + node: TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamPropParam<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsParenthesizedType < 'a >`.\n\nBy default, this method calls \ + [`TsParenthesizedType < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParenthesizedType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsPropertySignature < 'a >`.\n\nBy default, this method calls \ + [`TsPropertySignature < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsPropertySignature<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsQualifiedName < 'a >`.\n\nBy default, this method calls \ + [`TsQualifiedName < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_qualified_name( + &mut self, + node: TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsQualifiedName<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsRestType < 'a >`.\n\nBy default, this method calls \ + [`TsRestType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_rest_type( + &mut self, + node: TsRestType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsRestType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSatisfiesExpr < 'a >`.\n\nBy default, this method calls \ + [`TsSatisfiesExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_satisfies_expr( + &mut self, + node: TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSatisfiesExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsSetterSignature < 'a >`.\n\nBy default, this method calls \ + [`TsSetterSignature < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_setter_signature( + &mut self, + node: TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSetterSignature<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsThisType`.\n\nBy default, this method calls \ + [`TsThisType::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType, __ast_path: &mut AstKindPath) -> TsThisType { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsThisTypeOrIdent < 'a >`.\n\nBy default, this method calls \ + [`TsThisTypeOrIdent < 'a >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_this_type_or_ident( + &mut self, + node: TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> TsThisTypeOrIdent<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTplLitType < 'a >`.\n\nBy default, this method calls \ + [`TsTplLitType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_tpl_lit_type( + &mut self, + node: TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTplLitType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleElement < 'a >`.\n\nBy default, this method calls \ + [`TsTupleElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_tuple_element( + &mut self, + node: TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTupleElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTupleElement < 'a > >::fold_children_with_ast_path`]. If you \ + want to recurse, you need to call it manually."] + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTupleElement<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTupleType < 'a >`.\n\nBy default, this method calls \ + [`TsTupleType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_tuple_type( + &mut self, + node: TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsType < 'a >`.\n\nBy default, this method calls [`TsType < 'a \ + >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>, __ast_path: &mut AstKindPath) -> TsType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `TsTypeAliasDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAliasDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_alias_decl( + &mut self, + node: TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAliasDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAnn < 'a >`.\n\nBy default, this method calls [`TsTypeAnn \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_type_ann( + &mut self, + node: TsTypeAnn<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAnn<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeAssertion < 'a >`.\n\nBy default, this method calls \ + [`TsTypeAssertion < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_assertion( + &mut self, + node: TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAssertion<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeElement < 'a >`.\n\nBy default, this method calls \ + [`TsTypeElement < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_element( + &mut self, + node: TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeElement<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeElement < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeElement < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeElement<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeLit < 'a >`.\n\nBy default, this method calls [`TsTypeLit \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_type_lit( + &mut self, + node: TsTypeLit<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeLit<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperator < 'a >`.\n\nBy default, this method calls \ + [`TsTypeOperator < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_operator( + &mut self, + node: TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperator<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeOperatorOp`.\n\nBy default, this method calls \ + [`TsTypeOperatorOp::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_type_operator_op( + &mut self, + node: TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperatorOp { + >::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParam < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParam < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_type_param( + &mut self, + node: TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParam<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamDecl < 'a >`.\n\nBy default, this method calls \ + [`TsTypeParamDecl < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_param_decl( + &mut self, + node: TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeParamInstantiation < 'a >`.\n\nBy default, this method \ + calls [`TsTypeParamInstantiation < 'a >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamInstantiation<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsTypeParam < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , TsTypeParam < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_type_params( + &mut self, + node: Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeParam<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypePredicate < 'a >`.\n\nBy default, this method calls \ + [`TsTypePredicate < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_predicate( + &mut self, + node: TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypePredicate<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQuery < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQuery < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_type_query( + &mut self, + node: TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQuery<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeQueryExpr < 'a >`.\n\nBy default, this method calls \ + [`TsTypeQueryExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_ts_type_query_expr( + &mut self, + node: TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQueryExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsTypeRef < 'a >`.\n\nBy default, this method calls [`TsTypeRef \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_ts_type_ref( + &mut self, + node: TsTypeRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeRef<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , TsType < 'a > >`.\n\nBy default, this method calls \ + [`Vec < 'a , TsType < 'a > >::fold_children_with_ast_path`]. If you want to recurse, \ + you need to call it manually."] + #[inline] + fn fold_ts_types( + &mut self, + node: Vec<'a, TsType<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsType<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsUnionOrIntersectionType < 'a >`.\n\nBy default, this method \ + calls [`TsUnionOrIntersectionType < 'a >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionOrIntersectionType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `TsUnionType < 'a >`.\n\nBy default, this method calls \ + [`TsUnionType < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_ts_union_type( + &mut self, + node: TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionType<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryExpr < 'a >`.\n\nBy default, this method calls [`UnaryExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_unary_expr( + &mut self, + node: UnaryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UnaryExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UnaryOp`.\n\nBy default, this method calls \ + [`UnaryOp::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp, __ast_path: &mut AstKindPath) -> UnaryOp { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `UpdateExpr < 'a >`.\n\nBy default, this method calls \ + [`UpdateExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need \ + to call it manually."] + #[inline] + fn fold_update_expr( + &mut self, + node: UpdateExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UpdateExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `UpdateOp`.\n\nBy default, this method calls \ + [`UpdateOp::fold_children_with_ast_path`]. If you want to recurse, you need to call \ + it manually."] + #[inline] + fn fold_update_op(&mut self, node: UpdateOp, __ast_path: &mut AstKindPath) -> UpdateOp { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `UsingDecl < 'a >`.\n\nBy default, this method calls [`UsingDecl \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_using_decl( + &mut self, + node: UsingDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> UsingDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDecl < 'a >`.\n\nBy default, this method calls [`VarDecl < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>, __ast_path: &mut AstKindPath) -> VarDecl<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `VarDeclKind`.\n\nBy default, this method calls \ + [`VarDeclKind::fold_children_with_ast_path`]. If you want to recurse, you need to \ + call it manually."] + #[inline] + fn fold_var_decl_kind( + &mut self, + node: VarDeclKind, + __ast_path: &mut AstKindPath, + ) -> VarDeclKind { + >::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `VarDeclOrExpr < 'a >`.\n\nBy default, this method calls \ + [`VarDeclOrExpr < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_var_decl_or_expr( + &mut self, + node: VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclOrExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `VarDeclarator < 'a >`.\n\nBy default, this method calls \ + [`VarDeclarator < 'a >::fold_children_with_ast_path`]. If you want to recurse, you \ + need to call it manually."] + #[inline] + fn fold_var_declarator( + &mut self, + node: VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclarator<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `Vec < 'a , VarDeclarator < 'a > >`.\n\nBy default, this method \ + calls [`Vec < 'a , VarDeclarator < 'a > >::fold_children_with_ast_path`]. If you want \ + to recurse, you need to call it manually."] + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, VarDeclarator<'a>> { + > as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WhileStmt < 'a >`.\n\nBy default, this method calls [`WhileStmt \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_while_stmt( + &mut self, + node: WhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> WhileStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } + #[doc = "Visit a node of type `WithStmt < 'a >`.\n\nBy default, this method calls [`WithStmt < \ + 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>, __ast_path: &mut AstKindPath) -> WithStmt<'a> { + as FoldWithAstPath>::fold_children_with_ast_path(node, self, __ast_path) + } + #[doc = "Visit a node of type `YieldExpr < 'a >`.\n\nBy default, this method calls [`YieldExpr \ + < 'a >::fold_children_with_ast_path`]. If you want to recurse, you need to call it \ + manually."] + #[inline] + fn fold_yield_expr( + &mut self, + node: YieldExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> YieldExpr<'a> { + as FoldWithAstPath>::fold_children_with_ast_path( + node, self, __ast_path, + ) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> FoldAstPath<'a> for &mut V +where + V: ?Sized + FoldAstPath<'a>, +{ + #[inline] + fn fold_accessibility( + &mut self, + node: Accessibility, + __ast_path: &mut AstKindPath, + ) -> Accessibility { + ::fold_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>, __ast_path: &mut AstKindPath) -> ArrayLit<'a> { + ::fold_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>, __ast_path: &mut AstKindPath) -> ArrayPat<'a> { + ::fold_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_arrow_expr( + &mut self, + node: ArrowExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ArrowExpr<'a> { + ::fold_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_expr( + &mut self, + node: AssignExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignExpr<'a> { + ::fold_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp, __ast_path: &mut AstKindPath) -> AssignOp { + ::fold_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_pat( + &mut self, + node: AssignPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPat<'a> { + ::fold_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_pat_prop( + &mut self, + node: AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPatProp<'a> { + ::fold_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_prop( + &mut self, + node: AssignProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignProp<'a> { + ::fold_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_target( + &mut self, + node: AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTarget<'a> { + ::fold_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_target_pat( + &mut self, + node: AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTargetPat<'a> { + ::fold_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_atom( + &mut self, + node: swc_atoms::Atom, + __ast_path: &mut AstKindPath, + ) -> swc_atoms::Atom { + ::fold_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_auto_accessor( + &mut self, + node: AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) -> AutoAccessor<'a> { + ::fold_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_await_expr( + &mut self, + node: AwaitExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AwaitExpr<'a> { + ::fold_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>, __ast_path: &mut AstKindPath) -> BigInt<'a> { + ::fold_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_big_int_value( + &mut self, + node: BigIntValue, + __ast_path: &mut AstKindPath, + ) -> BigIntValue { + ::fold_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>, __ast_path: &mut AstKindPath) -> BinExpr<'a> { + ::fold_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp, __ast_path: &mut AstKindPath) -> BinaryOp { + ::fold_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_binding_ident( + &mut self, + node: BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> BindingIdent<'a> { + ::fold_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_block_stmt( + &mut self, + node: BlockStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmt<'a> { + ::fold_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_block_stmt_or_expr( + &mut self, + node: BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmtOrExpr<'a> { + ::fold_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_bool(&mut self, node: Bool, __ast_path: &mut AstKindPath) -> Bool { + ::fold_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt, __ast_path: &mut AstKindPath) -> BreakStmt { + ::fold_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>, __ast_path: &mut AstKindPath) -> CallExpr<'a> { + ::fold_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>, __ast_path: &mut AstKindPath) -> Callee<'a> { + ::fold_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_catch_clause( + &mut self, + node: CatchClause<'a>, + __ast_path: &mut AstKindPath, + ) -> CatchClause<'a> { + ::fold_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>, __ast_path: &mut AstKindPath) -> Class<'a> { + ::fold_class(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_decl( + &mut self, + node: ClassDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassDecl<'a> { + ::fold_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_expr( + &mut self, + node: ClassExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassExpr<'a> { + ::fold_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_member( + &mut self, + node: ClassMember<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMember<'a> { + ::fold_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_members( + &mut self, + node: Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ClassMember<'a>> { + ::fold_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_method( + &mut self, + node: ClassMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMethod<'a> { + ::fold_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_prop( + &mut self, + node: ClassProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassProp<'a> { + ::fold_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_computed_prop_name( + &mut self, + node: ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) -> ComputedPropName<'a> { + ::fold_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>, __ast_path: &mut AstKindPath) -> CondExpr<'a> { + ::fold_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_constructor( + &mut self, + node: Constructor<'a>, + __ast_path: &mut AstKindPath, + ) -> Constructor<'a> { + ::fold_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_continue_stmt( + &mut self, + node: ContinueStmt, + __ast_path: &mut AstKindPath, + ) -> ContinueStmt { + ::fold_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_debugger_stmt( + &mut self, + node: DebuggerStmt, + __ast_path: &mut AstKindPath, + ) -> DebuggerStmt { + ::fold_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>, __ast_path: &mut AstKindPath) -> Decl<'a> { + ::fold_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decorator( + &mut self, + node: Decorator<'a>, + __ast_path: &mut AstKindPath, + ) -> Decorator<'a> { + ::fold_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decorators( + &mut self, + node: Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Decorator<'a>> { + ::fold_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_default_decl( + &mut self, + node: DefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> DefaultDecl<'a> { + ::fold_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_do_while_stmt( + &mut self, + node: DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> DoWhileStmt<'a> { + ::fold_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt, __ast_path: &mut AstKindPath) -> EmptyStmt { + ::fold_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_all( + &mut self, + node: ExportAll<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportAll<'a> { + ::fold_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_decl( + &mut self, + node: ExportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDecl<'a> { + ::fold_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_decl( + &mut self, + node: ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultDecl<'a> { + ::fold_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_expr( + &mut self, + node: ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultExpr<'a> { + ::fold_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultSpecifier { + ::fold_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamedSpecifier<'a> { + ::fold_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamespaceSpecifier<'a> { + ::fold_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_specifier( + &mut self, + node: ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportSpecifier<'a> { + ::fold_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExportSpecifier<'a>> { + ::fold_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>, __ast_path: &mut AstKindPath) -> Expr<'a> { + ::fold_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_or_spread( + &mut self, + node: ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> ExprOrSpread<'a> { + ::fold_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExprOrSpread<'a>> { + ::fold_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>, __ast_path: &mut AstKindPath) -> ExprStmt<'a> { + ::fold_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_exprs( + &mut self, + node: Vec<'a, Expr<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Expr<'a>> { + ::fold_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>, __ast_path: &mut AstKindPath) -> FnDecl<'a> { + ::fold_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>, __ast_path: &mut AstKindPath) -> FnExpr<'a> { + ::fold_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>, __ast_path: &mut AstKindPath) -> ForHead<'a> { + ::fold_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_in_stmt( + &mut self, + node: ForInStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForInStmt<'a> { + ::fold_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_of_stmt( + &mut self, + node: ForOfStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForOfStmt<'a> { + ::fold_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>, __ast_path: &mut AstKindPath) -> ForStmt<'a> { + ::fold_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>, __ast_path: &mut AstKindPath) -> Function<'a> { + ::fold_function(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_getter_prop( + &mut self, + node: GetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> GetterProp<'a> { + ::fold_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ident(&mut self, node: Ident, __ast_path: &mut AstKindPath) -> Ident { + ::fold_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName, __ast_path: &mut AstKindPath) -> IdentName { + ::fold_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>, __ast_path: &mut AstKindPath) -> IfStmt<'a> { + ::fold_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import(&mut self, node: Import, __ast_path: &mut AstKindPath) -> Import { + ::fold_import(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_decl( + &mut self, + node: ImportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportDecl<'a> { + ::fold_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportDefaultSpecifier { + ::fold_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportNamedSpecifier<'a> { + ::fold_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_phase( + &mut self, + node: ImportPhase, + __ast_path: &mut AstKindPath, + ) -> ImportPhase { + ::fold_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_specifier( + &mut self, + node: ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportSpecifier<'a> { + ::fold_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportSpecifier<'a>> { + ::fold_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportStarAsSpecifier { + ::fold_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with( + &mut self, + node: ImportWith<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportWith<'a> { + ::fold_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with_item( + &mut self, + node: ImportWithItem, + __ast_path: &mut AstKindPath, + ) -> ImportWithItem { + ::fold_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with_items( + &mut self, + node: Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportWithItem> { + ::fold_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid, __ast_path: &mut AstKindPath) -> Invalid { + ::fold_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>, __ast_path: &mut AstKindPath) -> JSXAttr<'a> { + ::fold_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_name( + &mut self, + node: JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrName<'a> { + ::fold_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_or_spread( + &mut self, + node: JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrOrSpread<'a> { + ::fold_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + ::fold_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_value( + &mut self, + node: JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrValue<'a> { + ::fold_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_closing_element( + &mut self, + node: JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXClosingElement<'a> { + ::fold_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_closing_fragment( + &mut self, + node: JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) -> JSXClosingFragment { + ::fold_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element( + &mut self, + node: JSXElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElement<'a> { + ::fold_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_child( + &mut self, + node: JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementChild<'a> { + ::fold_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXElementChild<'a>> { + ::fold_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_name( + &mut self, + node: JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementName<'a> { + ::fold_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_empty_expr( + &mut self, + node: JSXEmptyExpr, + __ast_path: &mut AstKindPath, + ) -> JSXEmptyExpr { + ::fold_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>, __ast_path: &mut AstKindPath) -> JSXExpr<'a> { + ::fold_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_expr_container( + &mut self, + node: JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXExprContainer<'a> { + ::fold_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_fragment( + &mut self, + node: JSXFragment<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXFragment<'a> { + ::fold_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_member_expr( + &mut self, + node: JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXMemberExpr<'a> { + ::fold_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_namespaced_name( + &mut self, + node: JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) -> JSXNamespacedName { + ::fold_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_object( + &mut self, + node: JSXObject<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXObject<'a> { + ::fold_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_opening_element( + &mut self, + node: JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningElement<'a> { + ::fold_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_opening_fragment( + &mut self, + node: JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningFragment { + ::fold_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_spread_child( + &mut self, + node: JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXSpreadChild<'a> { + ::fold_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText, __ast_path: &mut AstKindPath) -> JSXText { + ::fold_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>, __ast_path: &mut AstKindPath) -> Key<'a> { + ::fold_key(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key_value_pat_prop( + &mut self, + node: KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValuePatProp<'a> { + ::fold_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key_value_prop( + &mut self, + node: KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValueProp<'a> { + ::fold_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_labeled_stmt( + &mut self, + node: LabeledStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> LabeledStmt<'a> { + ::fold_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>, __ast_path: &mut AstKindPath) -> Lit<'a> { + ::fold_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_member_expr( + &mut self, + node: MemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberExpr<'a> { + ::fold_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_member_prop( + &mut self, + node: MemberProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberProp<'a> { + ::fold_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_meta_prop_expr( + &mut self, + node: MetaPropExpr, + __ast_path: &mut AstKindPath, + ) -> MetaPropExpr { + ::fold_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_meta_prop_kind( + &mut self, + node: MetaPropKind, + __ast_path: &mut AstKindPath, + ) -> MetaPropKind { + ::fold_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind, __ast_path: &mut AstKindPath) -> MethodKind { + ::fold_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_method_prop( + &mut self, + node: MethodProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MethodProp<'a> { + ::fold_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>, __ast_path: &mut AstKindPath) -> Module<'a> { + ::fold_module(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_decl( + &mut self, + node: ModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleDecl<'a> { + ::fold_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_export_name( + &mut self, + node: ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleExportName<'a> { + ::fold_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_item( + &mut self, + node: ModuleItem<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleItem<'a> { + ::fold_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_items( + &mut self, + node: Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ModuleItem<'a>> { + ::fold_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_named_export( + &mut self, + node: NamedExport<'a>, + __ast_path: &mut AstKindPath, + ) -> NamedExport<'a> { + ::fold_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>, __ast_path: &mut AstKindPath) -> NewExpr<'a> { + ::fold_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_null(&mut self, node: Null, __ast_path: &mut AstKindPath) -> Null { + ::fold_null(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_number(&mut self, node: Number, __ast_path: &mut AstKindPath) -> Number { + ::fold_number(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_lit( + &mut self, + node: ObjectLit<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectLit<'a> { + ::fold_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat( + &mut self, + node: ObjectPat<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPat<'a> { + ::fold_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat_prop( + &mut self, + node: ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPatProp<'a> { + ::fold_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ObjectPatProp<'a>> { + ::fold_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_accessibility( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_atom( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_block_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>, __ast_path: &mut AstKindPath) -> OptCall<'a> { + ::fold_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_catch_clause( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_chain_base( + &mut self, + node: OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainBase<'a> { + ::fold_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_chain_expr( + &mut self, + node: OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainExpr<'a> { + ::fold_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ident( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_pat( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_span( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_str( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_true_plus_minus( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_vec_pats( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>, __ast_path: &mut AstKindPath) -> Param<'a> { + ::fold_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ParamOrTsParamProp<'a> { + ::fold_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + ::fold_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_params( + &mut self, + node: Vec<'a, Param<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Param<'a>> { + ::fold_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_paren_expr( + &mut self, + node: ParenExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ParenExpr<'a> { + ::fold_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>, __ast_path: &mut AstKindPath) -> Pat<'a> { + ::fold_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_pats( + &mut self, + node: Vec<'a, Pat<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Pat<'a>> { + ::fold_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_method( + &mut self, + node: PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateMethod<'a> { + ::fold_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_name( + &mut self, + node: PrivateName, + __ast_path: &mut AstKindPath, + ) -> PrivateName { + ::fold_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_prop( + &mut self, + node: PrivateProp<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateProp<'a> { + ::fold_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>, __ast_path: &mut AstKindPath) -> Program<'a> { + ::fold_program(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>, __ast_path: &mut AstKindPath) -> Prop<'a> { + ::fold_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>, __ast_path: &mut AstKindPath) -> PropName<'a> { + ::fold_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_or_spread( + &mut self, + node: PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> PropOrSpread<'a> { + ::fold_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, PropOrSpread<'a>> { + ::fold_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_regex(&mut self, node: Regex, __ast_path: &mut AstKindPath) -> Regex { + ::fold_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>, __ast_path: &mut AstKindPath) -> RestPat<'a> { + ::fold_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_return_stmt( + &mut self, + node: ReturnStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ReturnStmt<'a> { + ::fold_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>, __ast_path: &mut AstKindPath) -> Script<'a> { + ::fold_script(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>, __ast_path: &mut AstKindPath) -> SeqExpr<'a> { + ::fold_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_setter_prop( + &mut self, + node: SetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SetterProp<'a> { + ::fold_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> SimpleAssignTarget<'a> { + ::fold_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_span( + &mut self, + node: swc_common::Span, + __ast_path: &mut AstKindPath, + ) -> swc_common::Span { + ::fold_span(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_spread_element( + &mut self, + node: SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) -> SpreadElement<'a> { + ::fold_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_static_block( + &mut self, + node: StaticBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> StaticBlock<'a> { + ::fold_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>, __ast_path: &mut AstKindPath) -> Stmt<'a> { + ::fold_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_stmts( + &mut self, + node: Vec<'a, Stmt<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Stmt<'a>> { + ::fold_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_str(&mut self, node: Str, __ast_path: &mut AstKindPath) -> Str { + ::fold_str(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super(&mut self, node: Super, __ast_path: &mut AstKindPath) -> Super { + ::fold_super(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super_prop( + &mut self, + node: SuperProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperProp<'a> { + ::fold_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super_prop_expr( + &mut self, + node: SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperPropExpr<'a> { + ::fold_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_case( + &mut self, + node: SwitchCase<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchCase<'a> { + ::fold_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_cases( + &mut self, + node: Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, SwitchCase<'a>> { + ::fold_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_stmt( + &mut self, + node: SwitchStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchStmt<'a> { + ::fold_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) -> swc_common::SyntaxContext { + ::fold_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tagged_tpl( + &mut self, + node: TaggedTpl<'a>, + __ast_path: &mut AstKindPath, + ) -> TaggedTpl<'a> { + ::fold_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr, __ast_path: &mut AstKindPath) -> ThisExpr { + ::fold_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_throw_stmt( + &mut self, + node: ThrowStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ThrowStmt<'a> { + ::fold_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>, __ast_path: &mut AstKindPath) -> Tpl<'a> { + ::fold_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement, __ast_path: &mut AstKindPath) -> TplElement { + ::fold_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl_elements( + &mut self, + node: Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TplElement> { + ::fold_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_true_plus_minus( + &mut self, + node: TruePlusMinus, + __ast_path: &mut AstKindPath, + ) -> TruePlusMinus { + ::fold_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>, __ast_path: &mut AstKindPath) -> TryStmt<'a> { + ::fold_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_array_type( + &mut self, + node: TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsArrayType<'a> { + ::fold_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_as_expr( + &mut self, + node: TsAsExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsAsExpr<'a> { + ::fold_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsCallSignatureDecl<'a> { + ::fold_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_conditional_type( + &mut self, + node: TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConditionalType<'a> { + ::fold_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_const_assertion( + &mut self, + node: TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstAssertion<'a> { + ::fold_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructSignatureDecl<'a> { + ::fold_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_constructor_type( + &mut self, + node: TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructorType<'a> { + ::fold_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_entity_name( + &mut self, + node: TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEntityName<'a> { + ::fold_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_decl( + &mut self, + node: TsEnumDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumDecl<'a> { + ::fold_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_member( + &mut self, + node: TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMember<'a> { + ::fold_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_member_id( + &mut self, + node: TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMemberId<'a> { + ::fold_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsEnumMember<'a>> { + ::fold_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExportAssignment<'a> { + ::fold_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExprWithTypeArgs<'a> { + ::fold_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + ::fold_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_external_module_ref( + &mut self, + node: TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) -> TsExternalModuleRef { + ::fold_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnOrConstructorType<'a> { + ::fold_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_param( + &mut self, + node: TsFnParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnParam<'a> { + ::fold_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_params( + &mut self, + node: Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsFnParam<'a>> { + ::fold_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_type( + &mut self, + node: TsFnType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnType<'a> { + ::fold_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_getter_signature( + &mut self, + node: TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsGetterSignature<'a> { + ::fold_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportEqualsDecl<'a> { + ::fold_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_import_type( + &mut self, + node: TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportType<'a> { + ::fold_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_index_signature( + &mut self, + node: TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexSignature<'a> { + ::fold_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexedAccessType<'a> { + ::fold_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_infer_type( + &mut self, + node: TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInferType<'a> { + ::fold_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_instantiation( + &mut self, + node: TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInstantiation<'a> { + ::fold_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_interface_body( + &mut self, + node: TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceBody<'a> { + ::fold_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_interface_decl( + &mut self, + node: TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceDecl<'a> { + ::fold_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIntersectionType<'a> { + ::fold_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_keyword_type( + &mut self, + node: TsKeywordType, + __ast_path: &mut AstKindPath, + ) -> TsKeywordType { + ::fold_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_keyword_type_kind( + &mut self, + node: TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) -> TsKeywordTypeKind { + ::fold_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>, __ast_path: &mut AstKindPath) -> TsLit<'a> { + ::fold_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_lit_type( + &mut self, + node: TsLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsLitType<'a> { + ::fold_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_mapped_type( + &mut self, + node: TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMappedType<'a> { + ::fold_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_method_signature( + &mut self, + node: TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMethodSignature<'a> { + ::fold_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_block( + &mut self, + node: TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleBlock<'a> { + ::fold_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_decl( + &mut self, + node: TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleDecl<'a> { + ::fold_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_name( + &mut self, + node: TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleName<'a> { + ::fold_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_ref( + &mut self, + node: TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleRef<'a> { + ::fold_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_body( + &mut self, + node: TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceBody<'a> { + ::fold_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_decl( + &mut self, + node: TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceDecl<'a> { + ::fold_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceExportDecl { + ::fold_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_non_null_expr( + &mut self, + node: TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNonNullExpr<'a> { + ::fold_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_optional_type( + &mut self, + node: TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsOptionalType<'a> { + ::fold_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_param_prop( + &mut self, + node: TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamProp<'a> { + ::fold_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_param_prop_param( + &mut self, + node: TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamPropParam<'a> { + ::fold_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParenthesizedType<'a> { + ::fold_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsPropertySignature<'a> { + ::fold_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_qualified_name( + &mut self, + node: TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsQualifiedName<'a> { + ::fold_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_rest_type( + &mut self, + node: TsRestType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsRestType<'a> { + ::fold_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_satisfies_expr( + &mut self, + node: TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSatisfiesExpr<'a> { + ::fold_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_setter_signature( + &mut self, + node: TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSetterSignature<'a> { + ::fold_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType, __ast_path: &mut AstKindPath) -> TsThisType { + ::fold_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_this_type_or_ident( + &mut self, + node: TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> TsThisTypeOrIdent<'a> { + ::fold_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tpl_lit_type( + &mut self, + node: TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTplLitType<'a> { + ::fold_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_element( + &mut self, + node: TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleElement<'a> { + ::fold_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTupleElement<'a>> { + ::fold_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_type( + &mut self, + node: TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleType<'a> { + ::fold_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>, __ast_path: &mut AstKindPath) -> TsType<'a> { + ::fold_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_alias_decl( + &mut self, + node: TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAliasDecl<'a> { + ::fold_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_ann( + &mut self, + node: TsTypeAnn<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAnn<'a> { + ::fold_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_assertion( + &mut self, + node: TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAssertion<'a> { + ::fold_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_element( + &mut self, + node: TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeElement<'a> { + ::fold_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeElement<'a>> { + ::fold_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_lit( + &mut self, + node: TsTypeLit<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeLit<'a> { + ::fold_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_operator( + &mut self, + node: TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperator<'a> { + ::fold_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_operator_op( + &mut self, + node: TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperatorOp { + ::fold_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param( + &mut self, + node: TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParam<'a> { + ::fold_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param_decl( + &mut self, + node: TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamDecl<'a> { + ::fold_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamInstantiation<'a> { + ::fold_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_params( + &mut self, + node: Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeParam<'a>> { + ::fold_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_predicate( + &mut self, + node: TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypePredicate<'a> { + ::fold_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_query( + &mut self, + node: TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQuery<'a> { + ::fold_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_query_expr( + &mut self, + node: TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQueryExpr<'a> { + ::fold_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_ref( + &mut self, + node: TsTypeRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeRef<'a> { + ::fold_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_types( + &mut self, + node: Vec<'a, TsType<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsType<'a>> { + ::fold_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionOrIntersectionType<'a> { + ::fold_ts_union_or_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_union_type( + &mut self, + node: TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionType<'a> { + ::fold_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_unary_expr( + &mut self, + node: UnaryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UnaryExpr<'a> { + ::fold_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp, __ast_path: &mut AstKindPath) -> UnaryOp { + ::fold_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_update_expr( + &mut self, + node: UpdateExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UpdateExpr<'a> { + ::fold_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp, __ast_path: &mut AstKindPath) -> UpdateOp { + ::fold_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_using_decl( + &mut self, + node: UsingDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> UsingDecl<'a> { + ::fold_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>, __ast_path: &mut AstKindPath) -> VarDecl<'a> { + ::fold_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl_kind( + &mut self, + node: VarDeclKind, + __ast_path: &mut AstKindPath, + ) -> VarDeclKind { + ::fold_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl_or_expr( + &mut self, + node: VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclOrExpr<'a> { + ::fold_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_declarator( + &mut self, + node: VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclarator<'a> { + ::fold_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, VarDeclarator<'a>> { + ::fold_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_while_stmt( + &mut self, + node: WhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> WhileStmt<'a> { + ::fold_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>, __ast_path: &mut AstKindPath) -> WithStmt<'a> { + ::fold_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_yield_expr( + &mut self, + node: YieldExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> YieldExpr<'a> { + ::fold_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> FoldAstPath<'a> for Box<'a, V> +where + V: ?Sized + FoldAstPath<'a>, +{ + #[inline] + fn fold_accessibility( + &mut self, + node: Accessibility, + __ast_path: &mut AstKindPath, + ) -> Accessibility { + ::fold_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>, __ast_path: &mut AstKindPath) -> ArrayLit<'a> { + ::fold_array_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>, __ast_path: &mut AstKindPath) -> ArrayPat<'a> { + ::fold_array_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_arrow_expr( + &mut self, + node: ArrowExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ArrowExpr<'a> { + ::fold_arrow_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_expr( + &mut self, + node: AssignExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignExpr<'a> { + ::fold_assign_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp, __ast_path: &mut AstKindPath) -> AssignOp { + ::fold_assign_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_pat( + &mut self, + node: AssignPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPat<'a> { + ::fold_assign_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_pat_prop( + &mut self, + node: AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPatProp<'a> { + ::fold_assign_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_prop( + &mut self, + node: AssignProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignProp<'a> { + ::fold_assign_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_target( + &mut self, + node: AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTarget<'a> { + ::fold_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_assign_target_pat( + &mut self, + node: AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTargetPat<'a> { + ::fold_assign_target_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_atom( + &mut self, + node: swc_atoms::Atom, + __ast_path: &mut AstKindPath, + ) -> swc_atoms::Atom { + ::fold_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_auto_accessor( + &mut self, + node: AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) -> AutoAccessor<'a> { + ::fold_auto_accessor(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_await_expr( + &mut self, + node: AwaitExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AwaitExpr<'a> { + ::fold_await_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>, __ast_path: &mut AstKindPath) -> BigInt<'a> { + ::fold_big_int(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_big_int_value( + &mut self, + node: BigIntValue, + __ast_path: &mut AstKindPath, + ) -> BigIntValue { + ::fold_big_int_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>, __ast_path: &mut AstKindPath) -> BinExpr<'a> { + ::fold_bin_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp, __ast_path: &mut AstKindPath) -> BinaryOp { + ::fold_binary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_binding_ident( + &mut self, + node: BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> BindingIdent<'a> { + ::fold_binding_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_block_stmt( + &mut self, + node: BlockStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmt<'a> { + ::fold_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_block_stmt_or_expr( + &mut self, + node: BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmtOrExpr<'a> { + ::fold_block_stmt_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_bool(&mut self, node: Bool, __ast_path: &mut AstKindPath) -> Bool { + ::fold_bool(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt, __ast_path: &mut AstKindPath) -> BreakStmt { + ::fold_break_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>, __ast_path: &mut AstKindPath) -> CallExpr<'a> { + ::fold_call_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>, __ast_path: &mut AstKindPath) -> Callee<'a> { + ::fold_callee(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_catch_clause( + &mut self, + node: CatchClause<'a>, + __ast_path: &mut AstKindPath, + ) -> CatchClause<'a> { + ::fold_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>, __ast_path: &mut AstKindPath) -> Class<'a> { + ::fold_class(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_decl( + &mut self, + node: ClassDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassDecl<'a> { + ::fold_class_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_expr( + &mut self, + node: ClassExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassExpr<'a> { + ::fold_class_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_member( + &mut self, + node: ClassMember<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMember<'a> { + ::fold_class_member(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_members( + &mut self, + node: Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ClassMember<'a>> { + ::fold_class_members(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_method( + &mut self, + node: ClassMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMethod<'a> { + ::fold_class_method(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_class_prop( + &mut self, + node: ClassProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassProp<'a> { + ::fold_class_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_computed_prop_name( + &mut self, + node: ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) -> ComputedPropName<'a> { + ::fold_computed_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>, __ast_path: &mut AstKindPath) -> CondExpr<'a> { + ::fold_cond_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_constructor( + &mut self, + node: Constructor<'a>, + __ast_path: &mut AstKindPath, + ) -> Constructor<'a> { + ::fold_constructor(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_continue_stmt( + &mut self, + node: ContinueStmt, + __ast_path: &mut AstKindPath, + ) -> ContinueStmt { + ::fold_continue_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_debugger_stmt( + &mut self, + node: DebuggerStmt, + __ast_path: &mut AstKindPath, + ) -> DebuggerStmt { + ::fold_debugger_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>, __ast_path: &mut AstKindPath) -> Decl<'a> { + ::fold_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decorator( + &mut self, + node: Decorator<'a>, + __ast_path: &mut AstKindPath, + ) -> Decorator<'a> { + ::fold_decorator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_decorators( + &mut self, + node: Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Decorator<'a>> { + ::fold_decorators(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_default_decl( + &mut self, + node: DefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> DefaultDecl<'a> { + ::fold_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_do_while_stmt( + &mut self, + node: DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> DoWhileStmt<'a> { + ::fold_do_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt, __ast_path: &mut AstKindPath) -> EmptyStmt { + ::fold_empty_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_all( + &mut self, + node: ExportAll<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportAll<'a> { + ::fold_export_all(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_decl( + &mut self, + node: ExportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDecl<'a> { + ::fold_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_decl( + &mut self, + node: ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultDecl<'a> { + ::fold_export_default_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_expr( + &mut self, + node: ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultExpr<'a> { + ::fold_export_default_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultSpecifier { + ::fold_export_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamedSpecifier<'a> { + ::fold_export_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamespaceSpecifier<'a> { + ::fold_export_namespace_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_specifier( + &mut self, + node: ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportSpecifier<'a> { + ::fold_export_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExportSpecifier<'a>> { + ::fold_export_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>, __ast_path: &mut AstKindPath) -> Expr<'a> { + ::fold_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_or_spread( + &mut self, + node: ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> ExprOrSpread<'a> { + ::fold_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExprOrSpread<'a>> { + ::fold_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>, __ast_path: &mut AstKindPath) -> ExprStmt<'a> { + ::fold_expr_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_exprs( + &mut self, + node: Vec<'a, Expr<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Expr<'a>> { + ::fold_exprs(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>, __ast_path: &mut AstKindPath) -> FnDecl<'a> { + ::fold_fn_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>, __ast_path: &mut AstKindPath) -> FnExpr<'a> { + ::fold_fn_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>, __ast_path: &mut AstKindPath) -> ForHead<'a> { + ::fold_for_head(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_in_stmt( + &mut self, + node: ForInStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForInStmt<'a> { + ::fold_for_in_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_of_stmt( + &mut self, + node: ForOfStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForOfStmt<'a> { + ::fold_for_of_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>, __ast_path: &mut AstKindPath) -> ForStmt<'a> { + ::fold_for_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>, __ast_path: &mut AstKindPath) -> Function<'a> { + ::fold_function(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_getter_prop( + &mut self, + node: GetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> GetterProp<'a> { + ::fold_getter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ident(&mut self, node: Ident, __ast_path: &mut AstKindPath) -> Ident { + ::fold_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName, __ast_path: &mut AstKindPath) -> IdentName { + ::fold_ident_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>, __ast_path: &mut AstKindPath) -> IfStmt<'a> { + ::fold_if_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import(&mut self, node: Import, __ast_path: &mut AstKindPath) -> Import { + ::fold_import(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_decl( + &mut self, + node: ImportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportDecl<'a> { + ::fold_import_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportDefaultSpecifier { + ::fold_import_default_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportNamedSpecifier<'a> { + ::fold_import_named_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_phase( + &mut self, + node: ImportPhase, + __ast_path: &mut AstKindPath, + ) -> ImportPhase { + ::fold_import_phase(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_specifier( + &mut self, + node: ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportSpecifier<'a> { + ::fold_import_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportSpecifier<'a>> { + ::fold_import_specifiers(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportStarAsSpecifier { + ::fold_import_star_as_specifier(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with( + &mut self, + node: ImportWith<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportWith<'a> { + ::fold_import_with(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with_item( + &mut self, + node: ImportWithItem, + __ast_path: &mut AstKindPath, + ) -> ImportWithItem { + ::fold_import_with_item(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_import_with_items( + &mut self, + node: Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportWithItem> { + ::fold_import_with_items(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid, __ast_path: &mut AstKindPath) -> Invalid { + ::fold_invalid(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>, __ast_path: &mut AstKindPath) -> JSXAttr<'a> { + ::fold_jsx_attr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_name( + &mut self, + node: JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrName<'a> { + ::fold_jsx_attr_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_or_spread( + &mut self, + node: JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrOrSpread<'a> { + ::fold_jsx_attr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + ::fold_jsx_attr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_attr_value( + &mut self, + node: JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrValue<'a> { + ::fold_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_closing_element( + &mut self, + node: JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXClosingElement<'a> { + ::fold_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_closing_fragment( + &mut self, + node: JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) -> JSXClosingFragment { + ::fold_jsx_closing_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element( + &mut self, + node: JSXElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElement<'a> { + ::fold_jsx_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_child( + &mut self, + node: JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementChild<'a> { + ::fold_jsx_element_child(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXElementChild<'a>> { + ::fold_jsx_element_childs(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_element_name( + &mut self, + node: JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementName<'a> { + ::fold_jsx_element_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_empty_expr( + &mut self, + node: JSXEmptyExpr, + __ast_path: &mut AstKindPath, + ) -> JSXEmptyExpr { + ::fold_jsx_empty_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>, __ast_path: &mut AstKindPath) -> JSXExpr<'a> { + ::fold_jsx_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_expr_container( + &mut self, + node: JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXExprContainer<'a> { + ::fold_jsx_expr_container(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_fragment( + &mut self, + node: JSXFragment<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXFragment<'a> { + ::fold_jsx_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_member_expr( + &mut self, + node: JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXMemberExpr<'a> { + ::fold_jsx_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_namespaced_name( + &mut self, + node: JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) -> JSXNamespacedName { + ::fold_jsx_namespaced_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_object( + &mut self, + node: JSXObject<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXObject<'a> { + ::fold_jsx_object(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_opening_element( + &mut self, + node: JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningElement<'a> { + ::fold_jsx_opening_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_opening_fragment( + &mut self, + node: JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningFragment { + ::fold_jsx_opening_fragment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_spread_child( + &mut self, + node: JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXSpreadChild<'a> { + ::fold_jsx_spread_child(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText, __ast_path: &mut AstKindPath) -> JSXText { + ::fold_jsx_text(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>, __ast_path: &mut AstKindPath) -> Key<'a> { + ::fold_key(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key_value_pat_prop( + &mut self, + node: KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValuePatProp<'a> { + ::fold_key_value_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_key_value_prop( + &mut self, + node: KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValueProp<'a> { + ::fold_key_value_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_labeled_stmt( + &mut self, + node: LabeledStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> LabeledStmt<'a> { + ::fold_labeled_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>, __ast_path: &mut AstKindPath) -> Lit<'a> { + ::fold_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_member_expr( + &mut self, + node: MemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberExpr<'a> { + ::fold_member_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_member_prop( + &mut self, + node: MemberProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberProp<'a> { + ::fold_member_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_meta_prop_expr( + &mut self, + node: MetaPropExpr, + __ast_path: &mut AstKindPath, + ) -> MetaPropExpr { + ::fold_meta_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_meta_prop_kind( + &mut self, + node: MetaPropKind, + __ast_path: &mut AstKindPath, + ) -> MetaPropKind { + ::fold_meta_prop_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind, __ast_path: &mut AstKindPath) -> MethodKind { + ::fold_method_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_method_prop( + &mut self, + node: MethodProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MethodProp<'a> { + ::fold_method_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>, __ast_path: &mut AstKindPath) -> Module<'a> { + ::fold_module(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_decl( + &mut self, + node: ModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleDecl<'a> { + ::fold_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_export_name( + &mut self, + node: ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleExportName<'a> { + ::fold_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_item( + &mut self, + node: ModuleItem<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleItem<'a> { + ::fold_module_item(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_module_items( + &mut self, + node: Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ModuleItem<'a>> { + ::fold_module_items(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_named_export( + &mut self, + node: NamedExport<'a>, + __ast_path: &mut AstKindPath, + ) -> NamedExport<'a> { + ::fold_named_export(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>, __ast_path: &mut AstKindPath) -> NewExpr<'a> { + ::fold_new_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_null(&mut self, node: Null, __ast_path: &mut AstKindPath) -> Null { + ::fold_null(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_number(&mut self, node: Number, __ast_path: &mut AstKindPath) -> Number { + ::fold_number(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_lit( + &mut self, + node: ObjectLit<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectLit<'a> { + ::fold_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat( + &mut self, + node: ObjectPat<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPat<'a> { + ::fold_object_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat_prop( + &mut self, + node: ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPatProp<'a> { + ::fold_object_pat_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ObjectPatProp<'a>> { + ::fold_object_pat_props(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_accessibility( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_accessibility(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_atom( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_atom(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_block_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_block_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>, __ast_path: &mut AstKindPath) -> OptCall<'a> { + ::fold_opt_call(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_catch_clause( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_catch_clause(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_chain_base( + &mut self, + node: OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainBase<'a> { + ::fold_opt_chain_base(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_chain_expr( + &mut self, + node: OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainExpr<'a> { + ::fold_opt_chain_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_expr_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ident( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_jsx_attr_value(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_jsx_closing_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_module_export_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_object_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_pat( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_span( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_span(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_str( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_str(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_true_plus_minus( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + ::fold_opt_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + ::fold_opt_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + ::fold_opt_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_expr_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_opt_vec_pats( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + ::fold_opt_vec_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>, __ast_path: &mut AstKindPath) -> Param<'a> { + ::fold_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ParamOrTsParamProp<'a> { + ::fold_param_or_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + ::fold_param_or_ts_param_props(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_params( + &mut self, + node: Vec<'a, Param<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Param<'a>> { + ::fold_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_paren_expr( + &mut self, + node: ParenExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ParenExpr<'a> { + ::fold_paren_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>, __ast_path: &mut AstKindPath) -> Pat<'a> { + ::fold_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_pats( + &mut self, + node: Vec<'a, Pat<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Pat<'a>> { + ::fold_pats(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_method( + &mut self, + node: PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateMethod<'a> { + ::fold_private_method(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_name( + &mut self, + node: PrivateName, + __ast_path: &mut AstKindPath, + ) -> PrivateName { + ::fold_private_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_private_prop( + &mut self, + node: PrivateProp<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateProp<'a> { + ::fold_private_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>, __ast_path: &mut AstKindPath) -> Program<'a> { + ::fold_program(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>, __ast_path: &mut AstKindPath) -> Prop<'a> { + ::fold_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>, __ast_path: &mut AstKindPath) -> PropName<'a> { + ::fold_prop_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_or_spread( + &mut self, + node: PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> PropOrSpread<'a> { + ::fold_prop_or_spread(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, PropOrSpread<'a>> { + ::fold_prop_or_spreads(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_regex(&mut self, node: Regex, __ast_path: &mut AstKindPath) -> Regex { + ::fold_regex(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>, __ast_path: &mut AstKindPath) -> RestPat<'a> { + ::fold_rest_pat(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_return_stmt( + &mut self, + node: ReturnStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ReturnStmt<'a> { + ::fold_return_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>, __ast_path: &mut AstKindPath) -> Script<'a> { + ::fold_script(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>, __ast_path: &mut AstKindPath) -> SeqExpr<'a> { + ::fold_seq_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_setter_prop( + &mut self, + node: SetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SetterProp<'a> { + ::fold_setter_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> SimpleAssignTarget<'a> { + ::fold_simple_assign_target(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_span( + &mut self, + node: swc_common::Span, + __ast_path: &mut AstKindPath, + ) -> swc_common::Span { + ::fold_span(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_spread_element( + &mut self, + node: SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) -> SpreadElement<'a> { + ::fold_spread_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_static_block( + &mut self, + node: StaticBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> StaticBlock<'a> { + ::fold_static_block(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>, __ast_path: &mut AstKindPath) -> Stmt<'a> { + ::fold_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_stmts( + &mut self, + node: Vec<'a, Stmt<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Stmt<'a>> { + ::fold_stmts(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_str(&mut self, node: Str, __ast_path: &mut AstKindPath) -> Str { + ::fold_str(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super(&mut self, node: Super, __ast_path: &mut AstKindPath) -> Super { + ::fold_super(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super_prop( + &mut self, + node: SuperProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperProp<'a> { + ::fold_super_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_super_prop_expr( + &mut self, + node: SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperPropExpr<'a> { + ::fold_super_prop_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_case( + &mut self, + node: SwitchCase<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchCase<'a> { + ::fold_switch_case(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_cases( + &mut self, + node: Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, SwitchCase<'a>> { + ::fold_switch_cases(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_switch_stmt( + &mut self, + node: SwitchStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchStmt<'a> { + ::fold_switch_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) -> swc_common::SyntaxContext { + ::fold_syntax_context(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tagged_tpl( + &mut self, + node: TaggedTpl<'a>, + __ast_path: &mut AstKindPath, + ) -> TaggedTpl<'a> { + ::fold_tagged_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr, __ast_path: &mut AstKindPath) -> ThisExpr { + ::fold_this_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_throw_stmt( + &mut self, + node: ThrowStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ThrowStmt<'a> { + ::fold_throw_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>, __ast_path: &mut AstKindPath) -> Tpl<'a> { + ::fold_tpl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement, __ast_path: &mut AstKindPath) -> TplElement { + ::fold_tpl_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_tpl_elements( + &mut self, + node: Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TplElement> { + ::fold_tpl_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_true_plus_minus( + &mut self, + node: TruePlusMinus, + __ast_path: &mut AstKindPath, + ) -> TruePlusMinus { + ::fold_true_plus_minus(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>, __ast_path: &mut AstKindPath) -> TryStmt<'a> { + ::fold_try_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_array_type( + &mut self, + node: TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsArrayType<'a> { + ::fold_ts_array_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_as_expr( + &mut self, + node: TsAsExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsAsExpr<'a> { + ::fold_ts_as_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsCallSignatureDecl<'a> { + ::fold_ts_call_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_conditional_type( + &mut self, + node: TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConditionalType<'a> { + ::fold_ts_conditional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_const_assertion( + &mut self, + node: TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstAssertion<'a> { + ::fold_ts_const_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructSignatureDecl<'a> { + ::fold_ts_construct_signature_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_constructor_type( + &mut self, + node: TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructorType<'a> { + ::fold_ts_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_entity_name( + &mut self, + node: TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEntityName<'a> { + ::fold_ts_entity_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_decl( + &mut self, + node: TsEnumDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumDecl<'a> { + ::fold_ts_enum_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_member( + &mut self, + node: TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMember<'a> { + ::fold_ts_enum_member(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_member_id( + &mut self, + node: TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMemberId<'a> { + ::fold_ts_enum_member_id(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsEnumMember<'a>> { + ::fold_ts_enum_members(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExportAssignment<'a> { + ::fold_ts_export_assignment(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExprWithTypeArgs<'a> { + ::fold_ts_expr_with_type_args(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + ::fold_ts_expr_with_type_argss(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_external_module_ref( + &mut self, + node: TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) -> TsExternalModuleRef { + ::fold_ts_external_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnOrConstructorType<'a> { + ::fold_ts_fn_or_constructor_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_param( + &mut self, + node: TsFnParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnParam<'a> { + ::fold_ts_fn_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_params( + &mut self, + node: Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsFnParam<'a>> { + ::fold_ts_fn_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_fn_type( + &mut self, + node: TsFnType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnType<'a> { + ::fold_ts_fn_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_getter_signature( + &mut self, + node: TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsGetterSignature<'a> { + ::fold_ts_getter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportEqualsDecl<'a> { + ::fold_ts_import_equals_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_import_type( + &mut self, + node: TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportType<'a> { + ::fold_ts_import_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_index_signature( + &mut self, + node: TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexSignature<'a> { + ::fold_ts_index_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexedAccessType<'a> { + ::fold_ts_indexed_access_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_infer_type( + &mut self, + node: TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInferType<'a> { + ::fold_ts_infer_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_instantiation( + &mut self, + node: TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInstantiation<'a> { + ::fold_ts_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_interface_body( + &mut self, + node: TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceBody<'a> { + ::fold_ts_interface_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_interface_decl( + &mut self, + node: TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceDecl<'a> { + ::fold_ts_interface_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIntersectionType<'a> { + ::fold_ts_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_keyword_type( + &mut self, + node: TsKeywordType, + __ast_path: &mut AstKindPath, + ) -> TsKeywordType { + ::fold_ts_keyword_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_keyword_type_kind( + &mut self, + node: TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) -> TsKeywordTypeKind { + ::fold_ts_keyword_type_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>, __ast_path: &mut AstKindPath) -> TsLit<'a> { + ::fold_ts_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_lit_type( + &mut self, + node: TsLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsLitType<'a> { + ::fold_ts_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_mapped_type( + &mut self, + node: TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMappedType<'a> { + ::fold_ts_mapped_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_method_signature( + &mut self, + node: TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMethodSignature<'a> { + ::fold_ts_method_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_block( + &mut self, + node: TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleBlock<'a> { + ::fold_ts_module_block(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_decl( + &mut self, + node: TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleDecl<'a> { + ::fold_ts_module_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_name( + &mut self, + node: TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleName<'a> { + ::fold_ts_module_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_module_ref( + &mut self, + node: TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleRef<'a> { + ::fold_ts_module_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_body( + &mut self, + node: TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceBody<'a> { + ::fold_ts_namespace_body(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_decl( + &mut self, + node: TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceDecl<'a> { + ::fold_ts_namespace_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceExportDecl { + ::fold_ts_namespace_export_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_non_null_expr( + &mut self, + node: TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNonNullExpr<'a> { + ::fold_ts_non_null_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_optional_type( + &mut self, + node: TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsOptionalType<'a> { + ::fold_ts_optional_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_param_prop( + &mut self, + node: TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamProp<'a> { + ::fold_ts_param_prop(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_param_prop_param( + &mut self, + node: TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamPropParam<'a> { + ::fold_ts_param_prop_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParenthesizedType<'a> { + ::fold_ts_parenthesized_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsPropertySignature<'a> { + ::fold_ts_property_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_qualified_name( + &mut self, + node: TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsQualifiedName<'a> { + ::fold_ts_qualified_name(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_rest_type( + &mut self, + node: TsRestType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsRestType<'a> { + ::fold_ts_rest_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_satisfies_expr( + &mut self, + node: TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSatisfiesExpr<'a> { + ::fold_ts_satisfies_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_setter_signature( + &mut self, + node: TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSetterSignature<'a> { + ::fold_ts_setter_signature(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType, __ast_path: &mut AstKindPath) -> TsThisType { + ::fold_ts_this_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_this_type_or_ident( + &mut self, + node: TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> TsThisTypeOrIdent<'a> { + ::fold_ts_this_type_or_ident(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tpl_lit_type( + &mut self, + node: TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTplLitType<'a> { + ::fold_ts_tpl_lit_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_element( + &mut self, + node: TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleElement<'a> { + ::fold_ts_tuple_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTupleElement<'a>> { + ::fold_ts_tuple_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_tuple_type( + &mut self, + node: TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleType<'a> { + ::fold_ts_tuple_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>, __ast_path: &mut AstKindPath) -> TsType<'a> { + ::fold_ts_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_alias_decl( + &mut self, + node: TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAliasDecl<'a> { + ::fold_ts_type_alias_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_ann( + &mut self, + node: TsTypeAnn<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAnn<'a> { + ::fold_ts_type_ann(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_assertion( + &mut self, + node: TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAssertion<'a> { + ::fold_ts_type_assertion(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_element( + &mut self, + node: TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeElement<'a> { + ::fold_ts_type_element(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeElement<'a>> { + ::fold_ts_type_elements(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_lit( + &mut self, + node: TsTypeLit<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeLit<'a> { + ::fold_ts_type_lit(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_operator( + &mut self, + node: TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperator<'a> { + ::fold_ts_type_operator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_operator_op( + &mut self, + node: TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperatorOp { + ::fold_ts_type_operator_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param( + &mut self, + node: TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParam<'a> { + ::fold_ts_type_param(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param_decl( + &mut self, + node: TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamDecl<'a> { + ::fold_ts_type_param_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamInstantiation<'a> { + ::fold_ts_type_param_instantiation(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_params( + &mut self, + node: Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeParam<'a>> { + ::fold_ts_type_params(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_predicate( + &mut self, + node: TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypePredicate<'a> { + ::fold_ts_type_predicate(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_query( + &mut self, + node: TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQuery<'a> { + ::fold_ts_type_query(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_query_expr( + &mut self, + node: TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQueryExpr<'a> { + ::fold_ts_type_query_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_type_ref( + &mut self, + node: TsTypeRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeRef<'a> { + ::fold_ts_type_ref(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_types( + &mut self, + node: Vec<'a, TsType<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsType<'a>> { + ::fold_ts_types(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionOrIntersectionType<'a> { + ::fold_ts_union_or_intersection_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_ts_union_type( + &mut self, + node: TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionType<'a> { + ::fold_ts_union_type(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_unary_expr( + &mut self, + node: UnaryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UnaryExpr<'a> { + ::fold_unary_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp, __ast_path: &mut AstKindPath) -> UnaryOp { + ::fold_unary_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_update_expr( + &mut self, + node: UpdateExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UpdateExpr<'a> { + ::fold_update_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp, __ast_path: &mut AstKindPath) -> UpdateOp { + ::fold_update_op(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_using_decl( + &mut self, + node: UsingDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> UsingDecl<'a> { + ::fold_using_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>, __ast_path: &mut AstKindPath) -> VarDecl<'a> { + ::fold_var_decl(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl_kind( + &mut self, + node: VarDeclKind, + __ast_path: &mut AstKindPath, + ) -> VarDeclKind { + ::fold_var_decl_kind(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_decl_or_expr( + &mut self, + node: VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclOrExpr<'a> { + ::fold_var_decl_or_expr(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_declarator( + &mut self, + node: VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclarator<'a> { + ::fold_var_declarator(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, VarDeclarator<'a>> { + ::fold_var_declarators(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_while_stmt( + &mut self, + node: WhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> WhileStmt<'a> { + ::fold_while_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>, __ast_path: &mut AstKindPath) -> WithStmt<'a> { + ::fold_with_stmt(&mut **self, node, __ast_path) + } + + #[inline] + fn fold_yield_expr( + &mut self, + node: YieldExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> YieldExpr<'a> { + ::fold_yield_expr(&mut **self, node, __ast_path) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, A, B> FoldAstPath<'a> for ::swc_visit::Either +where + A: FoldAstPath<'a>, + B: FoldAstPath<'a>, +{ + #[inline] + fn fold_accessibility( + &mut self, + node: Accessibility, + __ast_path: &mut AstKindPath, + ) -> Accessibility { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>, __ast_path: &mut AstKindPath) -> ArrayLit<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_array_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_array_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>, __ast_path: &mut AstKindPath) -> ArrayPat<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_array_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_array_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_arrow_expr( + &mut self, + node: ArrowExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ArrowExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_arrow_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_arrow_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_expr( + &mut self, + node: AssignExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp, __ast_path: &mut AstKindPath) -> AssignOp { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_pat( + &mut self, + node: AssignPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPat<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_pat_prop( + &mut self, + node: AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_prop( + &mut self, + node: AssignProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_target( + &mut self, + node: AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTarget<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_assign_target_pat( + &mut self, + node: AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTargetPat<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_assign_target_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_assign_target_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_atom( + &mut self, + node: swc_atoms::Atom, + __ast_path: &mut AstKindPath, + ) -> swc_atoms::Atom { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_atom(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_atom(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_auto_accessor( + &mut self, + node: AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) -> AutoAccessor<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_auto_accessor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_auto_accessor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_await_expr( + &mut self, + node: AwaitExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AwaitExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_await_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_await_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>, __ast_path: &mut AstKindPath) -> BigInt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_big_int(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_big_int(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_big_int_value( + &mut self, + node: BigIntValue, + __ast_path: &mut AstKindPath, + ) -> BigIntValue { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_big_int_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_big_int_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>, __ast_path: &mut AstKindPath) -> BinExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_bin_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_bin_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp, __ast_path: &mut AstKindPath) -> BinaryOp { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_binary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_binary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_binding_ident( + &mut self, + node: BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> BindingIdent<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_binding_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_binding_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_block_stmt( + &mut self, + node: BlockStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_block_stmt_or_expr( + &mut self, + node: BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmtOrExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_block_stmt_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_block_stmt_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_bool(&mut self, node: Bool, __ast_path: &mut AstKindPath) -> Bool { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_bool(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_bool(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt, __ast_path: &mut AstKindPath) -> BreakStmt { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_break_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_break_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>, __ast_path: &mut AstKindPath) -> CallExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_call_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_call_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>, __ast_path: &mut AstKindPath) -> Callee<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_callee(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_callee(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_catch_clause( + &mut self, + node: CatchClause<'a>, + __ast_path: &mut AstKindPath, + ) -> CatchClause<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>, __ast_path: &mut AstKindPath) -> Class<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_class(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_class(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_class_decl( + &mut self, + node: ClassDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class_expr( + &mut self, + node: ClassExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class_member( + &mut self, + node: ClassMember<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMember<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class_members( + &mut self, + node: Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ClassMember<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class_method( + &mut self, + node: ClassMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMethod<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_class_prop( + &mut self, + node: ClassProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_class_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_class_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_computed_prop_name( + &mut self, + node: ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) -> ComputedPropName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_computed_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_computed_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>, __ast_path: &mut AstKindPath) -> CondExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_cond_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_cond_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_constructor( + &mut self, + node: Constructor<'a>, + __ast_path: &mut AstKindPath, + ) -> Constructor<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_constructor(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_constructor(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_continue_stmt( + &mut self, + node: ContinueStmt, + __ast_path: &mut AstKindPath, + ) -> ContinueStmt { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_continue_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_continue_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_debugger_stmt( + &mut self, + node: DebuggerStmt, + __ast_path: &mut AstKindPath, + ) -> DebuggerStmt { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_debugger_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_debugger_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>, __ast_path: &mut AstKindPath) -> Decl<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_decl(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_decl(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_decorator( + &mut self, + node: Decorator<'a>, + __ast_path: &mut AstKindPath, + ) -> Decorator<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_decorator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_decorator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_decorators( + &mut self, + node: Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Decorator<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_decorators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_decorators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_default_decl( + &mut self, + node: DefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> DefaultDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_do_while_stmt( + &mut self, + node: DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> DoWhileStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_do_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_do_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt, __ast_path: &mut AstKindPath) -> EmptyStmt { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_empty_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_empty_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_all( + &mut self, + node: ExportAll<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportAll<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_all(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_all(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_decl( + &mut self, + node: ExportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_default_decl( + &mut self, + node: ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_default_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_default_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_default_expr( + &mut self, + node: ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_default_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_default_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultSpecifier { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamedSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamespaceSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_namespace_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_namespace_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_specifier( + &mut self, + node: ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExportSpecifier<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_export_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_export_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>, __ast_path: &mut AstKindPath) -> Expr<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_expr(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_expr(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_expr_or_spread( + &mut self, + node: ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> ExprOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExprOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>, __ast_path: &mut AstKindPath) -> ExprStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_expr_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_expr_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_exprs( + &mut self, + node: Vec<'a, Expr<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Expr<'a>> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_exprs(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_exprs(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>, __ast_path: &mut AstKindPath) -> FnDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_fn_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_fn_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>, __ast_path: &mut AstKindPath) -> FnExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_fn_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_fn_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>, __ast_path: &mut AstKindPath) -> ForHead<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_for_head(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_for_head(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_for_in_stmt( + &mut self, + node: ForInStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForInStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_for_in_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_for_in_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_for_of_stmt( + &mut self, + node: ForOfStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForOfStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_for_of_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_for_of_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>, __ast_path: &mut AstKindPath) -> ForStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_for_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_for_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>, __ast_path: &mut AstKindPath) -> Function<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_function(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_function(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_getter_prop( + &mut self, + node: GetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> GetterProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_getter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_getter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ident(&mut self, node: Ident, __ast_path: &mut AstKindPath) -> Ident { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_ident(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_ident(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName, __ast_path: &mut AstKindPath) -> IdentName { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ident_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ident_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>, __ast_path: &mut AstKindPath) -> IfStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_if_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_if_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import(&mut self, node: Import, __ast_path: &mut AstKindPath) -> Import { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_import(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_decl( + &mut self, + node: ImportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportDefaultSpecifier { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_default_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_default_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportNamedSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_named_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_named_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_phase( + &mut self, + node: ImportPhase, + __ast_path: &mut AstKindPath, + ) -> ImportPhase { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_phase(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_phase(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_specifier( + &mut self, + node: ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportSpecifier<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportSpecifier<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_specifiers(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_specifiers(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportStarAsSpecifier { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_star_as_specifier(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_star_as_specifier(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_with( + &mut self, + node: ImportWith<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportWith<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_with(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_with(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_with_item( + &mut self, + node: ImportWithItem, + __ast_path: &mut AstKindPath, + ) -> ImportWithItem { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_with_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_with_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_import_with_items( + &mut self, + node: Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportWithItem> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_import_with_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_import_with_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid, __ast_path: &mut AstKindPath) -> Invalid { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_invalid(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_invalid(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>, __ast_path: &mut AstKindPath) -> JSXAttr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_attr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_attr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_attr_name( + &mut self, + node: JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_attr_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_attr_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_attr_or_spread( + &mut self, + node: JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_attr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_attr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_attr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_attr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_attr_value( + &mut self, + node: JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrValue<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_closing_element( + &mut self, + node: JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXClosingElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_closing_fragment( + &mut self, + node: JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) -> JSXClosingFragment { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_closing_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_closing_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_element( + &mut self, + node: JSXElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_element_child( + &mut self, + node: JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementChild<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_element_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_element_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXElementChild<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_element_childs(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_element_childs(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_element_name( + &mut self, + node: JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_element_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_element_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_empty_expr( + &mut self, + node: JSXEmptyExpr, + __ast_path: &mut AstKindPath, + ) -> JSXEmptyExpr { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_empty_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_empty_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>, __ast_path: &mut AstKindPath) -> JSXExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_expr_container( + &mut self, + node: JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXExprContainer<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_expr_container(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_expr_container(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_fragment( + &mut self, + node: JSXFragment<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXFragment<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_member_expr( + &mut self, + node: JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXMemberExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_namespaced_name( + &mut self, + node: JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) -> JSXNamespacedName { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_namespaced_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_namespaced_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_object( + &mut self, + node: JSXObject<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXObject<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_object(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_object(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_opening_element( + &mut self, + node: JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_opening_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_opening_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_opening_fragment( + &mut self, + node: JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningFragment { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_opening_fragment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_opening_fragment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_spread_child( + &mut self, + node: JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXSpreadChild<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_spread_child(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_spread_child(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText, __ast_path: &mut AstKindPath) -> JSXText { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_jsx_text(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_jsx_text(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>, __ast_path: &mut AstKindPath) -> Key<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_key(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_key(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_key_value_pat_prop( + &mut self, + node: KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValuePatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_key_value_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_key_value_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_key_value_prop( + &mut self, + node: KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValueProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_key_value_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_key_value_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_labeled_stmt( + &mut self, + node: LabeledStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> LabeledStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_labeled_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_labeled_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>, __ast_path: &mut AstKindPath) -> Lit<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_lit(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_lit(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_member_expr( + &mut self, + node: MemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_member_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_member_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_member_prop( + &mut self, + node: MemberProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_member_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_member_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_meta_prop_expr( + &mut self, + node: MetaPropExpr, + __ast_path: &mut AstKindPath, + ) -> MetaPropExpr { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_meta_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_meta_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_meta_prop_kind( + &mut self, + node: MetaPropKind, + __ast_path: &mut AstKindPath, + ) -> MetaPropKind { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_meta_prop_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_meta_prop_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind, __ast_path: &mut AstKindPath) -> MethodKind { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_method_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_method_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_method_prop( + &mut self, + node: MethodProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MethodProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_method_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_method_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>, __ast_path: &mut AstKindPath) -> Module<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_module(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_module(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_module_decl( + &mut self, + node: ModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_module_export_name( + &mut self, + node: ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleExportName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_module_item( + &mut self, + node: ModuleItem<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleItem<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_module_item(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_module_item(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_module_items( + &mut self, + node: Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ModuleItem<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_module_items(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_module_items(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_named_export( + &mut self, + node: NamedExport<'a>, + __ast_path: &mut AstKindPath, + ) -> NamedExport<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_named_export(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_named_export(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>, __ast_path: &mut AstKindPath) -> NewExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_new_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_new_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_null(&mut self, node: Null, __ast_path: &mut AstKindPath) -> Null { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_null(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_null(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_number(&mut self, node: Number, __ast_path: &mut AstKindPath) -> Number { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_number(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_number(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_object_lit( + &mut self, + node: ObjectLit<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectLit<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_object_pat( + &mut self, + node: ObjectPat<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPat<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_object_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_object_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_object_pat_prop( + &mut self, + node: ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPatProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_object_pat_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_object_pat_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ObjectPatProp<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_object_pat_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_object_pat_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_accessibility( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_accessibility(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_accessibility(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_atom( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_atom(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_atom(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_block_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_block_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_block_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>, __ast_path: &mut AstKindPath) -> OptCall<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_call(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_call(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_catch_clause( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_catch_clause(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_catch_clause(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_chain_base( + &mut self, + node: OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainBase<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_chain_base(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_chain_base(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_chain_expr( + &mut self, + node: OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_chain_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_chain_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_expr_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_expr_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ident( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_jsx_attr_value(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_jsx_attr_value(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_jsx_closing_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_jsx_closing_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_module_export_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_module_export_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_object_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_object_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_pat( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_span( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_span(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_span(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_str( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_str(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_str(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_true_plus_minus( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_type( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_ts_type_param_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_ts_type_param_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_vec_expr_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_opt_vec_pats( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_opt_vec_pats(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_opt_vec_pats(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>, __ast_path: &mut AstKindPath) -> Param<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_param(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_param(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ParamOrTsParamProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_param_or_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_param_or_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_param_or_ts_param_props(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_param_or_ts_param_props(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_params( + &mut self, + node: Vec<'a, Param<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Param<'a>> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_params(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_paren_expr( + &mut self, + node: ParenExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ParenExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_paren_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_paren_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>, __ast_path: &mut AstKindPath) -> Pat<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_pat(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_pat(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_pats( + &mut self, + node: Vec<'a, Pat<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Pat<'a>> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_pats(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_pats(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_private_method( + &mut self, + node: PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateMethod<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_private_method(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_private_method(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_private_name( + &mut self, + node: PrivateName, + __ast_path: &mut AstKindPath, + ) -> PrivateName { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_private_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_private_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_private_prop( + &mut self, + node: PrivateProp<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_private_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_private_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>, __ast_path: &mut AstKindPath) -> Program<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_program(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_program(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>, __ast_path: &mut AstKindPath) -> Prop<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_prop(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_prop(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>, __ast_path: &mut AstKindPath) -> PropName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_prop_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_prop_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_prop_or_spread( + &mut self, + node: PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> PropOrSpread<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_prop_or_spread(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_prop_or_spread(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, PropOrSpread<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_prop_or_spreads(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_prop_or_spreads(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_regex(&mut self, node: Regex, __ast_path: &mut AstKindPath) -> Regex { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_regex(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_regex(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>, __ast_path: &mut AstKindPath) -> RestPat<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_rest_pat(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_rest_pat(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_return_stmt( + &mut self, + node: ReturnStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ReturnStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_return_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_return_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>, __ast_path: &mut AstKindPath) -> Script<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_script(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_script(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>, __ast_path: &mut AstKindPath) -> SeqExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_seq_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_seq_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_setter_prop( + &mut self, + node: SetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SetterProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_setter_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_setter_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> SimpleAssignTarget<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_simple_assign_target(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_simple_assign_target(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_span( + &mut self, + node: swc_common::Span, + __ast_path: &mut AstKindPath, + ) -> swc_common::Span { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_span(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_span(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_spread_element( + &mut self, + node: SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) -> SpreadElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_spread_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_spread_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_static_block( + &mut self, + node: StaticBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> StaticBlock<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_static_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_static_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>, __ast_path: &mut AstKindPath) -> Stmt<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_stmt(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_stmt(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_stmts( + &mut self, + node: Vec<'a, Stmt<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Stmt<'a>> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_stmts(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_stmts(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_str(&mut self, node: Str, __ast_path: &mut AstKindPath) -> Str { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_str(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_str(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_super(&mut self, node: Super, __ast_path: &mut AstKindPath) -> Super { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_super(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_super(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_super_prop( + &mut self, + node: SuperProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_super_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_super_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_super_prop_expr( + &mut self, + node: SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperPropExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_super_prop_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_super_prop_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_switch_case( + &mut self, + node: SwitchCase<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchCase<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_switch_case(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_switch_case(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_switch_cases( + &mut self, + node: Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, SwitchCase<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_switch_cases(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_switch_cases(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_switch_stmt( + &mut self, + node: SwitchStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_switch_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_switch_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) -> swc_common::SyntaxContext { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_syntax_context(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_syntax_context(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_tagged_tpl( + &mut self, + node: TaggedTpl<'a>, + __ast_path: &mut AstKindPath, + ) -> TaggedTpl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_tagged_tpl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_tagged_tpl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr, __ast_path: &mut AstKindPath) -> ThisExpr { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_this_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_this_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_throw_stmt( + &mut self, + node: ThrowStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ThrowStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_throw_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_throw_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>, __ast_path: &mut AstKindPath) -> Tpl<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_tpl(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => FoldAstPath::fold_tpl(visitor, node, __ast_path), + } + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement, __ast_path: &mut AstKindPath) -> TplElement { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_tpl_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_tpl_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_tpl_elements( + &mut self, + node: Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TplElement> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_tpl_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_tpl_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_true_plus_minus( + &mut self, + node: TruePlusMinus, + __ast_path: &mut AstKindPath, + ) -> TruePlusMinus { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_true_plus_minus(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_true_plus_minus(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>, __ast_path: &mut AstKindPath) -> TryStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_try_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_try_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_array_type( + &mut self, + node: TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsArrayType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_array_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_array_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_as_expr( + &mut self, + node: TsAsExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsAsExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_as_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_as_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsCallSignatureDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_call_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_call_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_conditional_type( + &mut self, + node: TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConditionalType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_conditional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_conditional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_const_assertion( + &mut self, + node: TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstAssertion<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_const_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_const_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructSignatureDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_construct_signature_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_construct_signature_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_constructor_type( + &mut self, + node: TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructorType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_entity_name( + &mut self, + node: TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEntityName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_entity_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_entity_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_enum_decl( + &mut self, + node: TsEnumDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_enum_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_enum_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_enum_member( + &mut self, + node: TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMember<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_enum_member(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_enum_member(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_enum_member_id( + &mut self, + node: TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMemberId<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_enum_member_id(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_enum_member_id(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsEnumMember<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_enum_members(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_enum_members(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExportAssignment<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_export_assignment(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_export_assignment(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExprWithTypeArgs<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_expr_with_type_args(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_expr_with_type_args(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_expr_with_type_argss(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_expr_with_type_argss(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_external_module_ref( + &mut self, + node: TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) -> TsExternalModuleRef { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_external_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_external_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnOrConstructorType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_fn_or_constructor_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_fn_param( + &mut self, + node: TsFnParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnParam<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_fn_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_fn_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_fn_params( + &mut self, + node: Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsFnParam<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_fn_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_fn_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_fn_type( + &mut self, + node: TsFnType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_fn_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_fn_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_getter_signature( + &mut self, + node: TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsGetterSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_getter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_getter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportEqualsDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_import_equals_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_import_equals_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_import_type( + &mut self, + node: TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_import_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_import_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_index_signature( + &mut self, + node: TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_index_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_index_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexedAccessType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_indexed_access_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_indexed_access_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_infer_type( + &mut self, + node: TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInferType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_infer_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_infer_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_instantiation( + &mut self, + node: TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInstantiation<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_interface_body( + &mut self, + node: TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceBody<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_interface_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_interface_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_interface_decl( + &mut self, + node: TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_interface_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_interface_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIntersectionType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_keyword_type( + &mut self, + node: TsKeywordType, + __ast_path: &mut AstKindPath, + ) -> TsKeywordType { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_keyword_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_keyword_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_keyword_type_kind( + &mut self, + node: TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) -> TsKeywordTypeKind { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_keyword_type_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_keyword_type_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>, __ast_path: &mut AstKindPath) -> TsLit<'a> { + match self { + swc_visit::Either::Left(visitor) => FoldAstPath::fold_ts_lit(visitor, node, __ast_path), + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_lit_type( + &mut self, + node: TsLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsLitType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_mapped_type( + &mut self, + node: TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMappedType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_mapped_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_mapped_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_method_signature( + &mut self, + node: TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMethodSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_method_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_method_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_module_block( + &mut self, + node: TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleBlock<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_module_block(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_module_block(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_module_decl( + &mut self, + node: TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_module_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_module_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_module_name( + &mut self, + node: TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_module_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_module_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_module_ref( + &mut self, + node: TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleRef<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_module_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_module_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_namespace_body( + &mut self, + node: TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceBody<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_namespace_body(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_namespace_body(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_namespace_decl( + &mut self, + node: TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_namespace_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_namespace_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceExportDecl { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_namespace_export_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_namespace_export_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_non_null_expr( + &mut self, + node: TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNonNullExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_non_null_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_non_null_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_optional_type( + &mut self, + node: TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsOptionalType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_optional_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_optional_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_param_prop( + &mut self, + node: TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamProp<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_param_prop(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_param_prop(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_param_prop_param( + &mut self, + node: TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamPropParam<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_param_prop_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_param_prop_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParenthesizedType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_parenthesized_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_parenthesized_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsPropertySignature<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_property_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_property_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_qualified_name( + &mut self, + node: TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsQualifiedName<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_qualified_name(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_qualified_name(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_rest_type( + &mut self, + node: TsRestType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsRestType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_rest_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_rest_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_satisfies_expr( + &mut self, + node: TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSatisfiesExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_satisfies_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_satisfies_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_setter_signature( + &mut self, + node: TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSetterSignature<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_setter_signature(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_setter_signature(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType, __ast_path: &mut AstKindPath) -> TsThisType { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_this_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_this_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_this_type_or_ident( + &mut self, + node: TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> TsThisTypeOrIdent<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_this_type_or_ident(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_this_type_or_ident(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_tpl_lit_type( + &mut self, + node: TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTplLitType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_tpl_lit_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_tpl_lit_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_tuple_element( + &mut self, + node: TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_tuple_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_tuple_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTupleElement<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_tuple_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_tuple_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_tuple_type( + &mut self, + node: TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_tuple_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_tuple_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>, __ast_path: &mut AstKindPath) -> TsType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_alias_decl( + &mut self, + node: TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAliasDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_alias_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_alias_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_ann( + &mut self, + node: TsTypeAnn<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAnn<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_ann(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_ann(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_assertion( + &mut self, + node: TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAssertion<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_assertion(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_assertion(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_element( + &mut self, + node: TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeElement<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_element(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_element(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeElement<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_elements(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_elements(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_lit( + &mut self, + node: TsTypeLit<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeLit<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_lit(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_lit(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_operator( + &mut self, + node: TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperator<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_operator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_operator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_operator_op( + &mut self, + node: TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperatorOp { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_operator_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_operator_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_param( + &mut self, + node: TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParam<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_param(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_param(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_param_decl( + &mut self, + node: TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_param_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_param_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamInstantiation<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_param_instantiation(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_param_instantiation(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_params( + &mut self, + node: Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeParam<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_params(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_params(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_predicate( + &mut self, + node: TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypePredicate<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_predicate(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_predicate(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_query( + &mut self, + node: TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQuery<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_query(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_query(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_query_expr( + &mut self, + node: TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQueryExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_query_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_query_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_type_ref( + &mut self, + node: TsTypeRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeRef<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_type_ref(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_type_ref(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_types( + &mut self, + node: Vec<'a, TsType<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsType<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_types(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_types(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionOrIntersectionType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_union_or_intersection_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_union_or_intersection_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_ts_union_type( + &mut self, + node: TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionType<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_ts_union_type(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_ts_union_type(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_unary_expr( + &mut self, + node: UnaryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UnaryExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_unary_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_unary_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp, __ast_path: &mut AstKindPath) -> UnaryOp { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_unary_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_unary_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_update_expr( + &mut self, + node: UpdateExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UpdateExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_update_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_update_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp, __ast_path: &mut AstKindPath) -> UpdateOp { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_update_op(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_update_op(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_using_decl( + &mut self, + node: UsingDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> UsingDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_using_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_using_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>, __ast_path: &mut AstKindPath) -> VarDecl<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_var_decl(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_var_decl(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_var_decl_kind( + &mut self, + node: VarDeclKind, + __ast_path: &mut AstKindPath, + ) -> VarDeclKind { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_var_decl_kind(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_var_decl_kind(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_var_decl_or_expr( + &mut self, + node: VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclOrExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_var_decl_or_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_var_decl_or_expr(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_var_declarator( + &mut self, + node: VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclarator<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_var_declarator(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_var_declarator(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, VarDeclarator<'a>> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_var_declarators(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_var_declarators(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_while_stmt( + &mut self, + node: WhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> WhileStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_while_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_while_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>, __ast_path: &mut AstKindPath) -> WithStmt<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_with_stmt(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_with_stmt(visitor, node, __ast_path) + } + } + } + + #[inline] + fn fold_yield_expr( + &mut self, + node: YieldExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> YieldExpr<'a> { + match self { + swc_visit::Either::Left(visitor) => { + FoldAstPath::fold_yield_expr(visitor, node, __ast_path) + } + swc_visit::Either::Right(visitor) => { + FoldAstPath::fold_yield_expr(visitor, node, __ast_path) + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V> FoldAstPath<'a> for ::swc_visit::Optional +where + V: FoldAstPath<'a>, +{ + #[inline] + fn fold_accessibility( + &mut self, + node: Accessibility, + __ast_path: &mut AstKindPath, + ) -> Accessibility { + if self.enabled { + ::fold_accessibility(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_array_lit(&mut self, node: ArrayLit<'a>, __ast_path: &mut AstKindPath) -> ArrayLit<'a> { + if self.enabled { + ::fold_array_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_array_pat(&mut self, node: ArrayPat<'a>, __ast_path: &mut AstKindPath) -> ArrayPat<'a> { + if self.enabled { + ::fold_array_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_arrow_expr( + &mut self, + node: ArrowExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ArrowExpr<'a> { + if self.enabled { + ::fold_arrow_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_expr( + &mut self, + node: AssignExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignExpr<'a> { + if self.enabled { + ::fold_assign_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_op(&mut self, node: AssignOp, __ast_path: &mut AstKindPath) -> AssignOp { + if self.enabled { + ::fold_assign_op(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_pat( + &mut self, + node: AssignPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPat<'a> { + if self.enabled { + ::fold_assign_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_pat_prop( + &mut self, + node: AssignPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignPatProp<'a> { + if self.enabled { + ::fold_assign_pat_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_prop( + &mut self, + node: AssignProp<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignProp<'a> { + if self.enabled { + ::fold_assign_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_target( + &mut self, + node: AssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTarget<'a> { + if self.enabled { + ::fold_assign_target(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_assign_target_pat( + &mut self, + node: AssignTargetPat<'a>, + __ast_path: &mut AstKindPath, + ) -> AssignTargetPat<'a> { + if self.enabled { + ::fold_assign_target_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_atom( + &mut self, + node: swc_atoms::Atom, + __ast_path: &mut AstKindPath, + ) -> swc_atoms::Atom { + if self.enabled { + ::fold_atom(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_auto_accessor( + &mut self, + node: AutoAccessor<'a>, + __ast_path: &mut AstKindPath, + ) -> AutoAccessor<'a> { + if self.enabled { + ::fold_auto_accessor(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_await_expr( + &mut self, + node: AwaitExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> AwaitExpr<'a> { + if self.enabled { + ::fold_await_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_big_int(&mut self, node: BigInt<'a>, __ast_path: &mut AstKindPath) -> BigInt<'a> { + if self.enabled { + ::fold_big_int(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_big_int_value( + &mut self, + node: BigIntValue, + __ast_path: &mut AstKindPath, + ) -> BigIntValue { + if self.enabled { + ::fold_big_int_value(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_bin_expr(&mut self, node: BinExpr<'a>, __ast_path: &mut AstKindPath) -> BinExpr<'a> { + if self.enabled { + ::fold_bin_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_binary_op(&mut self, node: BinaryOp, __ast_path: &mut AstKindPath) -> BinaryOp { + if self.enabled { + ::fold_binary_op(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_binding_ident( + &mut self, + node: BindingIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> BindingIdent<'a> { + if self.enabled { + ::fold_binding_ident(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_block_stmt( + &mut self, + node: BlockStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmt<'a> { + if self.enabled { + ::fold_block_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_block_stmt_or_expr( + &mut self, + node: BlockStmtOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> BlockStmtOrExpr<'a> { + if self.enabled { + ::fold_block_stmt_or_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_bool(&mut self, node: Bool, __ast_path: &mut AstKindPath) -> Bool { + if self.enabled { + ::fold_bool(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_break_stmt(&mut self, node: BreakStmt, __ast_path: &mut AstKindPath) -> BreakStmt { + if self.enabled { + ::fold_break_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_call_expr(&mut self, node: CallExpr<'a>, __ast_path: &mut AstKindPath) -> CallExpr<'a> { + if self.enabled { + ::fold_call_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_callee(&mut self, node: Callee<'a>, __ast_path: &mut AstKindPath) -> Callee<'a> { + if self.enabled { + ::fold_callee(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_catch_clause( + &mut self, + node: CatchClause<'a>, + __ast_path: &mut AstKindPath, + ) -> CatchClause<'a> { + if self.enabled { + ::fold_catch_clause(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class(&mut self, node: Class<'a>, __ast_path: &mut AstKindPath) -> Class<'a> { + if self.enabled { + ::fold_class(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_decl( + &mut self, + node: ClassDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassDecl<'a> { + if self.enabled { + ::fold_class_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_expr( + &mut self, + node: ClassExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassExpr<'a> { + if self.enabled { + ::fold_class_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_member( + &mut self, + node: ClassMember<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMember<'a> { + if self.enabled { + ::fold_class_member(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_members( + &mut self, + node: Vec<'a, ClassMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ClassMember<'a>> { + if self.enabled { + ::fold_class_members(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_method( + &mut self, + node: ClassMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassMethod<'a> { + if self.enabled { + ::fold_class_method(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_class_prop( + &mut self, + node: ClassProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ClassProp<'a> { + if self.enabled { + ::fold_class_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_computed_prop_name( + &mut self, + node: ComputedPropName<'a>, + __ast_path: &mut AstKindPath, + ) -> ComputedPropName<'a> { + if self.enabled { + ::fold_computed_prop_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_cond_expr(&mut self, node: CondExpr<'a>, __ast_path: &mut AstKindPath) -> CondExpr<'a> { + if self.enabled { + ::fold_cond_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_constructor( + &mut self, + node: Constructor<'a>, + __ast_path: &mut AstKindPath, + ) -> Constructor<'a> { + if self.enabled { + ::fold_constructor(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_continue_stmt( + &mut self, + node: ContinueStmt, + __ast_path: &mut AstKindPath, + ) -> ContinueStmt { + if self.enabled { + ::fold_continue_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_debugger_stmt( + &mut self, + node: DebuggerStmt, + __ast_path: &mut AstKindPath, + ) -> DebuggerStmt { + if self.enabled { + ::fold_debugger_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_decl(&mut self, node: Decl<'a>, __ast_path: &mut AstKindPath) -> Decl<'a> { + if self.enabled { + ::fold_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_decorator( + &mut self, + node: Decorator<'a>, + __ast_path: &mut AstKindPath, + ) -> Decorator<'a> { + if self.enabled { + ::fold_decorator(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_decorators( + &mut self, + node: Vec<'a, Decorator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Decorator<'a>> { + if self.enabled { + ::fold_decorators(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_default_decl( + &mut self, + node: DefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> DefaultDecl<'a> { + if self.enabled { + ::fold_default_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_do_while_stmt( + &mut self, + node: DoWhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> DoWhileStmt<'a> { + if self.enabled { + ::fold_do_while_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_empty_stmt(&mut self, node: EmptyStmt, __ast_path: &mut AstKindPath) -> EmptyStmt { + if self.enabled { + ::fold_empty_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_all( + &mut self, + node: ExportAll<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportAll<'a> { + if self.enabled { + ::fold_export_all(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_decl( + &mut self, + node: ExportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDecl<'a> { + if self.enabled { + ::fold_export_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_default_decl( + &mut self, + node: ExportDefaultDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultDecl<'a> { + if self.enabled { + ::fold_export_default_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_default_expr( + &mut self, + node: ExportDefaultExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultExpr<'a> { + if self.enabled { + ::fold_export_default_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_default_specifier( + &mut self, + node: ExportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ExportDefaultSpecifier { + if self.enabled { + ::fold_export_default_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_named_specifier( + &mut self, + node: ExportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamedSpecifier<'a> { + if self.enabled { + ::fold_export_named_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_namespace_specifier( + &mut self, + node: ExportNamespaceSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportNamespaceSpecifier<'a> { + if self.enabled { + ::fold_export_namespace_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_specifier( + &mut self, + node: ExportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ExportSpecifier<'a> { + if self.enabled { + ::fold_export_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_export_specifiers( + &mut self, + node: Vec<'a, ExportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExportSpecifier<'a>> { + if self.enabled { + ::fold_export_specifiers(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_expr(&mut self, node: Expr<'a>, __ast_path: &mut AstKindPath) -> Expr<'a> { + if self.enabled { + ::fold_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_expr_or_spread( + &mut self, + node: ExprOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> ExprOrSpread<'a> { + if self.enabled { + ::fold_expr_or_spread(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_expr_or_spreads( + &mut self, + node: Vec<'a, ExprOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ExprOrSpread<'a>> { + if self.enabled { + ::fold_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_expr_stmt(&mut self, node: ExprStmt<'a>, __ast_path: &mut AstKindPath) -> ExprStmt<'a> { + if self.enabled { + ::fold_expr_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_exprs( + &mut self, + node: Vec<'a, Expr<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Expr<'a>> { + if self.enabled { + ::fold_exprs(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_fn_decl(&mut self, node: FnDecl<'a>, __ast_path: &mut AstKindPath) -> FnDecl<'a> { + if self.enabled { + ::fold_fn_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_fn_expr(&mut self, node: FnExpr<'a>, __ast_path: &mut AstKindPath) -> FnExpr<'a> { + if self.enabled { + ::fold_fn_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_for_head(&mut self, node: ForHead<'a>, __ast_path: &mut AstKindPath) -> ForHead<'a> { + if self.enabled { + ::fold_for_head(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_for_in_stmt( + &mut self, + node: ForInStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForInStmt<'a> { + if self.enabled { + ::fold_for_in_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_for_of_stmt( + &mut self, + node: ForOfStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ForOfStmt<'a> { + if self.enabled { + ::fold_for_of_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_for_stmt(&mut self, node: ForStmt<'a>, __ast_path: &mut AstKindPath) -> ForStmt<'a> { + if self.enabled { + ::fold_for_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_function(&mut self, node: Function<'a>, __ast_path: &mut AstKindPath) -> Function<'a> { + if self.enabled { + ::fold_function(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_getter_prop( + &mut self, + node: GetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> GetterProp<'a> { + if self.enabled { + ::fold_getter_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ident(&mut self, node: Ident, __ast_path: &mut AstKindPath) -> Ident { + if self.enabled { + ::fold_ident(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ident_name(&mut self, node: IdentName, __ast_path: &mut AstKindPath) -> IdentName { + if self.enabled { + ::fold_ident_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_if_stmt(&mut self, node: IfStmt<'a>, __ast_path: &mut AstKindPath) -> IfStmt<'a> { + if self.enabled { + ::fold_if_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import(&mut self, node: Import, __ast_path: &mut AstKindPath) -> Import { + if self.enabled { + ::fold_import(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_decl( + &mut self, + node: ImportDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportDecl<'a> { + if self.enabled { + ::fold_import_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_default_specifier( + &mut self, + node: ImportDefaultSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportDefaultSpecifier { + if self.enabled { + ::fold_import_default_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_named_specifier( + &mut self, + node: ImportNamedSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportNamedSpecifier<'a> { + if self.enabled { + ::fold_import_named_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_phase( + &mut self, + node: ImportPhase, + __ast_path: &mut AstKindPath, + ) -> ImportPhase { + if self.enabled { + ::fold_import_phase(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_specifier( + &mut self, + node: ImportSpecifier<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportSpecifier<'a> { + if self.enabled { + ::fold_import_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_specifiers( + &mut self, + node: Vec<'a, ImportSpecifier<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportSpecifier<'a>> { + if self.enabled { + ::fold_import_specifiers(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_star_as_specifier( + &mut self, + node: ImportStarAsSpecifier, + __ast_path: &mut AstKindPath, + ) -> ImportStarAsSpecifier { + if self.enabled { + ::fold_import_star_as_specifier(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_with( + &mut self, + node: ImportWith<'a>, + __ast_path: &mut AstKindPath, + ) -> ImportWith<'a> { + if self.enabled { + ::fold_import_with(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_with_item( + &mut self, + node: ImportWithItem, + __ast_path: &mut AstKindPath, + ) -> ImportWithItem { + if self.enabled { + ::fold_import_with_item(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_import_with_items( + &mut self, + node: Vec<'a, ImportWithItem>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ImportWithItem> { + if self.enabled { + ::fold_import_with_items(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_invalid(&mut self, node: Invalid, __ast_path: &mut AstKindPath) -> Invalid { + if self.enabled { + ::fold_invalid(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr(&mut self, node: JSXAttr<'a>, __ast_path: &mut AstKindPath) -> JSXAttr<'a> { + if self.enabled { + ::fold_jsx_attr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_name( + &mut self, + node: JSXAttrName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrName<'a> { + if self.enabled { + ::fold_jsx_attr_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_or_spread( + &mut self, + node: JSXAttrOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrOrSpread<'a> { + if self.enabled { + ::fold_jsx_attr_or_spread(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_or_spreads( + &mut self, + node: Vec<'a, JSXAttrOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXAttrOrSpread<'a>> { + if self.enabled { + ::fold_jsx_attr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_attr_value( + &mut self, + node: JSXAttrValue<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXAttrValue<'a> { + if self.enabled { + ::fold_jsx_attr_value(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_closing_element( + &mut self, + node: JSXClosingElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXClosingElement<'a> { + if self.enabled { + ::fold_jsx_closing_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_closing_fragment( + &mut self, + node: JSXClosingFragment, + __ast_path: &mut AstKindPath, + ) -> JSXClosingFragment { + if self.enabled { + ::fold_jsx_closing_fragment(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_element( + &mut self, + node: JSXElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElement<'a> { + if self.enabled { + ::fold_jsx_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_child( + &mut self, + node: JSXElementChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementChild<'a> { + if self.enabled { + ::fold_jsx_element_child(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_childs( + &mut self, + node: Vec<'a, JSXElementChild<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, JSXElementChild<'a>> { + if self.enabled { + ::fold_jsx_element_childs(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_element_name( + &mut self, + node: JSXElementName<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXElementName<'a> { + if self.enabled { + ::fold_jsx_element_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_empty_expr( + &mut self, + node: JSXEmptyExpr, + __ast_path: &mut AstKindPath, + ) -> JSXEmptyExpr { + if self.enabled { + ::fold_jsx_empty_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_expr(&mut self, node: JSXExpr<'a>, __ast_path: &mut AstKindPath) -> JSXExpr<'a> { + if self.enabled { + ::fold_jsx_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_expr_container( + &mut self, + node: JSXExprContainer<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXExprContainer<'a> { + if self.enabled { + ::fold_jsx_expr_container(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_fragment( + &mut self, + node: JSXFragment<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXFragment<'a> { + if self.enabled { + ::fold_jsx_fragment(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_member_expr( + &mut self, + node: JSXMemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXMemberExpr<'a> { + if self.enabled { + ::fold_jsx_member_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_namespaced_name( + &mut self, + node: JSXNamespacedName, + __ast_path: &mut AstKindPath, + ) -> JSXNamespacedName { + if self.enabled { + ::fold_jsx_namespaced_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_object( + &mut self, + node: JSXObject<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXObject<'a> { + if self.enabled { + ::fold_jsx_object(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_opening_element( + &mut self, + node: JSXOpeningElement<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningElement<'a> { + if self.enabled { + ::fold_jsx_opening_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_opening_fragment( + &mut self, + node: JSXOpeningFragment, + __ast_path: &mut AstKindPath, + ) -> JSXOpeningFragment { + if self.enabled { + ::fold_jsx_opening_fragment(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_spread_child( + &mut self, + node: JSXSpreadChild<'a>, + __ast_path: &mut AstKindPath, + ) -> JSXSpreadChild<'a> { + if self.enabled { + ::fold_jsx_spread_child(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_jsx_text(&mut self, node: JSXText, __ast_path: &mut AstKindPath) -> JSXText { + if self.enabled { + ::fold_jsx_text(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_key(&mut self, node: Key<'a>, __ast_path: &mut AstKindPath) -> Key<'a> { + if self.enabled { + ::fold_key(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_key_value_pat_prop( + &mut self, + node: KeyValuePatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValuePatProp<'a> { + if self.enabled { + ::fold_key_value_pat_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_key_value_prop( + &mut self, + node: KeyValueProp<'a>, + __ast_path: &mut AstKindPath, + ) -> KeyValueProp<'a> { + if self.enabled { + ::fold_key_value_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_labeled_stmt( + &mut self, + node: LabeledStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> LabeledStmt<'a> { + if self.enabled { + ::fold_labeled_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_lit(&mut self, node: Lit<'a>, __ast_path: &mut AstKindPath) -> Lit<'a> { + if self.enabled { + ::fold_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_member_expr( + &mut self, + node: MemberExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberExpr<'a> { + if self.enabled { + ::fold_member_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_member_prop( + &mut self, + node: MemberProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MemberProp<'a> { + if self.enabled { + ::fold_member_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_meta_prop_expr( + &mut self, + node: MetaPropExpr, + __ast_path: &mut AstKindPath, + ) -> MetaPropExpr { + if self.enabled { + ::fold_meta_prop_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_meta_prop_kind( + &mut self, + node: MetaPropKind, + __ast_path: &mut AstKindPath, + ) -> MetaPropKind { + if self.enabled { + ::fold_meta_prop_kind(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_method_kind(&mut self, node: MethodKind, __ast_path: &mut AstKindPath) -> MethodKind { + if self.enabled { + ::fold_method_kind(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_method_prop( + &mut self, + node: MethodProp<'a>, + __ast_path: &mut AstKindPath, + ) -> MethodProp<'a> { + if self.enabled { + ::fold_method_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_module(&mut self, node: Module<'a>, __ast_path: &mut AstKindPath) -> Module<'a> { + if self.enabled { + ::fold_module(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_module_decl( + &mut self, + node: ModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleDecl<'a> { + if self.enabled { + ::fold_module_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_module_export_name( + &mut self, + node: ModuleExportName<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleExportName<'a> { + if self.enabled { + ::fold_module_export_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_module_item( + &mut self, + node: ModuleItem<'a>, + __ast_path: &mut AstKindPath, + ) -> ModuleItem<'a> { + if self.enabled { + ::fold_module_item(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_module_items( + &mut self, + node: Vec<'a, ModuleItem<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ModuleItem<'a>> { + if self.enabled { + ::fold_module_items(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_named_export( + &mut self, + node: NamedExport<'a>, + __ast_path: &mut AstKindPath, + ) -> NamedExport<'a> { + if self.enabled { + ::fold_named_export(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_new_expr(&mut self, node: NewExpr<'a>, __ast_path: &mut AstKindPath) -> NewExpr<'a> { + if self.enabled { + ::fold_new_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_null(&mut self, node: Null, __ast_path: &mut AstKindPath) -> Null { + if self.enabled { + ::fold_null(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_number(&mut self, node: Number, __ast_path: &mut AstKindPath) -> Number { + if self.enabled { + ::fold_number(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_object_lit( + &mut self, + node: ObjectLit<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectLit<'a> { + if self.enabled { + ::fold_object_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_object_pat( + &mut self, + node: ObjectPat<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPat<'a> { + if self.enabled { + ::fold_object_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_object_pat_prop( + &mut self, + node: ObjectPatProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ObjectPatProp<'a> { + if self.enabled { + ::fold_object_pat_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_object_pat_props( + &mut self, + node: Vec<'a, ObjectPatProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ObjectPatProp<'a>> { + if self.enabled { + ::fold_object_pat_props(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_accessibility( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + if self.enabled { + ::fold_opt_accessibility(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_atom( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + if self.enabled { + ::fold_opt_atom(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_block_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_block_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_call(&mut self, node: OptCall<'a>, __ast_path: &mut AstKindPath) -> OptCall<'a> { + if self.enabled { + ::fold_opt_call(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_catch_clause( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_catch_clause(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_chain_base( + &mut self, + node: OptChainBase<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainBase<'a> { + if self.enabled { + ::fold_opt_chain_base(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_chain_expr( + &mut self, + node: OptChainExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> OptChainExpr<'a> { + if self.enabled { + ::fold_opt_chain_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_expr_or_spread( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_expr_or_spread(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_expr_or_spreads( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + if self.enabled { + ::fold_opt_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ident( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + if self.enabled { + ::fold_opt_ident(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_jsx_attr_value( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_jsx_attr_value(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_jsx_closing_element( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_jsx_closing_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_module_export_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_module_export_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_object_lit( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + if self.enabled { + ::fold_opt_object_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_pat( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_span( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + if self.enabled { + ::fold_opt_span(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_stmt( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_str( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_str(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_true_plus_minus( + &mut self, + node: Option, + __ast_path: &mut AstKindPath, + ) -> Option { + if self.enabled { + ::fold_opt_true_plus_minus(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_entity_name( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_ts_entity_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_namespace_body( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_ts_namespace_body(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_ts_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_ann( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_param_decl( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_param_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_ts_type_param_instantiation( + &mut self, + node: Option>>, + __ast_path: &mut AstKindPath, + ) -> Option>> { + if self.enabled { + ::fold_opt_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + node + } + } + + #[inline] + fn fold_opt_var_decl_or_expr( + &mut self, + node: Option>, + __ast_path: &mut AstKindPath, + ) -> Option> { + if self.enabled { + ::fold_opt_var_decl_or_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_vec_expr_or_spreads( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + if self.enabled { + ::fold_opt_vec_expr_or_spreads(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_opt_vec_pats( + &mut self, + node: Vec<'a, Option>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Option>> { + if self.enabled { + ::fold_opt_vec_pats(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_param(&mut self, node: Param<'a>, __ast_path: &mut AstKindPath) -> Param<'a> { + if self.enabled { + ::fold_param(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_param_or_ts_param_prop( + &mut self, + node: ParamOrTsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> ParamOrTsParamProp<'a> { + if self.enabled { + ::fold_param_or_ts_param_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_param_or_ts_param_props( + &mut self, + node: Vec<'a, ParamOrTsParamProp<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, ParamOrTsParamProp<'a>> { + if self.enabled { + ::fold_param_or_ts_param_props(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_params( + &mut self, + node: Vec<'a, Param<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Param<'a>> { + if self.enabled { + ::fold_params(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_paren_expr( + &mut self, + node: ParenExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> ParenExpr<'a> { + if self.enabled { + ::fold_paren_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_pat(&mut self, node: Pat<'a>, __ast_path: &mut AstKindPath) -> Pat<'a> { + if self.enabled { + ::fold_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_pats( + &mut self, + node: Vec<'a, Pat<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Pat<'a>> { + if self.enabled { + ::fold_pats(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_private_method( + &mut self, + node: PrivateMethod<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateMethod<'a> { + if self.enabled { + ::fold_private_method(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_private_name( + &mut self, + node: PrivateName, + __ast_path: &mut AstKindPath, + ) -> PrivateName { + if self.enabled { + ::fold_private_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_private_prop( + &mut self, + node: PrivateProp<'a>, + __ast_path: &mut AstKindPath, + ) -> PrivateProp<'a> { + if self.enabled { + ::fold_private_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_program(&mut self, node: Program<'a>, __ast_path: &mut AstKindPath) -> Program<'a> { + if self.enabled { + ::fold_program(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_prop(&mut self, node: Prop<'a>, __ast_path: &mut AstKindPath) -> Prop<'a> { + if self.enabled { + ::fold_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_prop_name(&mut self, node: PropName<'a>, __ast_path: &mut AstKindPath) -> PropName<'a> { + if self.enabled { + ::fold_prop_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_prop_or_spread( + &mut self, + node: PropOrSpread<'a>, + __ast_path: &mut AstKindPath, + ) -> PropOrSpread<'a> { + if self.enabled { + ::fold_prop_or_spread(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_prop_or_spreads( + &mut self, + node: Vec<'a, PropOrSpread<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, PropOrSpread<'a>> { + if self.enabled { + ::fold_prop_or_spreads(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_regex(&mut self, node: Regex, __ast_path: &mut AstKindPath) -> Regex { + if self.enabled { + ::fold_regex(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_rest_pat(&mut self, node: RestPat<'a>, __ast_path: &mut AstKindPath) -> RestPat<'a> { + if self.enabled { + ::fold_rest_pat(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_return_stmt( + &mut self, + node: ReturnStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ReturnStmt<'a> { + if self.enabled { + ::fold_return_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_script(&mut self, node: Script<'a>, __ast_path: &mut AstKindPath) -> Script<'a> { + if self.enabled { + ::fold_script(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_seq_expr(&mut self, node: SeqExpr<'a>, __ast_path: &mut AstKindPath) -> SeqExpr<'a> { + if self.enabled { + ::fold_seq_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_setter_prop( + &mut self, + node: SetterProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SetterProp<'a> { + if self.enabled { + ::fold_setter_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_simple_assign_target( + &mut self, + node: SimpleAssignTarget<'a>, + __ast_path: &mut AstKindPath, + ) -> SimpleAssignTarget<'a> { + if self.enabled { + ::fold_simple_assign_target(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_span( + &mut self, + node: swc_common::Span, + __ast_path: &mut AstKindPath, + ) -> swc_common::Span { + if self.enabled { + ::fold_span(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_spread_element( + &mut self, + node: SpreadElement<'a>, + __ast_path: &mut AstKindPath, + ) -> SpreadElement<'a> { + if self.enabled { + ::fold_spread_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_static_block( + &mut self, + node: StaticBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> StaticBlock<'a> { + if self.enabled { + ::fold_static_block(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_stmt(&mut self, node: Stmt<'a>, __ast_path: &mut AstKindPath) -> Stmt<'a> { + if self.enabled { + ::fold_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_stmts( + &mut self, + node: Vec<'a, Stmt<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, Stmt<'a>> { + if self.enabled { + ::fold_stmts(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_str(&mut self, node: Str, __ast_path: &mut AstKindPath) -> Str { + if self.enabled { + ::fold_str(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_super(&mut self, node: Super, __ast_path: &mut AstKindPath) -> Super { + if self.enabled { + ::fold_super(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_super_prop( + &mut self, + node: SuperProp<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperProp<'a> { + if self.enabled { + ::fold_super_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_super_prop_expr( + &mut self, + node: SuperPropExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> SuperPropExpr<'a> { + if self.enabled { + ::fold_super_prop_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_switch_case( + &mut self, + node: SwitchCase<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchCase<'a> { + if self.enabled { + ::fold_switch_case(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_switch_cases( + &mut self, + node: Vec<'a, SwitchCase<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, SwitchCase<'a>> { + if self.enabled { + ::fold_switch_cases(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_switch_stmt( + &mut self, + node: SwitchStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> SwitchStmt<'a> { + if self.enabled { + ::fold_switch_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_syntax_context( + &mut self, + node: swc_common::SyntaxContext, + __ast_path: &mut AstKindPath, + ) -> swc_common::SyntaxContext { + if self.enabled { + ::fold_syntax_context(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_tagged_tpl( + &mut self, + node: TaggedTpl<'a>, + __ast_path: &mut AstKindPath, + ) -> TaggedTpl<'a> { + if self.enabled { + ::fold_tagged_tpl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_this_expr(&mut self, node: ThisExpr, __ast_path: &mut AstKindPath) -> ThisExpr { + if self.enabled { + ::fold_this_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_throw_stmt( + &mut self, + node: ThrowStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> ThrowStmt<'a> { + if self.enabled { + ::fold_throw_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_tpl(&mut self, node: Tpl<'a>, __ast_path: &mut AstKindPath) -> Tpl<'a> { + if self.enabled { + ::fold_tpl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_tpl_element(&mut self, node: TplElement, __ast_path: &mut AstKindPath) -> TplElement { + if self.enabled { + ::fold_tpl_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_tpl_elements( + &mut self, + node: Vec<'a, TplElement>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TplElement> { + if self.enabled { + ::fold_tpl_elements(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_true_plus_minus( + &mut self, + node: TruePlusMinus, + __ast_path: &mut AstKindPath, + ) -> TruePlusMinus { + if self.enabled { + ::fold_true_plus_minus(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_try_stmt(&mut self, node: TryStmt<'a>, __ast_path: &mut AstKindPath) -> TryStmt<'a> { + if self.enabled { + ::fold_try_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_array_type( + &mut self, + node: TsArrayType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsArrayType<'a> { + if self.enabled { + ::fold_ts_array_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_as_expr( + &mut self, + node: TsAsExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsAsExpr<'a> { + if self.enabled { + ::fold_ts_as_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_call_signature_decl( + &mut self, + node: TsCallSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsCallSignatureDecl<'a> { + if self.enabled { + ::fold_ts_call_signature_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_conditional_type( + &mut self, + node: TsConditionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConditionalType<'a> { + if self.enabled { + ::fold_ts_conditional_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_const_assertion( + &mut self, + node: TsConstAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstAssertion<'a> { + if self.enabled { + ::fold_ts_const_assertion(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_construct_signature_decl( + &mut self, + node: TsConstructSignatureDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructSignatureDecl<'a> { + if self.enabled { + ::fold_ts_construct_signature_decl( + &mut self.visitor, + node, + __ast_path, + ) + } else { + node + } + } + + #[inline] + fn fold_ts_constructor_type( + &mut self, + node: TsConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsConstructorType<'a> { + if self.enabled { + ::fold_ts_constructor_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_entity_name( + &mut self, + node: TsEntityName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEntityName<'a> { + if self.enabled { + ::fold_ts_entity_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_decl( + &mut self, + node: TsEnumDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumDecl<'a> { + if self.enabled { + ::fold_ts_enum_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_member( + &mut self, + node: TsEnumMember<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMember<'a> { + if self.enabled { + ::fold_ts_enum_member(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_member_id( + &mut self, + node: TsEnumMemberId<'a>, + __ast_path: &mut AstKindPath, + ) -> TsEnumMemberId<'a> { + if self.enabled { + ::fold_ts_enum_member_id(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_enum_members( + &mut self, + node: Vec<'a, TsEnumMember<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsEnumMember<'a>> { + if self.enabled { + ::fold_ts_enum_members(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_export_assignment( + &mut self, + node: TsExportAssignment<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExportAssignment<'a> { + if self.enabled { + ::fold_ts_export_assignment(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_expr_with_type_args( + &mut self, + node: TsExprWithTypeArgs<'a>, + __ast_path: &mut AstKindPath, + ) -> TsExprWithTypeArgs<'a> { + if self.enabled { + ::fold_ts_expr_with_type_args(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_expr_with_type_argss( + &mut self, + node: Vec<'a, TsExprWithTypeArgs<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsExprWithTypeArgs<'a>> { + if self.enabled { + ::fold_ts_expr_with_type_argss(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_external_module_ref( + &mut self, + node: TsExternalModuleRef, + __ast_path: &mut AstKindPath, + ) -> TsExternalModuleRef { + if self.enabled { + ::fold_ts_external_module_ref(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_or_constructor_type( + &mut self, + node: TsFnOrConstructorType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnOrConstructorType<'a> { + if self.enabled { + ::fold_ts_fn_or_constructor_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_param( + &mut self, + node: TsFnParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnParam<'a> { + if self.enabled { + ::fold_ts_fn_param(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_params( + &mut self, + node: Vec<'a, TsFnParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsFnParam<'a>> { + if self.enabled { + ::fold_ts_fn_params(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_fn_type( + &mut self, + node: TsFnType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsFnType<'a> { + if self.enabled { + ::fold_ts_fn_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_getter_signature( + &mut self, + node: TsGetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsGetterSignature<'a> { + if self.enabled { + ::fold_ts_getter_signature(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_import_equals_decl( + &mut self, + node: TsImportEqualsDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportEqualsDecl<'a> { + if self.enabled { + ::fold_ts_import_equals_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_import_type( + &mut self, + node: TsImportType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsImportType<'a> { + if self.enabled { + ::fold_ts_import_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_index_signature( + &mut self, + node: TsIndexSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexSignature<'a> { + if self.enabled { + ::fold_ts_index_signature(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_indexed_access_type( + &mut self, + node: TsIndexedAccessType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIndexedAccessType<'a> { + if self.enabled { + ::fold_ts_indexed_access_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_infer_type( + &mut self, + node: TsInferType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInferType<'a> { + if self.enabled { + ::fold_ts_infer_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_instantiation( + &mut self, + node: TsInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInstantiation<'a> { + if self.enabled { + ::fold_ts_instantiation(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_interface_body( + &mut self, + node: TsInterfaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceBody<'a> { + if self.enabled { + ::fold_ts_interface_body(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_interface_decl( + &mut self, + node: TsInterfaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsInterfaceDecl<'a> { + if self.enabled { + ::fold_ts_interface_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_intersection_type( + &mut self, + node: TsIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsIntersectionType<'a> { + if self.enabled { + ::fold_ts_intersection_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_keyword_type( + &mut self, + node: TsKeywordType, + __ast_path: &mut AstKindPath, + ) -> TsKeywordType { + if self.enabled { + ::fold_ts_keyword_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_keyword_type_kind( + &mut self, + node: TsKeywordTypeKind, + __ast_path: &mut AstKindPath, + ) -> TsKeywordTypeKind { + if self.enabled { + ::fold_ts_keyword_type_kind(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_lit(&mut self, node: TsLit<'a>, __ast_path: &mut AstKindPath) -> TsLit<'a> { + if self.enabled { + ::fold_ts_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_lit_type( + &mut self, + node: TsLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsLitType<'a> { + if self.enabled { + ::fold_ts_lit_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_mapped_type( + &mut self, + node: TsMappedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMappedType<'a> { + if self.enabled { + ::fold_ts_mapped_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_method_signature( + &mut self, + node: TsMethodSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsMethodSignature<'a> { + if self.enabled { + ::fold_ts_method_signature(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_module_block( + &mut self, + node: TsModuleBlock<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleBlock<'a> { + if self.enabled { + ::fold_ts_module_block(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_module_decl( + &mut self, + node: TsModuleDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleDecl<'a> { + if self.enabled { + ::fold_ts_module_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_module_name( + &mut self, + node: TsModuleName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleName<'a> { + if self.enabled { + ::fold_ts_module_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_module_ref( + &mut self, + node: TsModuleRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsModuleRef<'a> { + if self.enabled { + ::fold_ts_module_ref(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_body( + &mut self, + node: TsNamespaceBody<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceBody<'a> { + if self.enabled { + ::fold_ts_namespace_body(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_decl( + &mut self, + node: TsNamespaceDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceDecl<'a> { + if self.enabled { + ::fold_ts_namespace_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_namespace_export_decl( + &mut self, + node: TsNamespaceExportDecl, + __ast_path: &mut AstKindPath, + ) -> TsNamespaceExportDecl { + if self.enabled { + ::fold_ts_namespace_export_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_non_null_expr( + &mut self, + node: TsNonNullExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsNonNullExpr<'a> { + if self.enabled { + ::fold_ts_non_null_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_optional_type( + &mut self, + node: TsOptionalType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsOptionalType<'a> { + if self.enabled { + ::fold_ts_optional_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_param_prop( + &mut self, + node: TsParamProp<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamProp<'a> { + if self.enabled { + ::fold_ts_param_prop(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_param_prop_param( + &mut self, + node: TsParamPropParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParamPropParam<'a> { + if self.enabled { + ::fold_ts_param_prop_param(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_parenthesized_type( + &mut self, + node: TsParenthesizedType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsParenthesizedType<'a> { + if self.enabled { + ::fold_ts_parenthesized_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_property_signature( + &mut self, + node: TsPropertySignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsPropertySignature<'a> { + if self.enabled { + ::fold_ts_property_signature(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_qualified_name( + &mut self, + node: TsQualifiedName<'a>, + __ast_path: &mut AstKindPath, + ) -> TsQualifiedName<'a> { + if self.enabled { + ::fold_ts_qualified_name(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_rest_type( + &mut self, + node: TsRestType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsRestType<'a> { + if self.enabled { + ::fold_ts_rest_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_satisfies_expr( + &mut self, + node: TsSatisfiesExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSatisfiesExpr<'a> { + if self.enabled { + ::fold_ts_satisfies_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_setter_signature( + &mut self, + node: TsSetterSignature<'a>, + __ast_path: &mut AstKindPath, + ) -> TsSetterSignature<'a> { + if self.enabled { + ::fold_ts_setter_signature(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_this_type(&mut self, node: TsThisType, __ast_path: &mut AstKindPath) -> TsThisType { + if self.enabled { + ::fold_ts_this_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_this_type_or_ident( + &mut self, + node: TsThisTypeOrIdent<'a>, + __ast_path: &mut AstKindPath, + ) -> TsThisTypeOrIdent<'a> { + if self.enabled { + ::fold_ts_this_type_or_ident(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_tpl_lit_type( + &mut self, + node: TsTplLitType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTplLitType<'a> { + if self.enabled { + ::fold_ts_tpl_lit_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_element( + &mut self, + node: TsTupleElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleElement<'a> { + if self.enabled { + ::fold_ts_tuple_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_elements( + &mut self, + node: Vec<'a, TsTupleElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTupleElement<'a>> { + if self.enabled { + ::fold_ts_tuple_elements(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_tuple_type( + &mut self, + node: TsTupleType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTupleType<'a> { + if self.enabled { + ::fold_ts_tuple_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type(&mut self, node: TsType<'a>, __ast_path: &mut AstKindPath) -> TsType<'a> { + if self.enabled { + ::fold_ts_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_alias_decl( + &mut self, + node: TsTypeAliasDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAliasDecl<'a> { + if self.enabled { + ::fold_ts_type_alias_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_ann( + &mut self, + node: TsTypeAnn<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAnn<'a> { + if self.enabled { + ::fold_ts_type_ann(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_assertion( + &mut self, + node: TsTypeAssertion<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeAssertion<'a> { + if self.enabled { + ::fold_ts_type_assertion(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_element( + &mut self, + node: TsTypeElement<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeElement<'a> { + if self.enabled { + ::fold_ts_type_element(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_elements( + &mut self, + node: Vec<'a, TsTypeElement<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeElement<'a>> { + if self.enabled { + ::fold_ts_type_elements(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_lit( + &mut self, + node: TsTypeLit<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeLit<'a> { + if self.enabled { + ::fold_ts_type_lit(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_operator( + &mut self, + node: TsTypeOperator<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperator<'a> { + if self.enabled { + ::fold_ts_type_operator(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_operator_op( + &mut self, + node: TsTypeOperatorOp, + __ast_path: &mut AstKindPath, + ) -> TsTypeOperatorOp { + if self.enabled { + ::fold_ts_type_operator_op(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param( + &mut self, + node: TsTypeParam<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParam<'a> { + if self.enabled { + ::fold_ts_type_param(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param_decl( + &mut self, + node: TsTypeParamDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamDecl<'a> { + if self.enabled { + ::fold_ts_type_param_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_param_instantiation( + &mut self, + node: TsTypeParamInstantiation<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeParamInstantiation<'a> { + if self.enabled { + ::fold_ts_type_param_instantiation( + &mut self.visitor, + node, + __ast_path, + ) + } else { + node + } + } + + #[inline] + fn fold_ts_type_params( + &mut self, + node: Vec<'a, TsTypeParam<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsTypeParam<'a>> { + if self.enabled { + ::fold_ts_type_params(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_predicate( + &mut self, + node: TsTypePredicate<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypePredicate<'a> { + if self.enabled { + ::fold_ts_type_predicate(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_query( + &mut self, + node: TsTypeQuery<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQuery<'a> { + if self.enabled { + ::fold_ts_type_query(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_query_expr( + &mut self, + node: TsTypeQueryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeQueryExpr<'a> { + if self.enabled { + ::fold_ts_type_query_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_type_ref( + &mut self, + node: TsTypeRef<'a>, + __ast_path: &mut AstKindPath, + ) -> TsTypeRef<'a> { + if self.enabled { + ::fold_ts_type_ref(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_types( + &mut self, + node: Vec<'a, TsType<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, TsType<'a>> { + if self.enabled { + ::fold_ts_types(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_ts_union_or_intersection_type( + &mut self, + node: TsUnionOrIntersectionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionOrIntersectionType<'a> { + if self.enabled { + ::fold_ts_union_or_intersection_type( + &mut self.visitor, + node, + __ast_path, + ) + } else { + node + } + } + + #[inline] + fn fold_ts_union_type( + &mut self, + node: TsUnionType<'a>, + __ast_path: &mut AstKindPath, + ) -> TsUnionType<'a> { + if self.enabled { + ::fold_ts_union_type(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_unary_expr( + &mut self, + node: UnaryExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UnaryExpr<'a> { + if self.enabled { + ::fold_unary_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_unary_op(&mut self, node: UnaryOp, __ast_path: &mut AstKindPath) -> UnaryOp { + if self.enabled { + ::fold_unary_op(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_update_expr( + &mut self, + node: UpdateExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> UpdateExpr<'a> { + if self.enabled { + ::fold_update_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_update_op(&mut self, node: UpdateOp, __ast_path: &mut AstKindPath) -> UpdateOp { + if self.enabled { + ::fold_update_op(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_using_decl( + &mut self, + node: UsingDecl<'a>, + __ast_path: &mut AstKindPath, + ) -> UsingDecl<'a> { + if self.enabled { + ::fold_using_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_var_decl(&mut self, node: VarDecl<'a>, __ast_path: &mut AstKindPath) -> VarDecl<'a> { + if self.enabled { + ::fold_var_decl(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_var_decl_kind( + &mut self, + node: VarDeclKind, + __ast_path: &mut AstKindPath, + ) -> VarDeclKind { + if self.enabled { + ::fold_var_decl_kind(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_var_decl_or_expr( + &mut self, + node: VarDeclOrExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclOrExpr<'a> { + if self.enabled { + ::fold_var_decl_or_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_var_declarator( + &mut self, + node: VarDeclarator<'a>, + __ast_path: &mut AstKindPath, + ) -> VarDeclarator<'a> { + if self.enabled { + ::fold_var_declarator(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_var_declarators( + &mut self, + node: Vec<'a, VarDeclarator<'a>>, + __ast_path: &mut AstKindPath, + ) -> Vec<'a, VarDeclarator<'a>> { + if self.enabled { + ::fold_var_declarators(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_while_stmt( + &mut self, + node: WhileStmt<'a>, + __ast_path: &mut AstKindPath, + ) -> WhileStmt<'a> { + if self.enabled { + ::fold_while_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_with_stmt(&mut self, node: WithStmt<'a>, __ast_path: &mut AstKindPath) -> WithStmt<'a> { + if self.enabled { + ::fold_with_stmt(&mut self.visitor, node, __ast_path) + } else { + node + } + } + + #[inline] + fn fold_yield_expr( + &mut self, + node: YieldExpr<'a>, + __ast_path: &mut AstKindPath, + ) -> YieldExpr<'a> { + if self.enabled { + ::fold_yield_expr(&mut self.visitor, node, __ast_path) + } else { + node + } + } +} +#[doc = r" A trait implemented for types that can be visited using a visitor."] +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +pub trait FoldWithAstPath<'a, V: ?Sized + FoldAstPath<'a>> { + #[doc = r" Calls a visitor method (visitor.fold_xxx) with self."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self; + #[doc = r" Visit children nodes of `self`` with `visitor`."] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self; +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Accessibility { + #[doc = "Calls [FoldAstPath`::fold_accessibility`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_accessibility(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Accessibility::Public => Accessibility::Public, + Accessibility::Protected => Accessibility::Protected, + Accessibility::Private => Accessibility::Private, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ArrayLit<'a> { + #[doc = "Calls [FoldAstPath`::fold_array_lit`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_array_lit(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ArrayLit { span, elems } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrayLit(self::fields::ArrayLitField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let elems = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayLit( + self::fields::ArrayLitField::Elems(usize::MAX), + )); + >> as FoldWithAstPath>::fold_with_ast_path( + elems, + visitor, + &mut *__ast_path, + ) + }; + ArrayLit { span, elems } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ArrayPat<'a> { + #[doc = "Calls [FoldAstPath`::fold_array_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_array_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ArrayPat { + span, + elems, + optional, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrayPat(self::fields::ArrayPatField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let elems = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayPat( + self::fields::ArrayPatField::Elems(usize::MAX), + )); + >> as FoldWithAstPath>::fold_with_ast_path( + elems, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrayPat( + self::fields::ArrayPatField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + ArrayPat { + span, + elems, + optional, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ArrowExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_arrow_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_arrow_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ArrowExpr(self::fields::ArrowExprField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let return_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ArrowExpr( + self::fields::ArrowExprField::ReturnType, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + return_type, + visitor, + &mut *__ast_path, + ) + }; + ArrowExpr { + span, + ctxt, + params, + body, + is_async, + is_generator, + type_params, + return_type, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignExpr { + span, + op, + left, + right, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let op = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignExpr(self::fields::AssignExprField::Op)); + >::fold_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Left, + )); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignExpr( + self::fields::AssignExprField::Right, + )); + as FoldWithAstPath>::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + AssignExpr { + span, + op, + left, + right, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignPat<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignPat { span, left, right } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignPat(self::fields::AssignPatField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AssignPat(self::fields::AssignPatField::Left)); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPat( + self::fields::AssignPatField::Right, + )); + as FoldWithAstPath>::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + AssignPat { span, left, right } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignPatProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_pat_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_pat_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignPatProp { span, key, value } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignPatProp( + self::fields::AssignPatPropField::Value, + )); + > as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + AssignPatProp { span, key, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignProp { span, key, value } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Key, + )); + >::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignProp( + self::fields::AssignPropField::Value, + )); + as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + AssignProp { span, key, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignTarget<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_target`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_target(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignTarget::Simple { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTarget( + self::fields::AssignTargetField::Simple, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + AssignTarget::Simple { 0: _field_0 } + } + AssignTarget::Pat { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTarget( + self::fields::AssignTargetField::Pat, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + AssignTarget::Pat { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignTargetPat<'a> { + #[doc = "Calls [FoldAstPath`::fold_assign_target_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_target_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AssignTargetPat::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Array, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + AssignTargetPat::Array { 0: _field_0 } + } + AssignTargetPat::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Object, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + AssignTargetPat::Object { 0: _field_0 } + } + AssignTargetPat::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AssignTargetPat( + self::fields::AssignTargetPatField::Invalid, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + AssignTargetPat::Invalid { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AutoAccessor<'a> { + #[doc = "Calls [FoldAstPath`::fold_auto_accessor`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_auto_accessor(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Value, + )); + > as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::AutoAccessor( + self::fields::AutoAccessorField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + AutoAccessor { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_override, + definite, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AwaitExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_await_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_await_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + AwaitExpr { span, arg } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AwaitExpr(self::fields::AwaitExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::AwaitExpr(self::fields::AwaitExprField::Arg)); + as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + AwaitExpr { span, arg } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BigInt<'a> { + #[doc = "Calls [FoldAstPath`::fold_big_int`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_big_int(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BigInt { span, value, raw } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Value)); + as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let raw = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BigInt(self::fields::BigIntField::Raw)); + as FoldWithAstPath>::fold_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + BigInt { span, value, raw } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BinExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_bin_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_bin_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BinExpr { + span, + op, + left, + right, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let op = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Op)); + >::fold_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Left)); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BinExpr(self::fields::BinExprField::Right)); + as FoldWithAstPath>::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + BinExpr { + span, + op, + left, + right, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BindingIdent<'a> { + #[doc = "Calls [FoldAstPath`::fold_binding_ident`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_binding_ident(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BindingIdent { id, type_ann } => { + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BindingIdent( + self::fields::BindingIdentField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BindingIdent( + self::fields::BindingIdentField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + BindingIdent { id, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BlockStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_block_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_block_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BlockStmt { span, ctxt, stmts } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BlockStmt(self::fields::BlockStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BlockStmt(self::fields::BlockStmtField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let stmts = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmt( + self::fields::BlockStmtField::Stmts(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + stmts, + visitor, + &mut *__ast_path, + ) + }; + BlockStmt { span, ctxt, stmts } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BlockStmtOrExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_block_stmt_or_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_block_stmt_or_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BlockStmtOrExpr::BlockStmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmtOrExpr( + self::fields::BlockStmtOrExprField::BlockStmt, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + BlockStmtOrExpr::BlockStmt { 0: _field_0 } + } + BlockStmtOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BlockStmtOrExpr( + self::fields::BlockStmtOrExprField::Expr, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + BlockStmtOrExpr::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Bool { + #[doc = "Calls [FoldAstPath`::fold_bool`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_bool(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Bool { span, value } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Bool(self::fields::BoolField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + Bool { span, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BreakStmt { + #[doc = "Calls [FoldAstPath`::fold_break_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_break_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + BreakStmt { span, label } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::BreakStmt(self::fields::BreakStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let label = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::BreakStmt( + self::fields::BreakStmtField::Label, + )); + as FoldWithAstPath>::fold_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + BreakStmt { span, label } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for CallExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_call_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_call_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let callee = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CallExpr(self::fields::CallExprField::Callee)); + as FoldWithAstPath>::fold_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + let args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CallExpr( + self::fields::CallExprField::Args(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CallExpr( + self::fields::CallExprField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + CallExpr { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Callee<'a> { + #[doc = "Calls [FoldAstPath`::fold_callee`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_callee(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Callee::Super { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Super)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Callee::Super { 0: _field_0 } + } + Callee::Import { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Import)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Callee::Import { 0: _field_0 } + } + Callee::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Callee(self::fields::CalleeField::Expr)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Callee::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for CatchClause<'a> { + #[doc = "Calls [FoldAstPath`::fold_catch_clause`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_catch_clause(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + CatchClause { span, param, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Param, + )); + > as FoldWithAstPath>::fold_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::CatchClause( + self::fields::CatchClauseField::Body, + )); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + CatchClause { span, param, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Class<'a> { + #[doc = "Calls [FoldAstPath`::fold_class`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Class(self::fields::ClassField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Class(self::fields::ClassField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Body(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let super_class = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Class(self::fields::ClassField::SuperClass)); + > as FoldWithAstPath>::fold_with_ast_path( + super_class, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Class(self::fields::ClassField::TypeParams)); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let super_type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::SuperTypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (super_type_params , visitor , & mut * __ast_path) + }; + let implements = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Class( + self::fields::ClassField::Implements(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + implements, + visitor, + &mut *__ast_path, + ) + }; + Class { + span, + ctxt, + decorators, + body, + super_class, + is_abstract, + type_params, + super_type_params, + implements, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ClassDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_class_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ClassDecl { + ident, + declare, + class, + } => { + let ident = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassDecl( + self::fields::ClassDeclField::Ident, + )); + >::fold_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + let class = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassDecl( + self::fields::ClassDeclField::Class, + )); + > as FoldWithAstPath>::fold_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + ClassDecl { + ident, + declare, + class, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ClassExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_class_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ClassExpr { ident, class } => { + let ident = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassExpr( + self::fields::ClassExprField::Ident, + )); + as FoldWithAstPath>::fold_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + let class = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassExpr( + self::fields::ClassExprField::Class, + )); + > as FoldWithAstPath>::fold_with_ast_path( + class, + visitor, + &mut *__ast_path, + ) + }; + ClassExpr { ident, class } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ClassMember<'a> { + #[doc = "Calls [FoldAstPath`::fold_class_member`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_member(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ClassMember::Constructor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Constructor, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::Constructor { 0: _field_0 } + } + ClassMember::Method { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Method, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::Method { 0: _field_0 } + } + ClassMember::PrivateMethod { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::PrivateMethod, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::PrivateMethod { 0: _field_0 } + } + ClassMember::ClassProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::ClassProp, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::ClassProp { 0: _field_0 } + } + ClassMember::PrivateProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::PrivateProp, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::PrivateProp { 0: _field_0 } + } + ClassMember::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::TsIndexSignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::TsIndexSignature { 0: _field_0 } + } + ClassMember::Empty { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::Empty, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::Empty { 0: _field_0 } + } + ClassMember::StaticBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::StaticBlock, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::StaticBlock { 0: _field_0 } + } + ClassMember::AutoAccessor { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMember( + self::fields::ClassMemberField::AutoAccessor, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ClassMember::AutoAccessor { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ClassMethod<'a> { + #[doc = "Calls [FoldAstPath`::fold_class_method`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_method(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let function = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Function, + )); + > as FoldWithAstPath>::fold_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + let kind = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Kind, + )); + >::fold_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassMethod( + self::fields::ClassMethodField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + ClassMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ClassProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_class_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ClassProp(self::fields::ClassPropField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ClassProp(self::fields::ClassPropField::Key)); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Value, + )); + > as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ClassProp( + self::fields::ClassPropField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + ClassProp { + span, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_abstract, + is_optional, + is_override, + readonly, + declare, + definite, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ComputedPropName<'a> { + #[doc = "Calls [FoldAstPath`::fold_computed_prop_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_computed_prop_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ComputedPropName { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ComputedPropName( + self::fields::ComputedPropNameField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ComputedPropName( + self::fields::ComputedPropNameField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + ComputedPropName { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for CondExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_cond_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_cond_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + CondExpr { + span, + test, + cons, + alt, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Test)); + as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let cons = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Cons)); + as FoldWithAstPath>::fold_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + let alt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::CondExpr(self::fields::CondExprField::Alt)); + as FoldWithAstPath>::fold_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + CondExpr { + span, + test, + cons, + alt, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Constructor<'a> { + #[doc = "Calls [FoldAstPath`::fold_constructor`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_constructor(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Ctxt, + )); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Body, + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Constructor( + self::fields::ConstructorField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + Constructor { + span, + ctxt, + key, + params, + body, + accessibility, + is_optional, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ContinueStmt { + #[doc = "Calls [FoldAstPath`::fold_continue_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_continue_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ContinueStmt { span, label } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ContinueStmt( + self::fields::ContinueStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let label = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ContinueStmt( + self::fields::ContinueStmtField::Label, + )); + as FoldWithAstPath>::fold_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + ContinueStmt { span, label } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for DebuggerStmt { + #[doc = "Calls [FoldAstPath`::fold_debugger_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_debugger_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + DebuggerStmt { span } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DebuggerStmt( + self::fields::DebuggerStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + DebuggerStmt { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Decl<'a> { + #[doc = "Calls [FoldAstPath`::fold_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Decl::Class { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Class)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::Class { 0: _field_0 } + } + Decl::Fn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Fn)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::Fn { 0: _field_0 } + } + Decl::Var { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Var)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::Var { 0: _field_0 } + } + Decl::Using { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::Using)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::Using { 0: _field_0 } + } + Decl::TsInterface { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decl(self::fields::DeclField::TsInterface)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::TsInterface { 0: _field_0 } + } + Decl::TsTypeAlias { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decl(self::fields::DeclField::TsTypeAlias)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::TsTypeAlias { 0: _field_0 } + } + Decl::TsEnum { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::TsEnum)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::TsEnum { 0: _field_0 } + } + Decl::TsModule { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Decl(self::fields::DeclField::TsModule)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Decl::TsModule { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Decorator<'a> { + #[doc = "Calls [FoldAstPath`::fold_decorator`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_decorator(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Decorator { span, expr } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decorator(self::fields::DecoratorField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Decorator(self::fields::DecoratorField::Expr)); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + Decorator { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for DefaultDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_default_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_default_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + DefaultDecl::Class { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::Class, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + DefaultDecl::Class { 0: _field_0 } + } + DefaultDecl::Fn { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::Fn, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + DefaultDecl::Fn { 0: _field_0 } + } + DefaultDecl::TsInterfaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DefaultDecl( + self::fields::DefaultDeclField::TsInterfaceDecl, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + DefaultDecl::TsInterfaceDecl { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for DoWhileStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_do_while_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_do_while_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + DoWhileStmt { span, test, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Test, + )); + as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::DoWhileStmt( + self::fields::DoWhileStmtField::Body, + )); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + DoWhileStmt { span, test, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for EmptyStmt { + #[doc = "Calls [FoldAstPath`::fold_empty_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_empty_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + EmptyStmt { span } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::EmptyStmt(self::fields::EmptyStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + EmptyStmt { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportAll<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_all`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_all(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportAll { + span, + src, + type_only, + with, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let src = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::Src)); + as FoldWithAstPath>::fold_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + let with = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExportAll(self::fields::ExportAllField::With)); + >> as FoldWithAstPath>::fold_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + ExportAll { + span, + src, + type_only, + with, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportDecl { span, decl } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDecl( + self::fields::ExportDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let decl = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDecl( + self::fields::ExportDeclField::Decl, + )); + as FoldWithAstPath>::fold_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + ExportDecl { span, decl } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportDefaultDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_default_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_default_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportDefaultDecl { span, decl } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultDecl( + self::fields::ExportDefaultDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let decl = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultDecl( + self::fields::ExportDefaultDeclField::Decl, + )); + as FoldWithAstPath>::fold_with_ast_path( + decl, + visitor, + &mut *__ast_path, + ) + }; + ExportDefaultDecl { span, decl } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportDefaultExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_default_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_default_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportDefaultExpr { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultExpr( + self::fields::ExportDefaultExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportDefaultExpr( + self::fields::ExportDefaultExprField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + ExportDefaultExpr { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportDefaultSpecifier { + #[doc = "Calls [FoldAstPath`::fold_export_default_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_default_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportDefaultSpecifier { exported } => { + let exported = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportDefaultSpecifier( + self::fields::ExportDefaultSpecifierField::Exported, + )); + >::fold_with_ast_path( + exported, + visitor, + &mut *__ast_path, + ) + }; + ExportDefaultSpecifier { exported } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportNamedSpecifier<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_named_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_named_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let orig = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Orig, + )); + as FoldWithAstPath>::fold_with_ast_path( + orig, + visitor, + &mut *__ast_path, + ) + }; + let exported = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamedSpecifier( + self::fields::ExportNamedSpecifierField::Exported, + )); + > as FoldWithAstPath>::fold_with_ast_path( + exported, + visitor, + &mut *__ast_path, + ) + }; + ExportNamedSpecifier { + span, + orig, + exported, + is_type_only, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportNamespaceSpecifier<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_namespace_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_namespace_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportNamespaceSpecifier { span, name } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamespaceSpecifier( + self::fields::ExportNamespaceSpecifierField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ExportNamespaceSpecifier( + self::fields::ExportNamespaceSpecifierField::Name, + )); + as FoldWithAstPath>::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + ExportNamespaceSpecifier { span, name } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExportSpecifier<'a> { + #[doc = "Calls [FoldAstPath`::fold_export_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Namespace, + )); + let _field_0 = < Box < 'a , ExportNamespaceSpecifier < 'a > > as FoldWithAstPath < V > > :: fold_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + ExportSpecifier::Namespace { 0: _field_0 } + } + ExportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Default, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ExportSpecifier::Default { 0: _field_0 } + } + ExportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExportSpecifier( + self::fields::ExportSpecifierField::Named, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ExportSpecifier::Named { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Expr<'a> { + #[doc = "Calls [FoldAstPath`::fold_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Expr::This { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::This)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::This { 0: _field_0 } + } + Expr::Array { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Array)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Array { 0: _field_0 } + } + Expr::Object { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Object)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Object { 0: _field_0 } + } + Expr::Fn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Fn)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Fn { 0: _field_0 } + } + Expr::Unary { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Unary)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Unary { 0: _field_0 } + } + Expr::Update { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Update)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Update { 0: _field_0 } + } + Expr::Bin { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Bin)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Bin { 0: _field_0 } + } + Expr::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Assign)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Assign { 0: _field_0 } + } + Expr::Member { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Member)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Member { 0: _field_0 } + } + Expr::SuperProp { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::SuperProp)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::SuperProp { 0: _field_0 } + } + Expr::Cond { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Cond)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Cond { 0: _field_0 } + } + Expr::Call { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Call)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Call { 0: _field_0 } + } + Expr::New { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::New)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::New { 0: _field_0 } + } + Expr::Seq { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Seq)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Seq { 0: _field_0 } + } + Expr::Ident { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Ident)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Ident { 0: _field_0 } + } + Expr::Lit { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Lit)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Lit { 0: _field_0 } + } + Expr::Tpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Tpl)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Tpl { 0: _field_0 } + } + Expr::TaggedTpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TaggedTpl)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TaggedTpl { 0: _field_0 } + } + Expr::Arrow { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Arrow)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Arrow { 0: _field_0 } + } + Expr::Class { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Class)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Class { 0: _field_0 } + } + Expr::Yield { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Yield)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Yield { 0: _field_0 } + } + Expr::MetaProp { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::MetaProp)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::MetaProp { 0: _field_0 } + } + Expr::Await { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Await)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Await { 0: _field_0 } + } + Expr::Paren { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Paren)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Paren { 0: _field_0 } + } + Expr::JSXMember { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxmember)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::JSXMember { 0: _field_0 } + } + Expr::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::JsxnamespacedName, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::JSXNamespacedName { 0: _field_0 } + } + Expr::JSXEmpty { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxempty)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::JSXEmpty { 0: _field_0 } + } + Expr::JSXElement { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxelement)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::JSXElement { 0: _field_0 } + } + Expr::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::Jsxfragment)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::JSXFragment { 0: _field_0 } + } + Expr::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsTypeAssertion, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsTypeAssertion { 0: _field_0 } + } + Expr::TsConstAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsConstAssertion, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsConstAssertion { 0: _field_0 } + } + Expr::TsNonNull { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TsNonNull)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsNonNull { 0: _field_0 } + } + Expr::TsAs { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::TsAs)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsAs { 0: _field_0 } + } + Expr::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Expr( + self::fields::ExprField::TsInstantiation, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsInstantiation { 0: _field_0 } + } + Expr::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::TsSatisfies)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::TsSatisfies { 0: _field_0 } + } + Expr::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Expr(self::fields::ExprField::PrivateName)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::PrivateName { 0: _field_0 } + } + Expr::OptChain { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::OptChain)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::OptChain { 0: _field_0 } + } + Expr::Invalid { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Expr(self::fields::ExprField::Invalid)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Expr::Invalid { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExprOrSpread<'a> { + #[doc = "Calls [FoldAstPath`::fold_expr_or_spread`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_expr_or_spread(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExprOrSpread { spread, expr } => { + let spread = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExprOrSpread( + self::fields::ExprOrSpreadField::Spread, + )); + as FoldWithAstPath>::fold_with_ast_path( + spread, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ExprOrSpread( + self::fields::ExprOrSpreadField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + ExprOrSpread { spread, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ExprStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_expr_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_expr_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ExprStmt { span, expr } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExprStmt(self::fields::ExprStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ExprStmt(self::fields::ExprStmtField::Expr)); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + ExprStmt { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for FnDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_fn_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_fn_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + FnDecl { + ident, + declare, + function, + } => { + let ident = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnDecl(self::fields::FnDeclField::Ident)); + >::fold_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + let function = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnDecl(self::fields::FnDeclField::Function)); + > as FoldWithAstPath>::fold_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + FnDecl { + ident, + declare, + function, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for FnExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_fn_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_fn_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + FnExpr { ident, function } => { + let ident = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnExpr(self::fields::FnExprField::Ident)); + as FoldWithAstPath>::fold_with_ast_path( + ident, + visitor, + &mut *__ast_path, + ) + }; + let function = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::FnExpr(self::fields::FnExprField::Function)); + > as FoldWithAstPath>::fold_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + FnExpr { ident, function } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ForHead<'a> { + #[doc = "Calls [FoldAstPath`::fold_for_head`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_for_head(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ForHead::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForHead(self::fields::ForHeadField::VarDecl)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ForHead::VarDecl { 0: _field_0 } + } + ForHead::UsingDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForHead( + self::fields::ForHeadField::UsingDecl, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ForHead::UsingDecl { 0: _field_0 } + } + ForHead::Pat { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ForHead(self::fields::ForHeadField::Pat)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ForHead::Pat { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ForInStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_for_in_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_for_in_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ForInStmt { + span, + left, + right, + body, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Left)); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForInStmt( + self::fields::ForInStmtField::Right, + )); + as FoldWithAstPath>::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForInStmt(self::fields::ForInStmtField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + ForInStmt { + span, + left, + right, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ForOfStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_for_of_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_for_of_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ForOfStmt { + span, + is_await, + left, + right, + body, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Left)); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ForOfStmt( + self::fields::ForOfStmtField::Right, + )); + as FoldWithAstPath>::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForOfStmt(self::fields::ForOfStmtField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + ForOfStmt { + span, + is_await, + left, + right, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ForStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_for_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_for_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ForStmt { + span, + init, + test, + update, + body, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let init = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Init)); + > as FoldWithAstPath>::fold_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Test)); + > as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let update = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Update)); + > as FoldWithAstPath>::fold_with_ast_path( + update, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ForStmt(self::fields::ForStmtField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + ForStmt { + span, + init, + test, + update, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Function<'a> { + #[doc = "Calls [FoldAstPath`::fold_function`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_function(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } => { + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Function(self::fields::FunctionField::Body)); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let return_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Function( + self::fields::FunctionField::ReturnType, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + return_type, + visitor, + &mut *__ast_path, + ) + }; + Function { + params, + decorators, + span, + ctxt, + body, + is_generator, + is_async, + type_params, + return_type, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for GetterProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_getter_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_getter_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + GetterProp { + span, + key, + type_ann, + body, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::GetterProp( + self::fields::GetterPropField::Body, + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + GetterProp { + span, + key, + type_ann, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Ident { + #[doc = "Calls [FoldAstPath`::fold_ident`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ident(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Ident { + span, + ctxt, + sym, + optional, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let sym = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Ident(self::fields::IdentField::Sym)); + >::fold_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + Ident { + span, + ctxt, + sym, + optional, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for IdentName { + #[doc = "Calls [FoldAstPath`::fold_ident_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ident_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + IdentName { span, sym } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IdentName(self::fields::IdentNameField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let sym = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IdentName(self::fields::IdentNameField::Sym)); + >::fold_with_ast_path( + sym, + visitor, + &mut *__ast_path, + ) + }; + IdentName { span, sym } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for IfStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_if_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_if_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + IfStmt { + span, + test, + cons, + alt, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Test)); + as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let cons = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Cons)); + as FoldWithAstPath>::fold_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + let alt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::IfStmt(self::fields::IfStmtField::Alt)); + > as FoldWithAstPath>::fold_with_ast_path( + alt, + visitor, + &mut *__ast_path, + ) + }; + IfStmt { + span, + test, + cons, + alt, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Import { + #[doc = "Calls [FoldAstPath`::fold_import`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Import { span, phase } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Import(self::fields::ImportField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let phase = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Import(self::fields::ImportField::Phase)); + >::fold_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + Import { span, phase } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_import_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let specifiers = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Specifiers(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + specifiers, + visitor, + &mut *__ast_path, + ) + }; + let src = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Src, + )); + as FoldWithAstPath>::fold_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + let with = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::With, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + let phase = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportDecl( + self::fields::ImportDeclField::Phase, + )); + >::fold_with_ast_path( + phase, + visitor, + &mut *__ast_path, + ) + }; + ImportDecl { + span, + specifiers, + src, + type_only, + with, + phase, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportDefaultSpecifier { + #[doc = "Calls [FoldAstPath`::fold_import_default_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_default_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportDefaultSpecifier { span, local } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportDefaultSpecifier( + self::fields::ImportDefaultSpecifierField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let local = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportDefaultSpecifier( + self::fields::ImportDefaultSpecifierField::Local, + )); + >::fold_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + ImportDefaultSpecifier { span, local } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportNamedSpecifier<'a> { + #[doc = "Calls [FoldAstPath`::fold_import_named_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_named_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let local = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Local, + )); + >::fold_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + let imported = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportNamedSpecifier( + self::fields::ImportNamedSpecifierField::Imported, + )); + > as FoldWithAstPath>::fold_with_ast_path( + imported, + visitor, + &mut *__ast_path, + ) + }; + ImportNamedSpecifier { + span, + local, + imported, + is_type_only, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportPhase { + #[doc = "Calls [FoldAstPath`::fold_import_phase`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_phase(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportPhase::Evaluation => ImportPhase::Evaluation, + ImportPhase::Source => ImportPhase::Source, + ImportPhase::Defer => ImportPhase::Defer, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportSpecifier<'a> { + #[doc = "Calls [FoldAstPath`::fold_import_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportSpecifier::Named { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Named, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ImportSpecifier::Named { 0: _field_0 } + } + ImportSpecifier::Default { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Default, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ImportSpecifier::Default { 0: _field_0 } + } + ImportSpecifier::Namespace { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportSpecifier( + self::fields::ImportSpecifierField::Namespace, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ImportSpecifier::Namespace { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportStarAsSpecifier { + #[doc = "Calls [FoldAstPath`::fold_import_star_as_specifier`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_star_as_specifier(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportStarAsSpecifier { span, local } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportStarAsSpecifier( + self::fields::ImportStarAsSpecifierField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let local = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::ImportStarAsSpecifier( + self::fields::ImportStarAsSpecifierField::Local, + )); + >::fold_with_ast_path( + local, + visitor, + &mut *__ast_path, + ) + }; + ImportStarAsSpecifier { span, local } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportWith<'a> { + #[doc = "Calls [FoldAstPath`::fold_import_with`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_with(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportWith { span, values } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWith( + self::fields::ImportWithField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let values = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWith( + self::fields::ImportWithField::Values(usize::MAX), + )); + as FoldWithAstPath>::fold_with_ast_path( + values, + visitor, + &mut *__ast_path, + ) + }; + ImportWith { span, values } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ImportWithItem { + #[doc = "Calls [FoldAstPath`::fold_import_with_item`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_with_item(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ImportWithItem { key, value } => { + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWithItem( + self::fields::ImportWithItemField::Key, + )); + >::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ImportWithItem( + self::fields::ImportWithItemField::Value, + )); + >::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + ImportWithItem { key, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Invalid { + #[doc = "Calls [FoldAstPath`::fold_invalid`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_invalid(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Invalid { span } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Invalid(self::fields::InvalidField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + Invalid { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXAttr<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_attr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_attr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXAttr { span, name, value } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Name)); + as FoldWithAstPath>::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXAttr(self::fields::JSXAttrField::Value)); + > as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + JSXAttr { span, name, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXAttrName<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_attr_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_attr_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXAttrName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrName( + self::fields::JSXAttrNameField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrName::Ident { 0: _field_0 } + } + JSXAttrName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrName( + self::fields::JSXAttrNameField::JsxnamespacedName, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrName::JSXNamespacedName { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXAttrOrSpread<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_attr_or_spread`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_attr_or_spread(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXAttrOrSpread::JSXAttr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrOrSpread( + self::fields::JSXAttrOrSpreadField::Jsxattr, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrOrSpread::JSXAttr { 0: _field_0 } + } + JSXAttrOrSpread::SpreadElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrOrSpread( + self::fields::JSXAttrOrSpreadField::SpreadElement, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrOrSpread::SpreadElement { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXAttrValue<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_attr_value`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_attr_value(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXAttrValue::Lit { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Lit, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrValue::Lit { 0: _field_0 } + } + JSXAttrValue::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::JsxexprContainer, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrValue::JSXExprContainer { 0: _field_0 } + } + JSXAttrValue::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Jsxelement, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrValue::JSXElement { 0: _field_0 } + } + JSXAttrValue::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXAttrValue( + self::fields::JSXAttrValueField::Jsxfragment, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXAttrValue::JSXFragment { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXClosingElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_closing_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_closing_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXClosingElement { span, name } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingElement( + self::fields::JSXClosingElementField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingElement( + self::fields::JSXClosingElementField::Name, + )); + as FoldWithAstPath>::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + JSXClosingElement { span, name } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXClosingFragment { + #[doc = "Calls [FoldAstPath`::fold_jsx_closing_fragment`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_closing_fragment(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXClosingFragment { span } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXClosingFragment( + self::fields::JSXClosingFragmentField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + JSXClosingFragment { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXElement { + span, + opening, + children, + closing, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let opening = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Opening, + )); + as FoldWithAstPath>::fold_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + let children = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Children(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + children, + visitor, + &mut *__ast_path, + ) + }; + let closing = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElement( + self::fields::JSXElementField::Closing, + )); + > as FoldWithAstPath>::fold_with_ast_path( + closing, + visitor, + &mut *__ast_path, + ) + }; + JSXElement { + span, + opening, + children, + closing, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXElementChild<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_element_child`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_element_child(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXElementChild::JSXText { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxtext, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementChild::JSXText { 0: _field_0 } + } + JSXElementChild::JSXExprContainer { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::JsxexprContainer, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementChild::JSXExprContainer { 0: _field_0 } + } + JSXElementChild::JSXSpreadChild { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::JsxspreadChild, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementChild::JSXSpreadChild { 0: _field_0 } + } + JSXElementChild::JSXElement { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxelement, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementChild::JSXElement { 0: _field_0 } + } + JSXElementChild::JSXFragment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementChild( + self::fields::JSXElementChildField::Jsxfragment, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementChild::JSXFragment { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXElementName<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_element_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_element_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXElementName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementName::Ident { 0: _field_0 } + } + JSXElementName::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::JsxmemberExpr, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementName::JSXMemberExpr { 0: _field_0 } + } + JSXElementName::JSXNamespacedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXElementName( + self::fields::JSXElementNameField::JsxnamespacedName, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXElementName::JSXNamespacedName { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXEmptyExpr { + #[doc = "Calls [FoldAstPath`::fold_jsx_empty_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_empty_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXEmptyExpr { span } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXEmptyExpr( + self::fields::JSXEmptyExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + JSXEmptyExpr { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXExpr::JSXEmptyExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExpr( + self::fields::JSXExprField::JsxemptyExpr, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXExpr::JSXEmptyExpr { 0: _field_0 } + } + JSXExpr::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::JSXExpr(self::fields::JSXExprField::Expr)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXExpr::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXExprContainer<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_expr_container`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_expr_container(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXExprContainer { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExprContainer( + self::fields::JSXExprContainerField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXExprContainer( + self::fields::JSXExprContainerField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + JSXExprContainer { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXFragment<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_fragment`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_fragment(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXFragment { + span, + opening, + children, + closing, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let opening = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Opening, + )); + >::fold_with_ast_path( + opening, + visitor, + &mut *__ast_path, + ) + }; + let children = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Children(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + children, + visitor, + &mut *__ast_path, + ) + }; + let closing = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXFragment( + self::fields::JSXFragmentField::Closing, + )); + >::fold_with_ast_path( + closing, + visitor, + &mut *__ast_path, + ) + }; + JSXFragment { + span, + opening, + children, + closing, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXMemberExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_member_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_member_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXMemberExpr { span, obj, prop } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let obj = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Obj, + )); + as FoldWithAstPath>::fold_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + let prop = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXMemberExpr( + self::fields::JSXMemberExprField::Prop, + )); + >::fold_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + JSXMemberExpr { span, obj, prop } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXNamespacedName { + #[doc = "Calls [FoldAstPath`::fold_jsx_namespaced_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_namespaced_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXNamespacedName { span, ns, name } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ns = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Ns, + )); + >::fold_with_ast_path( + ns, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXNamespacedName( + self::fields::JSXNamespacedNameField::Name, + )); + >::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + JSXNamespacedName { span, ns, name } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXObject<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_object`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_object(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXObject::JSXMemberExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXObject( + self::fields::JSXObjectField::JsxmemberExpr, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXObject::JSXMemberExpr { 0: _field_0 } + } + JSXObject::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXObject( + self::fields::JSXObjectField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + JSXObject::Ident { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXOpeningElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_opening_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_opening_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } => { + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Name, + )); + as FoldWithAstPath>::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let attrs = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::Attrs(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + attrs, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningElement( + self::fields::JSXOpeningElementField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + JSXOpeningElement { + name, + span, + attrs, + self_closing, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXOpeningFragment { + #[doc = "Calls [FoldAstPath`::fold_jsx_opening_fragment`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_opening_fragment(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXOpeningFragment { span } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXOpeningFragment( + self::fields::JSXOpeningFragmentField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + JSXOpeningFragment { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXSpreadChild<'a> { + #[doc = "Calls [FoldAstPath`::fold_jsx_spread_child`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_spread_child(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXSpreadChild { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXSpreadChild( + self::fields::JSXSpreadChildField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::JSXSpreadChild( + self::fields::JSXSpreadChildField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + JSXSpreadChild { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for JSXText { + #[doc = "Calls [FoldAstPath`::fold_jsx_text`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_text(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + JSXText { span, value, raw } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Value)); + >::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let raw = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::JSXText(self::fields::JSXTextField::Raw)); + >::fold_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + JSXText { span, value, raw } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Key<'a> { + #[doc = "Calls [FoldAstPath`::fold_key`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_key(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Key::Private { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Key(self::fields::KeyField::Private)); + let _field_0 = >::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Key::Private { 0: _field_0 } + } + Key::Public { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Key(self::fields::KeyField::Public)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Key::Public { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for KeyValuePatProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_key_value_pat_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_key_value_pat_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + KeyValuePatProp { key, value } => { + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValuePatProp( + self::fields::KeyValuePatPropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValuePatProp( + self::fields::KeyValuePatPropField::Value, + )); + as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + KeyValuePatProp { key, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for KeyValueProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_key_value_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_key_value_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + KeyValueProp { key, value } => { + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValueProp( + self::fields::KeyValuePropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::KeyValueProp( + self::fields::KeyValuePropField::Value, + )); + as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + KeyValueProp { key, value } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for LabeledStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_labeled_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_labeled_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + LabeledStmt { span, label, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let label = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Label, + )); + >::fold_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::LabeledStmt( + self::fields::LabeledStmtField::Body, + )); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + LabeledStmt { span, label, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Lit<'a> { + #[doc = "Calls [FoldAstPath`::fold_lit`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_lit(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Lit::Str { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Str)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::Str { 0: _field_0 } + } + Lit::Bool { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Bool)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::Bool { 0: _field_0 } + } + Lit::Null { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Null)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::Null { 0: _field_0 } + } + Lit::Num { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Num)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::Num { 0: _field_0 } + } + Lit::BigInt { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::BigInt)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::BigInt { 0: _field_0 } + } + Lit::Regex { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Regex)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::Regex { 0: _field_0 } + } + Lit::JSXText { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Lit(self::fields::LitField::Jsxtext)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Lit::JSXText { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MemberExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_member_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_member_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MemberExpr { span, obj, prop } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let obj = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Obj, + )); + as FoldWithAstPath>::fold_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + let prop = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberExpr( + self::fields::MemberExprField::Prop, + )); + as FoldWithAstPath>::fold_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + MemberExpr { span, obj, prop } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MemberProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_member_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_member_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MemberProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + MemberProp::Ident { 0: _field_0 } + } + MemberProp::PrivateName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::PrivateName, + )); + let _field_0 = >::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + MemberProp::PrivateName { 0: _field_0 } + } + MemberProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MemberProp( + self::fields::MemberPropField::Computed, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + MemberProp::Computed { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MetaPropExpr { + #[doc = "Calls [FoldAstPath`::fold_meta_prop_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_meta_prop_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MetaPropExpr { span, kind } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MetaPropExpr( + self::fields::MetaPropExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let kind = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MetaPropExpr( + self::fields::MetaPropExprField::Kind, + )); + >::fold_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + MetaPropExpr { span, kind } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MetaPropKind { + #[doc = "Calls [FoldAstPath`::fold_meta_prop_kind`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_meta_prop_kind(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MetaPropKind::NewTarget => MetaPropKind::NewTarget, + MetaPropKind::ImportMeta => MetaPropKind::ImportMeta, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MethodKind { + #[doc = "Calls [FoldAstPath`::fold_method_kind`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_method_kind(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MethodKind::Method => MethodKind::Method, + MethodKind::Getter => MethodKind::Getter, + MethodKind::Setter => MethodKind::Setter, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for MethodProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_method_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_method_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + MethodProp { key, function } => { + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MethodProp( + self::fields::MethodPropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let function = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::MethodProp( + self::fields::MethodPropField::Function, + )); + > as FoldWithAstPath>::fold_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + MethodProp { key, function } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Module<'a> { + #[doc = "Calls [FoldAstPath`::fold_module`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_module(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Module { + span, + body, + shebang, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Module(self::fields::ModuleField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Module( + self::fields::ModuleField::Body(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let shebang = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Module(self::fields::ModuleField::Shebang)); + as FoldWithAstPath>::fold_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + Module { + span, + body, + shebang, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ModuleDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_module_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_module_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ModuleDecl::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::Import, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::Import { 0: _field_0 } + } + ModuleDecl::ExportDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDecl, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::ExportDecl { 0: _field_0 } + } + ModuleDecl::ExportNamed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportNamed, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::ExportNamed { 0: _field_0 } + } + ModuleDecl::ExportDefaultDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDefaultDecl, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::ExportDefaultDecl { 0: _field_0 } + } + ModuleDecl::ExportDefaultExpr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportDefaultExpr, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::ExportDefaultExpr { 0: _field_0 } + } + ModuleDecl::ExportAll { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::ExportAll, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::ExportAll { 0: _field_0 } + } + ModuleDecl::TsImportEquals { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsImportEquals, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::TsImportEquals { 0: _field_0 } + } + ModuleDecl::TsExportAssignment { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsExportAssignment, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::TsExportAssignment { 0: _field_0 } + } + ModuleDecl::TsNamespaceExport { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleDecl( + self::fields::ModuleDeclField::TsNamespaceExport, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleDecl::TsNamespaceExport { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ModuleExportName<'a> { + #[doc = "Calls [FoldAstPath`::fold_module_export_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_module_export_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ModuleExportName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleExportName( + self::fields::ModuleExportNameField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleExportName::Ident { 0: _field_0 } + } + ModuleExportName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleExportName( + self::fields::ModuleExportNameField::Str, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleExportName::Str { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ModuleItem<'a> { + #[doc = "Calls [FoldAstPath`::fold_module_item`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_module_item(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ModuleItem::ModuleDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleItem( + self::fields::ModuleItemField::ModuleDecl, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleItem::ModuleDecl { 0: _field_0 } + } + ModuleItem::Stmt { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ModuleItem( + self::fields::ModuleItemField::Stmt, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ModuleItem::Stmt { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for NamedExport<'a> { + #[doc = "Calls [FoldAstPath`::fold_named_export`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_named_export(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + NamedExport { + span, + specifiers, + src, + type_only, + with, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let specifiers = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Specifiers(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + specifiers, + visitor, + &mut *__ast_path, + ) + }; + let src = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::Src, + )); + > as FoldWithAstPath>::fold_with_ast_path( + src, + visitor, + &mut *__ast_path, + ) + }; + let with = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NamedExport( + self::fields::NamedExportField::With, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + with, + visitor, + &mut *__ast_path, + ) + }; + NamedExport { + span, + specifiers, + src, + type_only, + with, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for NewExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_new_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_new_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let callee = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::Callee)); + as FoldWithAstPath>::fold_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + let args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::NewExpr( + self::fields::NewExprField::Args(usize::MAX), + )); + >> as FoldWithAstPath>::fold_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::NewExpr(self::fields::NewExprField::TypeArgs)); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + NewExpr { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Null { + #[doc = "Calls [FoldAstPath`::fold_null`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_null(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Null { span } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Null(self::fields::NullField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + Null { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Number { + #[doc = "Calls [FoldAstPath`::fold_number`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_number(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Number { span, value, raw } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Number(self::fields::NumberField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let raw = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Number(self::fields::NumberField::Raw)); + as FoldWithAstPath>::fold_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + Number { span, value, raw } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ObjectLit<'a> { + #[doc = "Calls [FoldAstPath`::fold_object_lit`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_object_lit(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ObjectLit { span, props } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ObjectLit(self::fields::ObjectLitField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let props = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectLit( + self::fields::ObjectLitField::Props(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + ObjectLit { span, props } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ObjectPat<'a> { + #[doc = "Calls [FoldAstPath`::fold_object_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_object_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ObjectPat { + span, + props, + optional, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ObjectPat(self::fields::ObjectPatField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let props = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPat( + self::fields::ObjectPatField::Props(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + props, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPat( + self::fields::ObjectPatField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + ObjectPat { + span, + props, + optional, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ObjectPatProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_object_pat_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_object_pat_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ObjectPatProp::KeyValue { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::KeyValue, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ObjectPatProp::KeyValue { 0: _field_0 } + } + ObjectPatProp::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::Assign, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ObjectPatProp::Assign { 0: _field_0 } + } + ObjectPatProp::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ObjectPatProp( + self::fields::ObjectPatPropField::Rest, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ObjectPatProp::Rest { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for OptCall<'a> { + #[doc = "Calls [FoldAstPath`::fold_opt_call`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_call(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + OptCall { + span, + ctxt, + callee, + args, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let callee = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::Callee)); + as FoldWithAstPath>::fold_with_ast_path( + callee, + visitor, + &mut *__ast_path, + ) + }; + let args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptCall( + self::fields::OptCallField::Args(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + args, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::OptCall(self::fields::OptCallField::TypeArgs)); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + OptCall { + span, + ctxt, + callee, + args, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for OptChainBase<'a> { + #[doc = "Calls [FoldAstPath`::fold_opt_chain_base`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_chain_base(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + OptChainBase::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainBase( + self::fields::OptChainBaseField::Member, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + OptChainBase::Member { 0: _field_0 } + } + OptChainBase::Call { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainBase( + self::fields::OptChainBaseField::Call, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + OptChainBase::Call { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for OptChainExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_opt_chain_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_chain_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + OptChainExpr { + span, + optional, + base, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainExpr( + self::fields::OptChainExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let base = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::OptChainExpr( + self::fields::OptChainExprField::Base, + )); + as FoldWithAstPath>::fold_with_ast_path( + base, + visitor, + &mut *__ast_path, + ) + }; + OptChainExpr { + span, + optional, + base, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Param<'a> { + #[doc = "Calls [FoldAstPath`::fold_param`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_param(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Param { + span, + decorators, + pat, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Param(self::fields::ParamField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Param( + self::fields::ParamField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let pat = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Param(self::fields::ParamField::Pat)); + as FoldWithAstPath>::fold_with_ast_path( + pat, + visitor, + &mut *__ast_path, + ) + }; + Param { + span, + decorators, + pat, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ParamOrTsParamProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_param_or_ts_param_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_param_or_ts_param_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ParamOrTsParamProp::TsParamProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ParamOrTsParamProp( + self::fields::ParamOrTsParamPropField::TsParamProp, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ParamOrTsParamProp::TsParamProp { 0: _field_0 } + } + ParamOrTsParamProp::Param { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ParamOrTsParamProp( + self::fields::ParamOrTsParamPropField::Param, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + ParamOrTsParamProp::Param { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ParenExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_paren_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_paren_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ParenExpr { span, expr } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ParenExpr(self::fields::ParenExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ParenExpr(self::fields::ParenExprField::Expr)); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + ParenExpr { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Pat<'a> { + #[doc = "Calls [FoldAstPath`::fold_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Pat::Ident { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Ident)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Ident { 0: _field_0 } + } + Pat::Array { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Array)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Array { 0: _field_0 } + } + Pat::Rest { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Rest)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Rest { 0: _field_0 } + } + Pat::Object { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Object)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Object { 0: _field_0 } + } + Pat::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Assign)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Assign { 0: _field_0 } + } + Pat::Invalid { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Invalid)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Invalid { 0: _field_0 } + } + Pat::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Pat(self::fields::PatField::Expr)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Pat::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for PrivateMethod<'a> { + #[doc = "Calls [FoldAstPath`::fold_private_method`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_private_method(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Key, + )); + >::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let function = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Function, + )); + > as FoldWithAstPath>::fold_with_ast_path( + function, + visitor, + &mut *__ast_path, + ) + }; + let kind = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Kind, + )); + >::fold_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateMethod( + self::fields::PrivateMethodField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + PrivateMethod { + span, + key, + function, + kind, + is_static, + accessibility, + is_abstract, + is_optional, + is_override, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for PrivateName { + #[doc = "Calls [FoldAstPath`::fold_private_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_private_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + PrivateName { span, name } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateName( + self::fields::PrivateNameField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateName( + self::fields::PrivateNameField::Name, + )); + >::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + PrivateName { span, name } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for PrivateProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_private_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_private_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Ctxt, + )); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Key, + )); + >::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Value, + )); + > as FoldWithAstPath>::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PrivateProp( + self::fields::PrivatePropField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + PrivateProp { + span, + ctxt, + key, + value, + type_ann, + is_static, + decorators, + accessibility, + is_optional, + is_override, + readonly, + definite, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Program<'a> { + #[doc = "Calls [FoldAstPath`::fold_program`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_program(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Program::Module { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Program(self::fields::ProgramField::Module)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Program::Module { 0: _field_0 } + } + Program::Script { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Program(self::fields::ProgramField::Script)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Program::Script { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Prop<'a> { + #[doc = "Calls [FoldAstPath`::fold_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Prop::Shorthand { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Shorthand)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::Shorthand { 0: _field_0 } + } + Prop::KeyValue { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::KeyValue)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::KeyValue { 0: _field_0 } + } + Prop::Assign { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Assign)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::Assign { 0: _field_0 } + } + Prop::Getter { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Getter)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::Getter { 0: _field_0 } + } + Prop::Setter { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Setter)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::Setter { 0: _field_0 } + } + Prop::Method { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Prop(self::fields::PropField::Method)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Prop::Method { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for PropName<'a> { + #[doc = "Calls [FoldAstPath`::fold_prop_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_prop_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + PropName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Ident)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropName::Ident { 0: _field_0 } + } + PropName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Str)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropName::Str { 0: _field_0 } + } + PropName::Num { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::Num)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropName::Num { 0: _field_0 } + } + PropName::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropName( + self::fields::PropNameField::Computed, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropName::Computed { 0: _field_0 } + } + PropName::BigInt { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::PropName(self::fields::PropNameField::BigInt)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropName::BigInt { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for PropOrSpread<'a> { + #[doc = "Calls [FoldAstPath`::fold_prop_or_spread`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_prop_or_spread(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + PropOrSpread::Spread { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropOrSpread( + self::fields::PropOrSpreadField::Spread, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropOrSpread::Spread { 0: _field_0 } + } + PropOrSpread::Prop { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::PropOrSpread( + self::fields::PropOrSpreadField::Prop, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + PropOrSpread::Prop { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Regex { + #[doc = "Calls [FoldAstPath`::fold_regex`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_regex(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Regex { span, exp, flags } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Regex(self::fields::RegexField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let exp = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Regex(self::fields::RegexField::Exp)); + >::fold_with_ast_path( + exp, + visitor, + &mut *__ast_path, + ) + }; + let flags = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Regex(self::fields::RegexField::Flags)); + >::fold_with_ast_path( + flags, + visitor, + &mut *__ast_path, + ) + }; + Regex { span, exp, flags } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for RestPat<'a> { + #[doc = "Calls [FoldAstPath`::fold_rest_pat`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_rest_pat(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + RestPat { + span, + dot3_token, + arg, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let dot3_token = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::RestPat( + self::fields::RestPatField::Dot3Token, + )); + >::fold_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::Arg)); + as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::RestPat(self::fields::RestPatField::TypeAnn)); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + RestPat { + span, + dot3_token, + arg, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ReturnStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_return_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_return_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ReturnStmt { span, arg } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ReturnStmt( + self::fields::ReturnStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::ReturnStmt( + self::fields::ReturnStmtField::Arg, + )); + > as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + ReturnStmt { span, arg } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Script<'a> { + #[doc = "Calls [FoldAstPath`::fold_script`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_script(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Script { + span, + body, + shebang, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Script(self::fields::ScriptField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Script( + self::fields::ScriptField::Body(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + let shebang = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::Script(self::fields::ScriptField::Shebang)); + as FoldWithAstPath>::fold_with_ast_path( + shebang, + visitor, + &mut *__ast_path, + ) + }; + Script { + span, + body, + shebang, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SeqExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_seq_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_seq_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SeqExpr { span, exprs } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::SeqExpr(self::fields::SeqExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let exprs = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SeqExpr( + self::fields::SeqExprField::Exprs(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + SeqExpr { span, exprs } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SetterProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_setter_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_setter_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SetterProp { + span, + key, + this_param, + param, + body, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let this_param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::ThisParam, + )); + > as FoldWithAstPath>::fold_with_ast_path( + this_param, + visitor, + &mut *__ast_path, + ) + }; + let param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Param, + )); + as FoldWithAstPath>::fold_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SetterProp( + self::fields::SetterPropField::Body, + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + SetterProp { + span, + key, + this_param, + param, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SimpleAssignTarget<'a> { + #[doc = "Calls [FoldAstPath`::fold_simple_assign_target`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_simple_assign_target(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SimpleAssignTarget::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Ident, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::Ident { 0: _field_0 } + } + SimpleAssignTarget::Member { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Member, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::Member { 0: _field_0 } + } + SimpleAssignTarget::SuperProp { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::SuperProp, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::SuperProp { 0: _field_0 } + } + SimpleAssignTarget::Paren { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Paren, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::Paren { 0: _field_0 } + } + SimpleAssignTarget::OptChain { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::OptChain, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::OptChain { 0: _field_0 } + } + SimpleAssignTarget::TsAs { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsAs, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::TsAs { 0: _field_0 } + } + SimpleAssignTarget::TsSatisfies { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsSatisfies, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::TsSatisfies { 0: _field_0 } + } + SimpleAssignTarget::TsNonNull { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsNonNull, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::TsNonNull { 0: _field_0 } + } + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsTypeAssertion, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::TsTypeAssertion { 0: _field_0 } + } + SimpleAssignTarget::TsInstantiation { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::TsInstantiation, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::TsInstantiation { 0: _field_0 } + } + SimpleAssignTarget::Invalid { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SimpleAssignTarget( + self::fields::SimpleAssignTargetField::Invalid, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SimpleAssignTarget::Invalid { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SpreadElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_spread_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_spread_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SpreadElement { dot3_token, expr } => { + let dot3_token = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SpreadElement( + self::fields::SpreadElementField::Dot3Token, + )); + >::fold_with_ast_path( + dot3_token, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SpreadElement( + self::fields::SpreadElementField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + SpreadElement { dot3_token, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for StaticBlock<'a> { + #[doc = "Calls [FoldAstPath`::fold_static_block`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_static_block(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + StaticBlock { span, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::StaticBlock( + self::fields::StaticBlockField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::StaticBlock( + self::fields::StaticBlockField::Body, + )); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + StaticBlock { span, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Stmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Stmt::Block { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Block)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Block { 0: _field_0 } + } + Stmt::Empty { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Empty)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Empty { 0: _field_0 } + } + Stmt::Debugger { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Debugger)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Debugger { 0: _field_0 } + } + Stmt::With { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::With)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::With { 0: _field_0 } + } + Stmt::Return { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Return)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Return { 0: _field_0 } + } + Stmt::Labeled { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Labeled)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Labeled { 0: _field_0 } + } + Stmt::Break { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Break)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Break { 0: _field_0 } + } + Stmt::Continue { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Continue)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Continue { 0: _field_0 } + } + Stmt::If { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::If)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::If { 0: _field_0 } + } + Stmt::Switch { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Switch)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Switch { 0: _field_0 } + } + Stmt::Throw { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Throw)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Throw { 0: _field_0 } + } + Stmt::Try { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Try)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Try { 0: _field_0 } + } + Stmt::While { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::While)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::While { 0: _field_0 } + } + Stmt::DoWhile { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::DoWhile)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::DoWhile { 0: _field_0 } + } + Stmt::For { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::For)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::For { 0: _field_0 } + } + Stmt::ForIn { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::ForIn)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::ForIn { 0: _field_0 } + } + Stmt::ForOf { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::ForOf)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::ForOf { 0: _field_0 } + } + Stmt::Decl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Decl)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Decl { 0: _field_0 } + } + Stmt::Expr { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Stmt(self::fields::StmtField::Expr)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + Stmt::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Str { + #[doc = "Calls [FoldAstPath`::fold_str`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_str(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Str { span, value, raw } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let value = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Value)); + >::fold_with_ast_path( + value, + visitor, + &mut *__ast_path, + ) + }; + let raw = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Str(self::fields::StrField::Raw)); + as FoldWithAstPath>::fold_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + Str { span, value, raw } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Super { + #[doc = "Calls [FoldAstPath`::fold_super`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_super(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Super { span } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Super(self::fields::SuperField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + Super { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SuperProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_super_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_super_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SuperProp::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperProp( + self::fields::SuperPropField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SuperProp::Ident { 0: _field_0 } + } + SuperProp::Computed { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperProp( + self::fields::SuperPropField::Computed, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + SuperProp::Computed { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SuperPropExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_super_prop_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_super_prop_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SuperPropExpr { span, obj, prop } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let obj = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Obj, + )); + >::fold_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + let prop = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SuperPropExpr( + self::fields::SuperPropExprField::Prop, + )); + as FoldWithAstPath>::fold_with_ast_path( + prop, + visitor, + &mut *__ast_path, + ) + }; + SuperPropExpr { span, obj, prop } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SwitchCase<'a> { + #[doc = "Calls [FoldAstPath`::fold_switch_case`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_switch_case(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SwitchCase { span, test, cons } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Test, + )); + > as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let cons = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchCase( + self::fields::SwitchCaseField::Cons(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + cons, + visitor, + &mut *__ast_path, + ) + }; + SwitchCase { span, test, cons } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for SwitchStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_switch_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_switch_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + SwitchStmt { + span, + discriminant, + cases, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let discriminant = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Discriminant, + )); + as FoldWithAstPath>::fold_with_ast_path( + discriminant, + visitor, + &mut *__ast_path, + ) + }; + let cases = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::SwitchStmt( + self::fields::SwitchStmtField::Cases(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + cases, + visitor, + &mut *__ast_path, + ) + }; + SwitchStmt { + span, + discriminant, + cases, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TaggedTpl<'a> { + #[doc = "Calls [FoldAstPath`::fold_tagged_tpl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_tagged_tpl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let tag = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Tag)); + as FoldWithAstPath>::fold_with_ast_path( + tag, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TaggedTpl( + self::fields::TaggedTplField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + let tpl = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TaggedTpl(self::fields::TaggedTplField::Tpl)); + > as FoldWithAstPath>::fold_with_ast_path( + tpl, + visitor, + &mut *__ast_path, + ) + }; + TaggedTpl { + span, + ctxt, + tag, + type_params, + tpl, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ThisExpr { + #[doc = "Calls [FoldAstPath`::fold_this_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_this_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ThisExpr { span } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThisExpr(self::fields::ThisExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + ThisExpr { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for ThrowStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_throw_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_throw_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + ThrowStmt { span, arg } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThrowStmt(self::fields::ThrowStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::ThrowStmt(self::fields::ThrowStmtField::Arg)); + as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + ThrowStmt { span, arg } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Tpl<'a> { + #[doc = "Calls [FoldAstPath`::fold_tpl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_tpl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + Tpl { + span, + exprs, + quasis, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::Tpl(self::fields::TplField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let exprs = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Tpl( + self::fields::TplField::Exprs(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + exprs, + visitor, + &mut *__ast_path, + ) + }; + let quasis = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::Tpl( + self::fields::TplField::Quasis(usize::MAX), + )); + as FoldWithAstPath>::fold_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + Tpl { + span, + exprs, + quasis, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TplElement { + #[doc = "Calls [FoldAstPath`::fold_tpl_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_tpl_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TplElement { + span, + tail, + cooked, + raw, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let cooked = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Cooked, + )); + as FoldWithAstPath>::fold_with_ast_path( + cooked, + visitor, + &mut *__ast_path, + ) + }; + let raw = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TplElement( + self::fields::TplElementField::Raw, + )); + >::fold_with_ast_path( + raw, + visitor, + &mut *__ast_path, + ) + }; + TplElement { + span, + tail, + cooked, + raw, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TruePlusMinus { + #[doc = "Calls [FoldAstPath`::fold_true_plus_minus`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_true_plus_minus(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TruePlusMinus::True => TruePlusMinus::True, + TruePlusMinus::Plus => TruePlusMinus::Plus, + TruePlusMinus::Minus => TruePlusMinus::Minus, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TryStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_try_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_try_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TryStmt { + span, + block, + handler, + finalizer, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let block = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Block)); + as FoldWithAstPath>::fold_with_ast_path( + block, + visitor, + &mut *__ast_path, + ) + }; + let handler = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TryStmt(self::fields::TryStmtField::Handler)); + > as FoldWithAstPath>::fold_with_ast_path( + handler, + visitor, + &mut *__ast_path, + ) + }; + let finalizer = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TryStmt( + self::fields::TryStmtField::Finalizer, + )); + > as FoldWithAstPath>::fold_with_ast_path( + finalizer, + visitor, + &mut *__ast_path, + ) + }; + TryStmt { + span, + block, + handler, + finalizer, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsArrayType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_array_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_array_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsArrayType { span, elem_type } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsArrayType( + self::fields::TsArrayTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let elem_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsArrayType( + self::fields::TsArrayTypeField::ElemType, + )); + as FoldWithAstPath>::fold_with_ast_path( + elem_type, + visitor, + &mut *__ast_path, + ) + }; + TsArrayType { span, elem_type } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsAsExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_as_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_as_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsAsExpr { + span, + expr, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsAsExpr(self::fields::TsAsExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsAsExpr(self::fields::TsAsExprField::Expr)); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsAsExpr( + self::fields::TsAsExprField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsAsExpr { + span, + expr, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsCallSignatureDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_call_signature_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_call_signature_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsCallSignatureDecl( + self::fields::TsCallSignatureDeclField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + TsCallSignatureDecl { + span, + params, + type_ann, + type_params, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsConditionalType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_conditional_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_conditional_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let check_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::CheckType, + )); + as FoldWithAstPath>::fold_with_ast_path( + check_type, + visitor, + &mut *__ast_path, + ) + }; + let extends_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::ExtendsType, + )); + as FoldWithAstPath>::fold_with_ast_path( + extends_type, + visitor, + &mut *__ast_path, + ) + }; + let true_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::TrueType, + )); + as FoldWithAstPath>::fold_with_ast_path( + true_type, + visitor, + &mut *__ast_path, + ) + }; + let false_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConditionalType( + self::fields::TsConditionalTypeField::FalseType, + )); + as FoldWithAstPath>::fold_with_ast_path( + false_type, + visitor, + &mut *__ast_path, + ) + }; + TsConditionalType { + span, + check_type, + extends_type, + true_type, + false_type, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsConstAssertion<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_const_assertion`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_const_assertion(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsConstAssertion { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstAssertion( + self::fields::TsConstAssertionField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstAssertion( + self::fields::TsConstAssertionField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + TsConstAssertion { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsConstructSignatureDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_construct_signature_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_construct_signature_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsConstructSignatureDecl( + self::fields::TsConstructSignatureDeclField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + TsConstructSignatureDecl { + span, + params, + type_ann, + type_params, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsConstructorType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_constructor_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_constructor_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsConstructorType( + self::fields::TsConstructorTypeField::TypeAnn, + )); + > as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsConstructorType { + span, + params, + type_params, + type_ann, + is_abstract, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsEntityName<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_entity_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_entity_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsEntityName::TsQualifiedName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEntityName( + self::fields::TsEntityNameField::TsQualifiedName, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsEntityName::TsQualifiedName { 0: _field_0 } + } + TsEntityName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEntityName( + self::fields::TsEntityNameField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsEntityName::Ident { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsEnumDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_enum_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_enum_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumDecl( + self::fields::TsEnumDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsEnumDecl(self::fields::TsEnumDeclField::Id)); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let members = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumDecl( + self::fields::TsEnumDeclField::Members(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + TsEnumDecl { + span, + declare, + is_const, + id, + members, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsEnumMember<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_enum_member`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_enum_member(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsEnumMember { span, id, init } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Id, + )); + as FoldWithAstPath>::fold_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + let init = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMember( + self::fields::TsEnumMemberField::Init, + )); + > as FoldWithAstPath>::fold_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + TsEnumMember { span, id, init } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsEnumMemberId<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_enum_member_id`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_enum_member_id(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsEnumMemberId::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMemberId( + self::fields::TsEnumMemberIdField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsEnumMemberId::Ident { 0: _field_0 } + } + TsEnumMemberId::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsEnumMemberId( + self::fields::TsEnumMemberIdField::Str, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsEnumMemberId::Str { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsExportAssignment<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_export_assignment`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_export_assignment(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsExportAssignment { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExportAssignment( + self::fields::TsExportAssignmentField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExportAssignment( + self::fields::TsExportAssignmentField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + TsExportAssignment { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsExprWithTypeArgs<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_expr_with_type_args`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_expr_with_type_args(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsExprWithTypeArgs { + span, + expr, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExprWithTypeArgs( + self::fields::TsExprWithTypeArgsField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + TsExprWithTypeArgs { + span, + expr, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsExternalModuleRef { + #[doc = "Calls [FoldAstPath`::fold_ts_external_module_ref`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_external_module_ref(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsExternalModuleRef { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExternalModuleRef( + self::fields::TsExternalModuleRefField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsExternalModuleRef( + self::fields::TsExternalModuleRefField::Expr, + )); + >::fold_with_ast_path(expr, visitor, &mut *__ast_path) + }; + TsExternalModuleRef { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsFnOrConstructorType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_fn_or_constructor_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_fn_or_constructor_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsFnOrConstructorType::TsFnType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnOrConstructorType( + self::fields::TsFnOrConstructorTypeField::TsFnType, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnOrConstructorType::TsFnType { 0: _field_0 } + } + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnOrConstructorType( + self::fields::TsFnOrConstructorTypeField::TsConstructorType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnOrConstructorType::TsConstructorType { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsFnParam<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_fn_param`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_fn_param(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsFnParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Ident, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnParam::Ident { 0: _field_0 } + } + TsFnParam::Array { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Array, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnParam::Array { 0: _field_0 } + } + TsFnParam::Rest { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsFnParam(self::fields::TsFnParamField::Rest)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnParam::Rest { 0: _field_0 } + } + TsFnParam::Object { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnParam( + self::fields::TsFnParamField::Object, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsFnParam::Object { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsFnType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_fn_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_fn_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsFnType { + span, + params, + type_params, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsFnType(self::fields::TsFnTypeField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsFnType( + self::fields::TsFnTypeField::TypeAnn, + )); + > as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsFnType { + span, + params, + type_params, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsGetterSignature<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_getter_signature`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_getter_signature(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsGetterSignature { + span, + key, + computed, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsGetterSignature( + self::fields::TsGetterSignatureField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsGetterSignature { + span, + key, + computed, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsImportEqualsDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_import_equals_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_import_equals_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let module_ref = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportEqualsDecl( + self::fields::TsImportEqualsDeclField::ModuleRef, + )); + as FoldWithAstPath>::fold_with_ast_path( + module_ref, + visitor, + &mut *__ast_path, + ) + }; + TsImportEqualsDecl { + span, + is_export, + is_type_only, + id, + module_ref, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsImportType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_import_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_import_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsImportType { + span, + arg, + qualifier, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Arg, + )); + >::fold_with_ast_path(arg, visitor, &mut *__ast_path) + }; + let qualifier = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::Qualifier, + )); + > as FoldWithAstPath>::fold_with_ast_path( + qualifier, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsImportType( + self::fields::TsImportTypeField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + TsImportType { + span, + arg, + qualifier, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsIndexSignature<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_index_signature`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_index_signature(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } => { + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexSignature( + self::fields::TsIndexSignatureField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + TsIndexSignature { + params, + type_ann, + readonly, + is_static, + span, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsIndexedAccessType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_indexed_access_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_indexed_access_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let obj_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::ObjType, + )); + as FoldWithAstPath>::fold_with_ast_path( + obj_type, + visitor, + &mut *__ast_path, + ) + }; + let index_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIndexedAccessType( + self::fields::TsIndexedAccessTypeField::IndexType, + )); + as FoldWithAstPath>::fold_with_ast_path( + index_type, + visitor, + &mut *__ast_path, + ) + }; + TsIndexedAccessType { + span, + readonly, + obj_type, + index_type, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsInferType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_infer_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_infer_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsInferType { span, type_param } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInferType( + self::fields::TsInferTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInferType( + self::fields::TsInferTypeField::TypeParam, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + TsInferType { span, type_param } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsInstantiation<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_instantiation`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_instantiation(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsInstantiation { + span, + expr, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInstantiation( + self::fields::TsInstantiationField::TypeArgs, + )); + < Box < 'a , TsTypeParamInstantiation < 'a > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + TsInstantiation { + span, + expr, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsInterfaceBody<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_interface_body`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_interface_body(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsInterfaceBody { span, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceBody( + self::fields::TsInterfaceBodyField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceBody( + self::fields::TsInterfaceBodyField::Body(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + TsInterfaceBody { span, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsInterfaceDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_interface_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_interface_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let extends = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Extends(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + extends, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsInterfaceDecl( + self::fields::TsInterfaceDeclField::Body, + )); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + TsInterfaceDecl { + span, + id, + declare, + type_params, + extends, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsIntersectionType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_intersection_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_intersection_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsIntersectionType { span, types } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIntersectionType( + self::fields::TsIntersectionTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let types = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsIntersectionType( + self::fields::TsIntersectionTypeField::Types(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + TsIntersectionType { span, types } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsKeywordType { + #[doc = "Calls [FoldAstPath`::fold_ts_keyword_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_keyword_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsKeywordType { span, kind } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsKeywordType( + self::fields::TsKeywordTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let kind = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsKeywordType( + self::fields::TsKeywordTypeField::Kind, + )); + >::fold_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + TsKeywordType { span, kind } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsKeywordTypeKind { + #[doc = "Calls [FoldAstPath`::fold_ts_keyword_type_kind`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_keyword_type_kind(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsKeywordTypeKind::TsAnyKeyword => TsKeywordTypeKind::TsAnyKeyword, + TsKeywordTypeKind::TsUnknownKeyword => TsKeywordTypeKind::TsUnknownKeyword, + TsKeywordTypeKind::TsNumberKeyword => TsKeywordTypeKind::TsNumberKeyword, + TsKeywordTypeKind::TsObjectKeyword => TsKeywordTypeKind::TsObjectKeyword, + TsKeywordTypeKind::TsBooleanKeyword => TsKeywordTypeKind::TsBooleanKeyword, + TsKeywordTypeKind::TsBigIntKeyword => TsKeywordTypeKind::TsBigIntKeyword, + TsKeywordTypeKind::TsStringKeyword => TsKeywordTypeKind::TsStringKeyword, + TsKeywordTypeKind::TsSymbolKeyword => TsKeywordTypeKind::TsSymbolKeyword, + TsKeywordTypeKind::TsVoidKeyword => TsKeywordTypeKind::TsVoidKeyword, + TsKeywordTypeKind::TsUndefinedKeyword => TsKeywordTypeKind::TsUndefinedKeyword, + TsKeywordTypeKind::TsNullKeyword => TsKeywordTypeKind::TsNullKeyword, + TsKeywordTypeKind::TsNeverKeyword => TsKeywordTypeKind::TsNeverKeyword, + TsKeywordTypeKind::TsIntrinsicKeyword => TsKeywordTypeKind::TsIntrinsicKeyword, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsLit<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_lit`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_lit(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsLit::Number { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Number)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsLit::Number { 0: _field_0 } + } + TsLit::Str { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Str)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsLit::Str { 0: _field_0 } + } + TsLit::Bool { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Bool)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsLit::Bool { 0: _field_0 } + } + TsLit::BigInt { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::BigInt)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsLit::BigInt { 0: _field_0 } + } + TsLit::Tpl { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsLit(self::fields::TsLitField::Tpl)); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsLit::Tpl { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsLitType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_lit_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_lit_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsLitType { span, lit } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsLitType(self::fields::TsLitTypeField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let lit = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsLitType(self::fields::TsLitTypeField::Lit)); + as FoldWithAstPath>::fold_with_ast_path( + lit, + visitor, + &mut *__ast_path, + ) + }; + TsLitType { span, lit } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsMappedType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_mapped_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_mapped_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let readonly = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Readonly, + )); + as FoldWithAstPath>::fold_with_ast_path( + readonly, + visitor, + &mut *__ast_path, + ) + }; + let type_param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::TypeParam, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_param, + visitor, + &mut *__ast_path, + ) + }; + let name_type = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::NameType, + )); + > as FoldWithAstPath>::fold_with_ast_path( + name_type, + visitor, + &mut *__ast_path, + ) + }; + let optional = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::Optional, + )); + as FoldWithAstPath>::fold_with_ast_path( + optional, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMappedType( + self::fields::TsMappedTypeField::TypeAnn, + )); + > as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsMappedType { + span, + readonly, + type_param, + name_type, + optional, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsMethodSignature<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_method_signature`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_method_signature(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsMethodSignature( + self::fields::TsMethodSignatureField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + TsMethodSignature { + span, + key, + computed, + optional, + params, + type_ann, + type_params, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsModuleBlock<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_module_block`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_module_block(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsModuleBlock { span, body } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleBlock( + self::fields::TsModuleBlockField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleBlock( + self::fields::TsModuleBlockField::Body(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + TsModuleBlock { span, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsModuleDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_module_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_module_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsModuleDecl { + span, + declare, + global, + id, + body, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Id, + )); + as FoldWithAstPath>::fold_with_ast_path( + id, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleDecl( + self::fields::TsModuleDeclField::Body, + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + TsModuleDecl { + span, + declare, + global, + id, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsModuleName<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_module_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_module_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsModuleName::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleName( + self::fields::TsModuleNameField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsModuleName::Ident { 0: _field_0 } + } + TsModuleName::Str { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleName( + self::fields::TsModuleNameField::Str, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsModuleName::Str { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsModuleRef<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_module_ref`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_module_ref(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsModuleRef::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleRef( + self::fields::TsModuleRefField::TsEntityName, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsModuleRef::TsEntityName { 0: _field_0 } + } + TsModuleRef::TsExternalModuleRef { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsModuleRef( + self::fields::TsModuleRefField::TsExternalModuleRef, + )); + let _field_0 = + as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsModuleRef::TsExternalModuleRef { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsNamespaceBody<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_namespace_body`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_namespace_body(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsNamespaceBody::TsModuleBlock { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceBody( + self::fields::TsNamespaceBodyField::TsModuleBlock, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsNamespaceBody::TsModuleBlock { 0: _field_0 } + } + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceBody( + self::fields::TsNamespaceBodyField::TsNamespaceDecl, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsNamespaceBody::TsNamespaceDecl { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsNamespaceDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_namespace_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_namespace_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let body = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNamespaceDecl( + self::fields::TsNamespaceDeclField::Body, + )); + > as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + TsNamespaceDecl { + span, + declare, + global, + id, + body, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsNamespaceExportDecl { + #[doc = "Calls [FoldAstPath`::fold_ts_namespace_export_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_namespace_export_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsNamespaceExportDecl { span, id } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsNamespaceExportDecl( + self::fields::TsNamespaceExportDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsNamespaceExportDecl( + self::fields::TsNamespaceExportDeclField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + TsNamespaceExportDecl { span, id } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsNonNullExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_non_null_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_non_null_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsNonNullExpr { span, expr } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNonNullExpr( + self::fields::TsNonNullExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsNonNullExpr( + self::fields::TsNonNullExprField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + TsNonNullExpr { span, expr } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsOptionalType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_optional_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_optional_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsOptionalType { span, type_ann } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsOptionalType( + self::fields::TsOptionalTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsOptionalType( + self::fields::TsOptionalTypeField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsOptionalType { span, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsParamProp<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_param_prop`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_param_prop(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let decorators = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Decorators(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decorators, + visitor, + &mut *__ast_path, + ) + }; + let accessibility = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Accessibility, + )); + as FoldWithAstPath>::fold_with_ast_path( + accessibility, + visitor, + &mut *__ast_path, + ) + }; + let param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamProp( + self::fields::TsParamPropField::Param, + )); + as FoldWithAstPath>::fold_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + TsParamProp { + span, + decorators, + accessibility, + is_override, + readonly, + param, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsParamPropParam<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_param_prop_param`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_param_prop_param(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsParamPropParam::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamPropParam( + self::fields::TsParamPropParamField::Ident, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsParamPropParam::Ident { 0: _field_0 } + } + TsParamPropParam::Assign { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParamPropParam( + self::fields::TsParamPropParamField::Assign, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsParamPropParam::Assign { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsParenthesizedType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_parenthesized_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_parenthesized_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsParenthesizedType { span, type_ann } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParenthesizedType( + self::fields::TsParenthesizedTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsParenthesizedType( + self::fields::TsParenthesizedTypeField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsParenthesizedType { span, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsPropertySignature<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_property_signature`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_property_signature(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsPropertySignature( + self::fields::TsPropertySignatureField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsPropertySignature { + span, + readonly, + key, + computed, + optional, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsQualifiedName<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_qualified_name`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_qualified_name(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsQualifiedName { span, left, right } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let left = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Left, + )); + as FoldWithAstPath>::fold_with_ast_path( + left, + visitor, + &mut *__ast_path, + ) + }; + let right = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsQualifiedName( + self::fields::TsQualifiedNameField::Right, + )); + >::fold_with_ast_path( + right, + visitor, + &mut *__ast_path, + ) + }; + TsQualifiedName { span, left, right } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsRestType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_rest_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_rest_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsRestType { span, type_ann } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsRestType( + self::fields::TsRestTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsRestType( + self::fields::TsRestTypeField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsRestType { span, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsSatisfiesExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_satisfies_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_satisfies_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsSatisfiesExpr { + span, + expr, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSatisfiesExpr( + self::fields::TsSatisfiesExprField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsSatisfiesExpr { + span, + expr, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsSetterSignature<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_setter_signature`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_setter_signature(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsSetterSignature { + span, + key, + computed, + param, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let key = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Key, + )); + as FoldWithAstPath>::fold_with_ast_path( + key, + visitor, + &mut *__ast_path, + ) + }; + let param = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsSetterSignature( + self::fields::TsSetterSignatureField::Param, + )); + as FoldWithAstPath>::fold_with_ast_path( + param, + visitor, + &mut *__ast_path, + ) + }; + TsSetterSignature { + span, + key, + computed, + param, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsThisType { + #[doc = "Calls [FoldAstPath`::fold_ts_this_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_this_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsThisType { span } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisType( + self::fields::TsThisTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + TsThisType { span } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsThisTypeOrIdent<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_this_type_or_ident`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_this_type_or_ident(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsThisTypeOrIdent::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisTypeOrIdent( + self::fields::TsThisTypeOrIdentField::TsThisType, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsThisTypeOrIdent::TsThisType { 0: _field_0 } + } + TsThisTypeOrIdent::Ident { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsThisTypeOrIdent( + self::fields::TsThisTypeOrIdentField::Ident, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsThisTypeOrIdent::Ident { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTplLitType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_tpl_lit_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_tpl_lit_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTplLitType { + span, + types, + quasis, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let types = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Types(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + let quasis = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTplLitType( + self::fields::TsTplLitTypeField::Quasis(usize::MAX), + )); + as FoldWithAstPath>::fold_with_ast_path( + quasis, + visitor, + &mut *__ast_path, + ) + }; + TsTplLitType { + span, + types, + quasis, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTupleElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_tuple_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_tuple_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTupleElement { span, label, ty } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let label = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Label, + )); + > as FoldWithAstPath>::fold_with_ast_path( + label, + visitor, + &mut *__ast_path, + ) + }; + let ty = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleElement( + self::fields::TsTupleElementField::Ty, + )); + as FoldWithAstPath>::fold_with_ast_path( + ty, + visitor, + &mut *__ast_path, + ) + }; + TsTupleElement { span, label, ty } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTupleType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_tuple_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_tuple_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTupleType { span, elem_types } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleType( + self::fields::TsTupleTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let elem_types = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTupleType( + self::fields::TsTupleTypeField::ElemTypes(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + elem_types, + visitor, + &mut *__ast_path, + ) + }; + TsTupleType { span, elem_types } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsType::TsKeywordType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsKeywordType, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsKeywordType { 0: _field_0 } + } + TsType::TsThisType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsThisType)); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsThisType { 0: _field_0 } + } + TsType::TsFnOrConstructorType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsFnOrConstructorType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsFnOrConstructorType { 0: _field_0 } + } + TsType::TsTypeRef { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsTypeRef)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTypeRef { 0: _field_0 } + } + TsType::TsTypeQuery { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypeQuery, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTypeQuery { 0: _field_0 } + } + TsType::TsTypeLit { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsTypeLit)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTypeLit { 0: _field_0 } + } + TsType::TsArrayType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsArrayType, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsArrayType { 0: _field_0 } + } + TsType::TsTupleType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTupleType, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTupleType { 0: _field_0 } + } + TsType::TsOptionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsOptionalType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsOptionalType { 0: _field_0 } + } + TsType::TsRestType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsRestType)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsRestType { 0: _field_0 } + } + TsType::TsUnionOrIntersectionType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsUnionOrIntersectionType, + )); + let _field_0 = < Box < 'a , TsUnionOrIntersectionType < 'a > > as FoldWithAstPath < V > > :: fold_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + TsType::TsUnionOrIntersectionType { 0: _field_0 } + } + TsType::TsConditionalType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsConditionalType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsConditionalType { 0: _field_0 } + } + TsType::TsInferType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsInferType, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsInferType { 0: _field_0 } + } + TsType::TsParenthesizedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsParenthesizedType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsParenthesizedType { 0: _field_0 } + } + TsType::TsTypeOperator { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypeOperator, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTypeOperator { 0: _field_0 } + } + TsType::TsIndexedAccessType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsIndexedAccessType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsIndexedAccessType { 0: _field_0 } + } + TsType::TsMappedType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsMappedType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsMappedType { 0: _field_0 } + } + TsType::TsLitType { 0: _field_0 } => { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsType(self::fields::TsTypeField::TsLitType)); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsLitType { 0: _field_0 } + } + TsType::TsTypePredicate { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsTypePredicate, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsTypePredicate { 0: _field_0 } + } + TsType::TsImportType { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsType( + self::fields::TsTypeField::TsImportType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsType::TsImportType { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeAliasDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_alias_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_alias_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let id = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::Id, + )); + >::fold_with_ast_path(id, visitor, &mut *__ast_path) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::TypeParams, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_params, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAliasDecl( + self::fields::TsTypeAliasDeclField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsTypeAliasDecl { + span, + declare, + id, + type_params, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeAnn<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_ann`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_ann(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeAnn { span, type_ann } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeAnn(self::fields::TsTypeAnnField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAnn( + self::fields::TsTypeAnnField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsTypeAnn { span, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeAssertion<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_assertion`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_assertion(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeAssertion { + span, + expr, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::Expr, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeAssertion( + self::fields::TsTypeAssertionField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsTypeAssertion { + span, + expr, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeElement<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_element`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_element(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsCallSignatureDecl, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsCallSignatureDecl { 0: _field_0 } + } + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsConstructSignatureDecl, + )); + let _field_0 = < Box < 'a , TsConstructSignatureDecl < 'a > > as FoldWithAstPath < V > > :: fold_with_ast_path (_field_0 , visitor , & mut * __ast_path) ; + TsTypeElement::TsConstructSignatureDecl { 0: _field_0 } + } + TsTypeElement::TsPropertySignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsPropertySignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsPropertySignature { 0: _field_0 } + } + TsTypeElement::TsGetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsGetterSignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsGetterSignature { 0: _field_0 } + } + TsTypeElement::TsSetterSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsSetterSignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsSetterSignature { 0: _field_0 } + } + TsTypeElement::TsMethodSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsMethodSignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsMethodSignature { 0: _field_0 } + } + TsTypeElement::TsIndexSignature { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeElement( + self::fields::TsTypeElementField::TsIndexSignature, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeElement::TsIndexSignature { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeLit<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_lit`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_lit(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeLit { span, members } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeLit(self::fields::TsTypeLitField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let members = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeLit( + self::fields::TsTypeLitField::Members(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + members, + visitor, + &mut *__ast_path, + ) + }; + TsTypeLit { span, members } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeOperator<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_operator`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_operator(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeOperator { span, op, type_ann } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let op = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::Op, + )); + >::fold_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeOperator( + self::fields::TsTypeOperatorField::TypeAnn, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsTypeOperator { span, op, type_ann } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeOperatorOp { + #[doc = "Calls [FoldAstPath`::fold_ts_type_operator_op`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_operator_op(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeOperatorOp::KeyOf => TsTypeOperatorOp::KeyOf, + TsTypeOperatorOp::Unique => TsTypeOperatorOp::Unique, + TsTypeOperatorOp::ReadOnly => TsTypeOperatorOp::ReadOnly, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeParam<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_param`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_param(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Name, + )); + >::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + let constraint = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Constraint, + )); + > as FoldWithAstPath>::fold_with_ast_path( + constraint, + visitor, + &mut *__ast_path, + ) + }; + let default = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParam( + self::fields::TsTypeParamField::Default, + )); + > as FoldWithAstPath>::fold_with_ast_path( + default, + visitor, + &mut *__ast_path, + ) + }; + TsTypeParam { + span, + name, + is_in, + is_out, + is_const, + constraint, + default, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeParamDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_param_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_param_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeParamDecl { span, params } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParamDecl( + self::fields::TsTypeParamDeclField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeParamDecl( + self::fields::TsTypeParamDeclField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + TsTypeParamDecl { span, params } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeParamInstantiation<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_param_instantiation`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_param_instantiation(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeParamInstantiation { span, params } => { + let span = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsTypeParamInstantiation( + self::fields::TsTypeParamInstantiationField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let params = { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsTypeParamInstantiation( + self::fields::TsTypeParamInstantiationField::Params(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + params, + visitor, + &mut *__ast_path, + ) + }; + TsTypeParamInstantiation { span, params } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypePredicate<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_predicate`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_predicate(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let param_name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::ParamName, + )); + as FoldWithAstPath>::fold_with_ast_path( + param_name, + visitor, + &mut *__ast_path, + ) + }; + let type_ann = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypePredicate( + self::fields::TsTypePredicateField::TypeAnn, + )); + >> as FoldWithAstPath>::fold_with_ast_path( + type_ann, + visitor, + &mut *__ast_path, + ) + }; + TsTypePredicate { + span, + asserts, + param_name, + type_ann, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeQuery<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_query`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_query(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeQuery { + span, + expr_name, + type_args, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let expr_name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::ExprName, + )); + as FoldWithAstPath>::fold_with_ast_path( + expr_name, + visitor, + &mut *__ast_path, + ) + }; + let type_args = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQuery( + self::fields::TsTypeQueryField::TypeArgs, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_args , visitor , & mut * __ast_path) + }; + TsTypeQuery { + span, + expr_name, + type_args, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeQueryExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_query_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_query_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeQueryExpr::TsEntityName { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQueryExpr( + self::fields::TsTypeQueryExprField::TsEntityName, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeQueryExpr::TsEntityName { 0: _field_0 } + } + TsTypeQueryExpr::Import { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeQueryExpr( + self::fields::TsTypeQueryExprField::Import, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsTypeQueryExpr::Import { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsTypeRef<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_ref`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_ref(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsTypeRef { + span, + type_name, + type_params, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::TsTypeRef(self::fields::TsTypeRefField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let type_name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeRef( + self::fields::TsTypeRefField::TypeName, + )); + as FoldWithAstPath>::fold_with_ast_path( + type_name, + visitor, + &mut *__ast_path, + ) + }; + let type_params = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsTypeRef( + self::fields::TsTypeRefField::TypeParams, + )); + < Option < Box < 'a , TsTypeParamInstantiation < 'a > > > as FoldWithAstPath < V > > :: fold_with_ast_path (type_params , visitor , & mut * __ast_path) + }; + TsTypeRef { + span, + type_name, + type_params, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsUnionOrIntersectionType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_union_or_intersection_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_union_or_intersection_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsUnionOrIntersectionType( + self::fields::TsUnionOrIntersectionTypeField::TsUnionType, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsUnionOrIntersectionType::TsUnionType { 0: _field_0 } + } + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } => { + let mut __ast_path = + __ast_path.with_guard(AstParentKind::TsUnionOrIntersectionType( + self::fields::TsUnionOrIntersectionTypeField::TsIntersectionType, + )); + let _field_0 = + > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + TsUnionOrIntersectionType::TsIntersectionType { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for TsUnionType<'a> { + #[doc = "Calls [FoldAstPath`::fold_ts_union_type`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_union_type(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + TsUnionType { span, types } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsUnionType( + self::fields::TsUnionTypeField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let types = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::TsUnionType( + self::fields::TsUnionTypeField::Types(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + types, + visitor, + &mut *__ast_path, + ) + }; + TsUnionType { span, types } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for UnaryExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_unary_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_unary_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + UnaryExpr { span, op, arg } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let op = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Op)); + >::fold_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UnaryExpr(self::fields::UnaryExprField::Arg)); + as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + UnaryExpr { span, op, arg } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for UpdateExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_update_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_update_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + UpdateExpr { + span, + op, + prefix, + arg, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UpdateExpr( + self::fields::UpdateExprField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let op = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UpdateExpr(self::fields::UpdateExprField::Op)); + >::fold_with_ast_path( + op, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UpdateExpr( + self::fields::UpdateExprField::Arg, + )); + as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + UpdateExpr { + span, + op, + prefix, + arg, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for UsingDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_using_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_using_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + UsingDecl { + span, + is_await, + decls, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::UsingDecl(self::fields::UsingDeclField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let decls = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::UsingDecl( + self::fields::UsingDeclField::Decls(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + UsingDecl { + span, + is_await, + decls, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for VarDecl<'a> { + #[doc = "Calls [FoldAstPath`::fold_var_decl`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_var_decl(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let ctxt = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Ctxt)); + >::fold_with_ast_path( + ctxt, + visitor, + &mut *__ast_path, + ) + }; + let kind = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::VarDecl(self::fields::VarDeclField::Kind)); + >::fold_with_ast_path( + kind, + visitor, + &mut *__ast_path, + ) + }; + let decls = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDecl( + self::fields::VarDeclField::Decls(usize::MAX), + )); + > as FoldWithAstPath>::fold_with_ast_path( + decls, + visitor, + &mut *__ast_path, + ) + }; + VarDecl { + span, + ctxt, + kind, + declare, + decls, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for VarDeclKind { + #[doc = "Calls [FoldAstPath`::fold_var_decl_kind`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_var_decl_kind(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + VarDeclKind::Var => VarDeclKind::Var, + VarDeclKind::Let => VarDeclKind::Let, + VarDeclKind::Const => VarDeclKind::Const, + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for VarDeclOrExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_var_decl_or_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_var_decl_or_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + VarDeclOrExpr::VarDecl { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclOrExpr( + self::fields::VarDeclOrExprField::VarDecl, + )); + let _field_0 = > as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + VarDeclOrExpr::VarDecl { 0: _field_0 } + } + VarDeclOrExpr::Expr { 0: _field_0 } => { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclOrExpr( + self::fields::VarDeclOrExprField::Expr, + )); + let _field_0 = as FoldWithAstPath>::fold_with_ast_path( + _field_0, + visitor, + &mut *__ast_path, + ); + VarDeclOrExpr::Expr { 0: _field_0 } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for VarDeclarator<'a> { + #[doc = "Calls [FoldAstPath`::fold_var_declarator`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_var_declarator(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + VarDeclarator { + span, + name, + init, + definite, + } => { + let span = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Span, + )); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let name = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Name, + )); + as FoldWithAstPath>::fold_with_ast_path( + name, + visitor, + &mut *__ast_path, + ) + }; + let init = { + let mut __ast_path = __ast_path.with_guard(AstParentKind::VarDeclarator( + self::fields::VarDeclaratorField::Init, + )); + > as FoldWithAstPath>::fold_with_ast_path( + init, + visitor, + &mut *__ast_path, + ) + }; + VarDeclarator { + span, + name, + init, + definite, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for WhileStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_while_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_while_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + WhileStmt { span, test, body } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let test = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Test)); + as FoldWithAstPath>::fold_with_ast_path( + test, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WhileStmt(self::fields::WhileStmtField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + WhileStmt { span, test, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for WithStmt<'a> { + #[doc = "Calls [FoldAstPath`::fold_with_stmt`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_with_stmt(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + WithStmt { span, obj, body } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let obj = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Obj)); + as FoldWithAstPath>::fold_with_ast_path( + obj, + visitor, + &mut *__ast_path, + ) + }; + let body = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::WithStmt(self::fields::WithStmtField::Body)); + as FoldWithAstPath>::fold_with_ast_path( + body, + visitor, + &mut *__ast_path, + ) + }; + WithStmt { span, obj, body } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for YieldExpr<'a> { + #[doc = "Calls [FoldAstPath`::fold_yield_expr`] with `self`."] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_yield_expr(visitor, self, __ast_path) + } + + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + match self { + YieldExpr { + span, + arg, + delegate, + } => { + let span = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::YieldExpr(self::fields::YieldExprField::Span)); + >::fold_with_ast_path( + span, + visitor, + &mut *__ast_path, + ) + }; + let arg = { + let mut __ast_path = __ast_path + .with_guard(AstParentKind::YieldExpr(self::fields::YieldExprField::Arg)); + > as FoldWithAstPath>::fold_with_ast_path( + arg, + visitor, + &mut *__ast_path, + ) + }; + YieldExpr { + span, + arg, + delegate, + } + } + } + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for AssignOp { + #[doc = "Calls [FoldAstPath`::fold_assign_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_assign_op(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for swc_atoms::Atom { + #[doc = "Calls [FoldAstPath`::fold_atom`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_atom(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BigIntValue { + #[doc = "Calls [FoldAstPath`::fold_big_int_value`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_big_int_value(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for BinaryOp { + #[doc = "Calls [FoldAstPath`::fold_binary_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_binary_op(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ClassMember<'a>> { + #[doc = "Calls [FoldAstPath`::fold_class_members`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_class_members(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Decorator<'a>> { + #[doc = "Calls [FoldAstPath`::fold_decorators`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_decorators(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ExportSpecifier<'a>> { + #[doc = "Calls [FoldAstPath`::fold_export_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_export_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ExprOrSpread<'a>> { + #[doc = "Calls [FoldAstPath`::fold_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Expr<'a>> { + #[doc = "Calls [FoldAstPath`::fold_exprs`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_exprs(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ImportSpecifier<'a>> { + #[doc = "Calls [FoldAstPath`::fold_import_specifiers`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_specifiers(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ImportWithItem> { + #[doc = "Calls [FoldAstPath`::fold_import_with_items`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_import_with_items(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, JSXAttrOrSpread<'a>> { + #[doc = "Calls [FoldAstPath`::fold_jsx_attr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_attr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, JSXElementChild<'a>> { + #[doc = "Calls [FoldAstPath`::fold_jsx_element_childs`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_jsx_element_childs(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ModuleItem<'a>> { + #[doc = "Calls [FoldAstPath`::fold_module_items`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_module_items(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ObjectPatProp<'a>> { + #[doc = "Calls [FoldAstPath`::fold_object_pat_props`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_object_pat_props(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option { + #[doc = "Calls [FoldAstPath`::fold_opt_accessibility`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_accessibility(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option { + #[doc = "Calls [FoldAstPath`::fold_opt_atom`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_atom(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_block_stmt`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_block_stmt(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_catch_clause`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_catch_clause(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_expr`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_expr(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_expr_or_spread`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_expr_or_spread(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option>> { + #[doc = "Calls [FoldAstPath`::fold_opt_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + > as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option { + #[doc = "Calls [FoldAstPath`::fold_opt_ident`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ident(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_jsx_attr_value`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_jsx_attr_value(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_jsx_closing_element`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_jsx_closing_element(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_module_export_name`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_module_export_name(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option>> { + #[doc = "Calls [FoldAstPath`::fold_opt_object_lit`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_object_lit(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + > as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_pat`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_pat(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option { + #[doc = "Calls [FoldAstPath`::fold_opt_span`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_span(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_stmt`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_stmt(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_str`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_str(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option { + #[doc = "Calls [FoldAstPath`::fold_opt_true_plus_minus`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_true_plus_minus(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_ts_entity_name`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_entity_name(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_ts_namespace_body`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_namespace_body(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_ts_type`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_type(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option>> { + #[doc = "Calls [FoldAstPath`::fold_opt_ts_type_ann`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_type_ann(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + > as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [FoldAstPath`::fold_opt_ts_type_param_decl`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_type_param_decl(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + > as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> + for Option>> +{ + #[doc = "Calls [FoldAstPath`::fold_opt_ts_type_param_instantiation`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_ts_type_param_instantiation(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + > as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Option> { + #[doc = "Calls [FoldAstPath`::fold_opt_var_decl_or_expr`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_var_decl_or_expr(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.map(|inner| { + as FoldWithAstPath>::fold_with_ast_path( + inner, visitor, __ast_path, + ) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [FoldAstPath`::fold_opt_vec_expr_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_vec_expr_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Option>> { + #[doc = "Calls [FoldAstPath`::fold_opt_vec_pats`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_opt_vec_pats(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + > as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, ParamOrTsParamProp<'a>> { + #[doc = "Calls [FoldAstPath`::fold_param_or_ts_param_props`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_param_or_ts_param_props(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Param<'a>> { + #[doc = "Calls [FoldAstPath`::fold_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_params(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Pat<'a>> { + #[doc = "Calls [FoldAstPath`::fold_pats`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_pats(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path(item, visitor, &mut *__ast_path) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, PropOrSpread<'a>> { + #[doc = "Calls [FoldAstPath`::fold_prop_or_spreads`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_prop_or_spreads(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for swc_common::Span { + #[doc = "Calls [FoldAstPath`::fold_span`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_span(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, Stmt<'a>> { + #[doc = "Calls [FoldAstPath`::fold_stmts`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_stmts(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, SwitchCase<'a>> { + #[doc = "Calls [FoldAstPath`::fold_switch_cases`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_switch_cases(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for swc_common::SyntaxContext { + #[doc = "Calls [FoldAstPath`::fold_syntax_context`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_syntax_context(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TplElement> { + #[doc = "Calls [FoldAstPath`::fold_tpl_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_tpl_elements(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + >::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsEnumMember<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_enum_members`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_enum_members(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsExprWithTypeArgs<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_expr_with_type_argss`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_expr_with_type_argss(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsFnParam<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_fn_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_fn_params(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsTupleElement<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_tuple_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_tuple_elements(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsTypeElement<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_elements`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_elements(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsTypeParam<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_type_params`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_type_params(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, TsType<'a>> { + #[doc = "Calls [FoldAstPath`::fold_ts_types`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_ts_types(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for UnaryOp { + #[doc = "Calls [FoldAstPath`::fold_unary_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_unary_op(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for UpdateOp { + #[doc = "Calls [FoldAstPath`::fold_update_op`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_update_op(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V: ?Sized + FoldAstPath<'a>> FoldWithAstPath<'a, V> for Vec<'a, VarDeclarator<'a>> { + #[doc = "Calls [FoldAstPath`::fold_var_declarators`] with `self`. (Extra impl)"] + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + ::fold_var_declarators(visitor, self, __ast_path) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + self.into_iter() + .enumerate() + .map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + as FoldWithAstPath>::fold_with_ast_path( + item, + visitor, + &mut *__ast_path, + ) + }) + .collect() + } +} +#[cfg(any(docsrs, feature = "path"))] +#[cfg_attr(docsrs, doc(cfg(feature = "path")))] +impl<'a, V, T> FoldWithAstPath<'a, V> for Box<'a, T> +where + V: ?Sized + FoldAstPath<'a>, + T: FoldWithAstPath<'a, V>, +{ + #[inline] + fn fold_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + swc_visit::util::map::Map::map(self, |inner| { + >::fold_with_ast_path(inner, visitor, __ast_path) + }) + } + + #[inline] + fn fold_children_with_ast_path(self, visitor: &mut V, __ast_path: &mut AstKindPath) -> Self { + swc_visit::util::map::Map::map(self, |inner| { + >::fold_children_with_ast_path(inner, visitor, __ast_path) + }) + } +} +#[cfg(any(docsrs, feature = "path"))] +pub type AstKindPath = swc_visit::AstKindPath; +#[cfg(any(docsrs, feature = "path"))] +pub type AstNodePath<'ast> = swc_visit::AstNodePath>; +#[cfg(any(docsrs, feature = "path"))] +pub mod fields { + use swc_ecma_ast::arena::*; + #[inline(always)] + fn assert_initial_index(idx: usize, index: usize) { + #[cfg(debug_assertions)] + if !(idx == usize::MAX || index == usize::MAX) { + { + panic!("Should be usize::MAX"); + } + } + } + impl AccessibilityField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AccessibilityField { + #[doc = "Represents [`Accessibility::Public`]"] + Public, + #[doc = "Represents [`Accessibility::Protected`]"] + Protected, + #[doc = "Represents [`Accessibility::Private`]"] + Private, + } + impl ArrayLitField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Elems(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ArrayLitField { + #[doc = "Represents [`ArrayLit::span`]"] + Span, + #[doc = "Represents [`ArrayLit::elems`]"] + Elems(usize), + } + impl ArrayPatField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Elems(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ArrayPatField { + #[doc = "Represents [`ArrayPat::span`]"] + Span, + #[doc = "Represents [`ArrayPat::elems`]"] + Elems(usize), + #[doc = "Represents [`ArrayPat::optional`]"] + Optional, + #[doc = "Represents [`ArrayPat::type_ann`]"] + TypeAnn, + } + impl ArrowExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ArrowExprField { + #[doc = "Represents [`ArrowExpr::span`]"] + Span, + #[doc = "Represents [`ArrowExpr::ctxt`]"] + Ctxt, + #[doc = "Represents [`ArrowExpr::params`]"] + Params(usize), + #[doc = "Represents [`ArrowExpr::body`]"] + Body, + #[doc = "Represents [`ArrowExpr::is_async`]"] + IsAsync, + #[doc = "Represents [`ArrowExpr::is_generator`]"] + IsGenerator, + #[doc = "Represents [`ArrowExpr::type_params`]"] + TypeParams, + #[doc = "Represents [`ArrowExpr::return_type`]"] + ReturnType, + } + impl AssignExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignExprField { + #[doc = "Represents [`AssignExpr::span`]"] + Span, + #[doc = "Represents [`AssignExpr::op`]"] + Op, + #[doc = "Represents [`AssignExpr::left`]"] + Left, + #[doc = "Represents [`AssignExpr::right`]"] + Right, + } + impl AssignPatField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignPatField { + #[doc = "Represents [`AssignPat::span`]"] + Span, + #[doc = "Represents [`AssignPat::left`]"] + Left, + #[doc = "Represents [`AssignPat::right`]"] + Right, + } + impl AssignPatPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignPatPropField { + #[doc = "Represents [`AssignPatProp::span`]"] + Span, + #[doc = "Represents [`AssignPatProp::key`]"] + Key, + #[doc = "Represents [`AssignPatProp::value`]"] + Value, + } + impl AssignPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignPropField { + #[doc = "Represents [`AssignProp::span`]"] + Span, + #[doc = "Represents [`AssignProp::key`]"] + Key, + #[doc = "Represents [`AssignProp::value`]"] + Value, + } + impl AssignTargetField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignTargetField { + #[doc = "Represents [`AssignTarget::Simple`]"] + Simple, + #[doc = "Represents [`AssignTarget::Pat`]"] + Pat, + } + impl AssignTargetPatField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AssignTargetPatField { + #[doc = "Represents [`AssignTargetPat::Array`]"] + Array, + #[doc = "Represents [`AssignTargetPat::Object`]"] + Object, + #[doc = "Represents [`AssignTargetPat::Invalid`]"] + Invalid, + } + impl AutoAccessorField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AutoAccessorField { + #[doc = "Represents [`AutoAccessor::span`]"] + Span, + #[doc = "Represents [`AutoAccessor::key`]"] + Key, + #[doc = "Represents [`AutoAccessor::value`]"] + Value, + #[doc = "Represents [`AutoAccessor::type_ann`]"] + TypeAnn, + #[doc = "Represents [`AutoAccessor::is_static`]"] + IsStatic, + #[doc = "Represents [`AutoAccessor::decorators`]"] + Decorators(usize), + #[doc = "Represents [`AutoAccessor::accessibility`]"] + Accessibility, + #[doc = "Represents [`AutoAccessor::is_abstract`]"] + IsAbstract, + #[doc = "Represents [`AutoAccessor::is_override`]"] + IsOverride, + #[doc = "Represents [`AutoAccessor::definite`]"] + Definite, + } + impl AwaitExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AwaitExprField { + #[doc = "Represents [`AwaitExpr::span`]"] + Span, + #[doc = "Represents [`AwaitExpr::arg`]"] + Arg, + } + impl BigIntField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BigIntField { + #[doc = "Represents [`BigInt::span`]"] + Span, + #[doc = "Represents [`BigInt::value`]"] + Value, + #[doc = "Represents [`BigInt::raw`]"] + Raw, + } + impl BinExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BinExprField { + #[doc = "Represents [`BinExpr::span`]"] + Span, + #[doc = "Represents [`BinExpr::op`]"] + Op, + #[doc = "Represents [`BinExpr::left`]"] + Left, + #[doc = "Represents [`BinExpr::right`]"] + Right, + } + impl BindingIdentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BindingIdentField { + #[doc = "Represents [`BindingIdent::id`]"] + Id, + #[doc = "Represents [`BindingIdent::type_ann`]"] + TypeAnn, + } + impl BlockStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Stmts(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BlockStmtField { + #[doc = "Represents [`BlockStmt::span`]"] + Span, + #[doc = "Represents [`BlockStmt::ctxt`]"] + Ctxt, + #[doc = "Represents [`BlockStmt::stmts`]"] + Stmts(usize), + } + impl BlockStmtOrExprField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BlockStmtOrExprField { + #[doc = "Represents [`BlockStmtOrExpr::BlockStmt`]"] + BlockStmt, + #[doc = "Represents [`BlockStmtOrExpr::Expr`]"] + Expr, + } + impl BoolField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BoolField { + #[doc = "Represents [`Bool::span`]"] + Span, + #[doc = "Represents [`Bool::value`]"] + Value, + } + impl BreakStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum BreakStmtField { + #[doc = "Represents [`BreakStmt::span`]"] + Span, + #[doc = "Represents [`BreakStmt::label`]"] + Label, + } + impl CallExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Args(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum CallExprField { + #[doc = "Represents [`CallExpr::span`]"] + Span, + #[doc = "Represents [`CallExpr::ctxt`]"] + Ctxt, + #[doc = "Represents [`CallExpr::callee`]"] + Callee, + #[doc = "Represents [`CallExpr::args`]"] + Args(usize), + #[doc = "Represents [`CallExpr::type_args`]"] + TypeArgs, + } + impl CalleeField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum CalleeField { + #[doc = "Represents [`Callee::Super`]"] + Super, + #[doc = "Represents [`Callee::Import`]"] + Import, + #[doc = "Represents [`Callee::Expr`]"] + Expr, + } + impl CatchClauseField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum CatchClauseField { + #[doc = "Represents [`CatchClause::span`]"] + Span, + #[doc = "Represents [`CatchClause::param`]"] + Param, + #[doc = "Represents [`CatchClause::body`]"] + Body, + } + impl ClassField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + Self::Body(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + Self::Implements(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassField { + #[doc = "Represents [`Class::span`]"] + Span, + #[doc = "Represents [`Class::ctxt`]"] + Ctxt, + #[doc = "Represents [`Class::decorators`]"] + Decorators(usize), + #[doc = "Represents [`Class::body`]"] + Body(usize), + #[doc = "Represents [`Class::super_class`]"] + SuperClass, + #[doc = "Represents [`Class::is_abstract`]"] + IsAbstract, + #[doc = "Represents [`Class::type_params`]"] + TypeParams, + #[doc = "Represents [`Class::super_type_params`]"] + SuperTypeParams, + #[doc = "Represents [`Class::implements`]"] + Implements(usize), + } + impl ClassDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassDeclField { + #[doc = "Represents [`ClassDecl::ident`]"] + Ident, + #[doc = "Represents [`ClassDecl::declare`]"] + Declare, + #[doc = "Represents [`ClassDecl::class`]"] + Class, + } + impl ClassExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassExprField { + #[doc = "Represents [`ClassExpr::ident`]"] + Ident, + #[doc = "Represents [`ClassExpr::class`]"] + Class, + } + impl ClassMemberField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassMemberField { + #[doc = "Represents [`ClassMember::Constructor`]"] + Constructor, + #[doc = "Represents [`ClassMember::Method`]"] + Method, + #[doc = "Represents [`ClassMember::PrivateMethod`]"] + PrivateMethod, + #[doc = "Represents [`ClassMember::ClassProp`]"] + ClassProp, + #[doc = "Represents [`ClassMember::PrivateProp`]"] + PrivateProp, + #[doc = "Represents [`ClassMember::TsIndexSignature`]"] + TsIndexSignature, + #[doc = "Represents [`ClassMember::Empty`]"] + Empty, + #[doc = "Represents [`ClassMember::StaticBlock`]"] + StaticBlock, + #[doc = "Represents [`ClassMember::AutoAccessor`]"] + AutoAccessor, + } + impl ClassMethodField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassMethodField { + #[doc = "Represents [`ClassMethod::span`]"] + Span, + #[doc = "Represents [`ClassMethod::key`]"] + Key, + #[doc = "Represents [`ClassMethod::function`]"] + Function, + #[doc = "Represents [`ClassMethod::kind`]"] + Kind, + #[doc = "Represents [`ClassMethod::is_static`]"] + IsStatic, + #[doc = "Represents [`ClassMethod::accessibility`]"] + Accessibility, + #[doc = "Represents [`ClassMethod::is_abstract`]"] + IsAbstract, + #[doc = "Represents [`ClassMethod::is_optional`]"] + IsOptional, + #[doc = "Represents [`ClassMethod::is_override`]"] + IsOverride, + } + impl ClassPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ClassPropField { + #[doc = "Represents [`ClassProp::span`]"] + Span, + #[doc = "Represents [`ClassProp::key`]"] + Key, + #[doc = "Represents [`ClassProp::value`]"] + Value, + #[doc = "Represents [`ClassProp::type_ann`]"] + TypeAnn, + #[doc = "Represents [`ClassProp::is_static`]"] + IsStatic, + #[doc = "Represents [`ClassProp::decorators`]"] + Decorators(usize), + #[doc = "Represents [`ClassProp::accessibility`]"] + Accessibility, + #[doc = "Represents [`ClassProp::is_abstract`]"] + IsAbstract, + #[doc = "Represents [`ClassProp::is_optional`]"] + IsOptional, + #[doc = "Represents [`ClassProp::is_override`]"] + IsOverride, + #[doc = "Represents [`ClassProp::readonly`]"] + Readonly, + #[doc = "Represents [`ClassProp::declare`]"] + Declare, + #[doc = "Represents [`ClassProp::definite`]"] + Definite, + } + impl ComputedPropNameField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ComputedPropNameField { + #[doc = "Represents [`ComputedPropName::span`]"] + Span, + #[doc = "Represents [`ComputedPropName::expr`]"] + Expr, + } + impl CondExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum CondExprField { + #[doc = "Represents [`CondExpr::span`]"] + Span, + #[doc = "Represents [`CondExpr::test`]"] + Test, + #[doc = "Represents [`CondExpr::cons`]"] + Cons, + #[doc = "Represents [`CondExpr::alt`]"] + Alt, + } + impl ConstructorField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ConstructorField { + #[doc = "Represents [`Constructor::span`]"] + Span, + #[doc = "Represents [`Constructor::ctxt`]"] + Ctxt, + #[doc = "Represents [`Constructor::key`]"] + Key, + #[doc = "Represents [`Constructor::params`]"] + Params(usize), + #[doc = "Represents [`Constructor::body`]"] + Body, + #[doc = "Represents [`Constructor::accessibility`]"] + Accessibility, + #[doc = "Represents [`Constructor::is_optional`]"] + IsOptional, + } + impl ContinueStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ContinueStmtField { + #[doc = "Represents [`ContinueStmt::span`]"] + Span, + #[doc = "Represents [`ContinueStmt::label`]"] + Label, + } + impl DebuggerStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum DebuggerStmtField { + #[doc = "Represents [`DebuggerStmt::span`]"] + Span, + } + impl DeclField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum DeclField { + #[doc = "Represents [`Decl::Class`]"] + Class, + #[doc = "Represents [`Decl::Fn`]"] + Fn, + #[doc = "Represents [`Decl::Var`]"] + Var, + #[doc = "Represents [`Decl::Using`]"] + Using, + #[doc = "Represents [`Decl::TsInterface`]"] + TsInterface, + #[doc = "Represents [`Decl::TsTypeAlias`]"] + TsTypeAlias, + #[doc = "Represents [`Decl::TsEnum`]"] + TsEnum, + #[doc = "Represents [`Decl::TsModule`]"] + TsModule, + } + impl DecoratorField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum DecoratorField { + #[doc = "Represents [`Decorator::span`]"] + Span, + #[doc = "Represents [`Decorator::expr`]"] + Expr, + } + impl DefaultDeclField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum DefaultDeclField { + #[doc = "Represents [`DefaultDecl::Class`]"] + Class, + #[doc = "Represents [`DefaultDecl::Fn`]"] + Fn, + #[doc = "Represents [`DefaultDecl::TsInterfaceDecl`]"] + TsInterfaceDecl, + } + impl DoWhileStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum DoWhileStmtField { + #[doc = "Represents [`DoWhileStmt::span`]"] + Span, + #[doc = "Represents [`DoWhileStmt::test`]"] + Test, + #[doc = "Represents [`DoWhileStmt::body`]"] + Body, + } + impl EmptyStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum EmptyStmtField { + #[doc = "Represents [`EmptyStmt::span`]"] + Span, + } + impl ExportAllField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportAllField { + #[doc = "Represents [`ExportAll::span`]"] + Span, + #[doc = "Represents [`ExportAll::src`]"] + Src, + #[doc = "Represents [`ExportAll::type_only`]"] + TypeOnly, + #[doc = "Represents [`ExportAll::with`]"] + With, + } + impl ExportDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportDeclField { + #[doc = "Represents [`ExportDecl::span`]"] + Span, + #[doc = "Represents [`ExportDecl::decl`]"] + Decl, + } + impl ExportDefaultDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportDefaultDeclField { + #[doc = "Represents [`ExportDefaultDecl::span`]"] + Span, + #[doc = "Represents [`ExportDefaultDecl::decl`]"] + Decl, + } + impl ExportDefaultExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportDefaultExprField { + #[doc = "Represents [`ExportDefaultExpr::span`]"] + Span, + #[doc = "Represents [`ExportDefaultExpr::expr`]"] + Expr, + } + impl ExportDefaultSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportDefaultSpecifierField { + #[doc = "Represents [`ExportDefaultSpecifier::exported`]"] + Exported, + } + impl ExportNamedSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportNamedSpecifierField { + #[doc = "Represents [`ExportNamedSpecifier::span`]"] + Span, + #[doc = "Represents [`ExportNamedSpecifier::orig`]"] + Orig, + #[doc = "Represents [`ExportNamedSpecifier::exported`]"] + Exported, + #[doc = "Represents [`ExportNamedSpecifier::is_type_only`]"] + IsTypeOnly, + } + impl ExportNamespaceSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportNamespaceSpecifierField { + #[doc = "Represents [`ExportNamespaceSpecifier::span`]"] + Span, + #[doc = "Represents [`ExportNamespaceSpecifier::name`]"] + Name, + } + impl ExportSpecifierField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExportSpecifierField { + #[doc = "Represents [`ExportSpecifier::Namespace`]"] + Namespace, + #[doc = "Represents [`ExportSpecifier::Default`]"] + Default, + #[doc = "Represents [`ExportSpecifier::Named`]"] + Named, + } + impl ExprField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExprField { + #[doc = "Represents [`Expr::This`]"] + This, + #[doc = "Represents [`Expr::Array`]"] + Array, + #[doc = "Represents [`Expr::Object`]"] + Object, + #[doc = "Represents [`Expr::Fn`]"] + Fn, + #[doc = "Represents [`Expr::Unary`]"] + Unary, + #[doc = "Represents [`Expr::Update`]"] + Update, + #[doc = "Represents [`Expr::Bin`]"] + Bin, + #[doc = "Represents [`Expr::Assign`]"] + Assign, + #[doc = "Represents [`Expr::Member`]"] + Member, + #[doc = "Represents [`Expr::SuperProp`]"] + SuperProp, + #[doc = "Represents [`Expr::Cond`]"] + Cond, + #[doc = "Represents [`Expr::Call`]"] + Call, + #[doc = "Represents [`Expr::New`]"] + New, + #[doc = "Represents [`Expr::Seq`]"] + Seq, + #[doc = "Represents [`Expr::Ident`]"] + Ident, + #[doc = "Represents [`Expr::Lit`]"] + Lit, + #[doc = "Represents [`Expr::Tpl`]"] + Tpl, + #[doc = "Represents [`Expr::TaggedTpl`]"] + TaggedTpl, + #[doc = "Represents [`Expr::Arrow`]"] + Arrow, + #[doc = "Represents [`Expr::Class`]"] + Class, + #[doc = "Represents [`Expr::Yield`]"] + Yield, + #[doc = "Represents [`Expr::MetaProp`]"] + MetaProp, + #[doc = "Represents [`Expr::Await`]"] + Await, + #[doc = "Represents [`Expr::Paren`]"] + Paren, + #[doc = "Represents [`Expr::JSXMember`]"] + Jsxmember, + #[doc = "Represents [`Expr::JSXNamespacedName`]"] + JsxnamespacedName, + #[doc = "Represents [`Expr::JSXEmpty`]"] + Jsxempty, + #[doc = "Represents [`Expr::JSXElement`]"] + Jsxelement, + #[doc = "Represents [`Expr::JSXFragment`]"] + Jsxfragment, + #[doc = "Represents [`Expr::TsTypeAssertion`]"] + TsTypeAssertion, + #[doc = "Represents [`Expr::TsConstAssertion`]"] + TsConstAssertion, + #[doc = "Represents [`Expr::TsNonNull`]"] + TsNonNull, + #[doc = "Represents [`Expr::TsAs`]"] + TsAs, + #[doc = "Represents [`Expr::TsInstantiation`]"] + TsInstantiation, + #[doc = "Represents [`Expr::TsSatisfies`]"] + TsSatisfies, + #[doc = "Represents [`Expr::PrivateName`]"] + PrivateName, + #[doc = "Represents [`Expr::OptChain`]"] + OptChain, + #[doc = "Represents [`Expr::Invalid`]"] + Invalid, + } + impl ExprOrSpreadField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExprOrSpreadField { + #[doc = "Represents [`ExprOrSpread::spread`]"] + Spread, + #[doc = "Represents [`ExprOrSpread::expr`]"] + Expr, + } + impl ExprStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ExprStmtField { + #[doc = "Represents [`ExprStmt::span`]"] + Span, + #[doc = "Represents [`ExprStmt::expr`]"] + Expr, + } + impl FnDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum FnDeclField { + #[doc = "Represents [`FnDecl::ident`]"] + Ident, + #[doc = "Represents [`FnDecl::declare`]"] + Declare, + #[doc = "Represents [`FnDecl::function`]"] + Function, + } + impl FnExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum FnExprField { + #[doc = "Represents [`FnExpr::ident`]"] + Ident, + #[doc = "Represents [`FnExpr::function`]"] + Function, + } + impl ForHeadField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ForHeadField { + #[doc = "Represents [`ForHead::VarDecl`]"] + VarDecl, + #[doc = "Represents [`ForHead::UsingDecl`]"] + UsingDecl, + #[doc = "Represents [`ForHead::Pat`]"] + Pat, + } + impl ForInStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ForInStmtField { + #[doc = "Represents [`ForInStmt::span`]"] + Span, + #[doc = "Represents [`ForInStmt::left`]"] + Left, + #[doc = "Represents [`ForInStmt::right`]"] + Right, + #[doc = "Represents [`ForInStmt::body`]"] + Body, + } + impl ForOfStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ForOfStmtField { + #[doc = "Represents [`ForOfStmt::span`]"] + Span, + #[doc = "Represents [`ForOfStmt::is_await`]"] + IsAwait, + #[doc = "Represents [`ForOfStmt::left`]"] + Left, + #[doc = "Represents [`ForOfStmt::right`]"] + Right, + #[doc = "Represents [`ForOfStmt::body`]"] + Body, + } + impl ForStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ForStmtField { + #[doc = "Represents [`ForStmt::span`]"] + Span, + #[doc = "Represents [`ForStmt::init`]"] + Init, + #[doc = "Represents [`ForStmt::test`]"] + Test, + #[doc = "Represents [`ForStmt::update`]"] + Update, + #[doc = "Represents [`ForStmt::body`]"] + Body, + } + impl FunctionField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum FunctionField { + #[doc = "Represents [`Function::params`]"] + Params(usize), + #[doc = "Represents [`Function::decorators`]"] + Decorators(usize), + #[doc = "Represents [`Function::span`]"] + Span, + #[doc = "Represents [`Function::ctxt`]"] + Ctxt, + #[doc = "Represents [`Function::body`]"] + Body, + #[doc = "Represents [`Function::is_generator`]"] + IsGenerator, + #[doc = "Represents [`Function::is_async`]"] + IsAsync, + #[doc = "Represents [`Function::type_params`]"] + TypeParams, + #[doc = "Represents [`Function::return_type`]"] + ReturnType, + } + impl GetterPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum GetterPropField { + #[doc = "Represents [`GetterProp::span`]"] + Span, + #[doc = "Represents [`GetterProp::key`]"] + Key, + #[doc = "Represents [`GetterProp::type_ann`]"] + TypeAnn, + #[doc = "Represents [`GetterProp::body`]"] + Body, + } + impl IdentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum IdentField { + #[doc = "Represents [`Ident::span`]"] + Span, + #[doc = "Represents [`Ident::ctxt`]"] + Ctxt, + #[doc = "Represents [`Ident::sym`]"] + Sym, + #[doc = "Represents [`Ident::optional`]"] + Optional, + } + impl IdentNameField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum IdentNameField { + #[doc = "Represents [`IdentName::span`]"] + Span, + #[doc = "Represents [`IdentName::sym`]"] + Sym, + } + impl IfStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum IfStmtField { + #[doc = "Represents [`IfStmt::span`]"] + Span, + #[doc = "Represents [`IfStmt::test`]"] + Test, + #[doc = "Represents [`IfStmt::cons`]"] + Cons, + #[doc = "Represents [`IfStmt::alt`]"] + Alt, + } + impl ImportField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportField { + #[doc = "Represents [`Import::span`]"] + Span, + #[doc = "Represents [`Import::phase`]"] + Phase, + } + impl ImportDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Specifiers(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportDeclField { + #[doc = "Represents [`ImportDecl::span`]"] + Span, + #[doc = "Represents [`ImportDecl::specifiers`]"] + Specifiers(usize), + #[doc = "Represents [`ImportDecl::src`]"] + Src, + #[doc = "Represents [`ImportDecl::type_only`]"] + TypeOnly, + #[doc = "Represents [`ImportDecl::with`]"] + With, + #[doc = "Represents [`ImportDecl::phase`]"] + Phase, + } + impl ImportDefaultSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportDefaultSpecifierField { + #[doc = "Represents [`ImportDefaultSpecifier::span`]"] + Span, + #[doc = "Represents [`ImportDefaultSpecifier::local`]"] + Local, + } + impl ImportNamedSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportNamedSpecifierField { + #[doc = "Represents [`ImportNamedSpecifier::span`]"] + Span, + #[doc = "Represents [`ImportNamedSpecifier::local`]"] + Local, + #[doc = "Represents [`ImportNamedSpecifier::imported`]"] + Imported, + #[doc = "Represents [`ImportNamedSpecifier::is_type_only`]"] + IsTypeOnly, + } + impl ImportPhaseField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportPhaseField { + #[doc = "Represents [`ImportPhase::Evaluation`]"] + Evaluation, + #[doc = "Represents [`ImportPhase::Source`]"] + Source, + #[doc = "Represents [`ImportPhase::Defer`]"] + Defer, + } + impl ImportSpecifierField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportSpecifierField { + #[doc = "Represents [`ImportSpecifier::Named`]"] + Named, + #[doc = "Represents [`ImportSpecifier::Default`]"] + Default, + #[doc = "Represents [`ImportSpecifier::Namespace`]"] + Namespace, + } + impl ImportStarAsSpecifierField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportStarAsSpecifierField { + #[doc = "Represents [`ImportStarAsSpecifier::span`]"] + Span, + #[doc = "Represents [`ImportStarAsSpecifier::local`]"] + Local, + } + impl ImportWithField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Values(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportWithField { + #[doc = "Represents [`ImportWith::span`]"] + Span, + #[doc = "Represents [`ImportWith::values`]"] + Values(usize), + } + impl ImportWithItemField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ImportWithItemField { + #[doc = "Represents [`ImportWithItem::key`]"] + Key, + #[doc = "Represents [`ImportWithItem::value`]"] + Value, + } + impl InvalidField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum InvalidField { + #[doc = "Represents [`Invalid::span`]"] + Span, + } + impl JSXAttrField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXAttrField { + #[doc = "Represents [`JSXAttr::span`]"] + Span, + #[doc = "Represents [`JSXAttr::name`]"] + Name, + #[doc = "Represents [`JSXAttr::value`]"] + Value, + } + impl JSXAttrNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXAttrNameField { + #[doc = "Represents [`JSXAttrName::Ident`]"] + Ident, + #[doc = "Represents [`JSXAttrName::JSXNamespacedName`]"] + JsxnamespacedName, + } + impl JSXAttrOrSpreadField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXAttrOrSpreadField { + #[doc = "Represents [`JSXAttrOrSpread::JSXAttr`]"] + Jsxattr, + #[doc = "Represents [`JSXAttrOrSpread::SpreadElement`]"] + SpreadElement, + } + impl JSXAttrValueField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXAttrValueField { + #[doc = "Represents [`JSXAttrValue::Lit`]"] + Lit, + #[doc = "Represents [`JSXAttrValue::JSXExprContainer`]"] + JsxexprContainer, + #[doc = "Represents [`JSXAttrValue::JSXElement`]"] + Jsxelement, + #[doc = "Represents [`JSXAttrValue::JSXFragment`]"] + Jsxfragment, + } + impl JSXClosingElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXClosingElementField { + #[doc = "Represents [`JSXClosingElement::span`]"] + Span, + #[doc = "Represents [`JSXClosingElement::name`]"] + Name, + } + impl JSXClosingFragmentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXClosingFragmentField { + #[doc = "Represents [`JSXClosingFragment::span`]"] + Span, + } + impl JSXElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Children(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXElementField { + #[doc = "Represents [`JSXElement::span`]"] + Span, + #[doc = "Represents [`JSXElement::opening`]"] + Opening, + #[doc = "Represents [`JSXElement::children`]"] + Children(usize), + #[doc = "Represents [`JSXElement::closing`]"] + Closing, + } + impl JSXElementChildField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXElementChildField { + #[doc = "Represents [`JSXElementChild::JSXText`]"] + Jsxtext, + #[doc = "Represents [`JSXElementChild::JSXExprContainer`]"] + JsxexprContainer, + #[doc = "Represents [`JSXElementChild::JSXSpreadChild`]"] + JsxspreadChild, + #[doc = "Represents [`JSXElementChild::JSXElement`]"] + Jsxelement, + #[doc = "Represents [`JSXElementChild::JSXFragment`]"] + Jsxfragment, + } + impl JSXElementNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXElementNameField { + #[doc = "Represents [`JSXElementName::Ident`]"] + Ident, + #[doc = "Represents [`JSXElementName::JSXMemberExpr`]"] + JsxmemberExpr, + #[doc = "Represents [`JSXElementName::JSXNamespacedName`]"] + JsxnamespacedName, + } + impl JSXEmptyExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXEmptyExprField { + #[doc = "Represents [`JSXEmptyExpr::span`]"] + Span, + } + impl JSXExprField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXExprField { + #[doc = "Represents [`JSXExpr::JSXEmptyExpr`]"] + JsxemptyExpr, + #[doc = "Represents [`JSXExpr::Expr`]"] + Expr, + } + impl JSXExprContainerField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXExprContainerField { + #[doc = "Represents [`JSXExprContainer::span`]"] + Span, + #[doc = "Represents [`JSXExprContainer::expr`]"] + Expr, + } + impl JSXFragmentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Children(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXFragmentField { + #[doc = "Represents [`JSXFragment::span`]"] + Span, + #[doc = "Represents [`JSXFragment::opening`]"] + Opening, + #[doc = "Represents [`JSXFragment::children`]"] + Children(usize), + #[doc = "Represents [`JSXFragment::closing`]"] + Closing, + } + impl JSXMemberExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXMemberExprField { + #[doc = "Represents [`JSXMemberExpr::span`]"] + Span, + #[doc = "Represents [`JSXMemberExpr::obj`]"] + Obj, + #[doc = "Represents [`JSXMemberExpr::prop`]"] + Prop, + } + impl JSXNamespacedNameField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXNamespacedNameField { + #[doc = "Represents [`JSXNamespacedName::span`]"] + Span, + #[doc = "Represents [`JSXNamespacedName::ns`]"] + Ns, + #[doc = "Represents [`JSXNamespacedName::name`]"] + Name, + } + impl JSXObjectField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXObjectField { + #[doc = "Represents [`JSXObject::JSXMemberExpr`]"] + JsxmemberExpr, + #[doc = "Represents [`JSXObject::Ident`]"] + Ident, + } + impl JSXOpeningElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Attrs(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXOpeningElementField { + #[doc = "Represents [`JSXOpeningElement::name`]"] + Name, + #[doc = "Represents [`JSXOpeningElement::span`]"] + Span, + #[doc = "Represents [`JSXOpeningElement::attrs`]"] + Attrs(usize), + #[doc = "Represents [`JSXOpeningElement::self_closing`]"] + SelfClosing, + #[doc = "Represents [`JSXOpeningElement::type_args`]"] + TypeArgs, + } + impl JSXOpeningFragmentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXOpeningFragmentField { + #[doc = "Represents [`JSXOpeningFragment::span`]"] + Span, + } + impl JSXSpreadChildField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXSpreadChildField { + #[doc = "Represents [`JSXSpreadChild::span`]"] + Span, + #[doc = "Represents [`JSXSpreadChild::expr`]"] + Expr, + } + impl JSXTextField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum JSXTextField { + #[doc = "Represents [`JSXText::span`]"] + Span, + #[doc = "Represents [`JSXText::value`]"] + Value, + #[doc = "Represents [`JSXText::raw`]"] + Raw, + } + impl KeyField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum KeyField { + #[doc = "Represents [`Key::Private`]"] + Private, + #[doc = "Represents [`Key::Public`]"] + Public, + } + impl KeyValuePatPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum KeyValuePatPropField { + #[doc = "Represents [`KeyValuePatProp::key`]"] + Key, + #[doc = "Represents [`KeyValuePatProp::value`]"] + Value, + } + impl KeyValuePropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum KeyValuePropField { + #[doc = "Represents [`KeyValueProp::key`]"] + Key, + #[doc = "Represents [`KeyValueProp::value`]"] + Value, + } + impl LabeledStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum LabeledStmtField { + #[doc = "Represents [`LabeledStmt::span`]"] + Span, + #[doc = "Represents [`LabeledStmt::label`]"] + Label, + #[doc = "Represents [`LabeledStmt::body`]"] + Body, + } + impl LitField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum LitField { + #[doc = "Represents [`Lit::Str`]"] + Str, + #[doc = "Represents [`Lit::Bool`]"] + Bool, + #[doc = "Represents [`Lit::Null`]"] + Null, + #[doc = "Represents [`Lit::Num`]"] + Num, + #[doc = "Represents [`Lit::BigInt`]"] + BigInt, + #[doc = "Represents [`Lit::Regex`]"] + Regex, + #[doc = "Represents [`Lit::JSXText`]"] + Jsxtext, + } + impl MemberExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MemberExprField { + #[doc = "Represents [`MemberExpr::span`]"] + Span, + #[doc = "Represents [`MemberExpr::obj`]"] + Obj, + #[doc = "Represents [`MemberExpr::prop`]"] + Prop, + } + impl MemberPropField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MemberPropField { + #[doc = "Represents [`MemberProp::Ident`]"] + Ident, + #[doc = "Represents [`MemberProp::PrivateName`]"] + PrivateName, + #[doc = "Represents [`MemberProp::Computed`]"] + Computed, + } + impl MetaPropExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MetaPropExprField { + #[doc = "Represents [`MetaPropExpr::span`]"] + Span, + #[doc = "Represents [`MetaPropExpr::kind`]"] + Kind, + } + impl MetaPropKindField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MetaPropKindField { + #[doc = "Represents [`MetaPropKind::NewTarget`]"] + NewTarget, + #[doc = "Represents [`MetaPropKind::ImportMeta`]"] + ImportMeta, + } + impl MethodKindField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MethodKindField { + #[doc = "Represents [`MethodKind::Method`]"] + Method, + #[doc = "Represents [`MethodKind::Getter`]"] + Getter, + #[doc = "Represents [`MethodKind::Setter`]"] + Setter, + } + impl MethodPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum MethodPropField { + #[doc = "Represents [`MethodProp::key`]"] + Key, + #[doc = "Represents [`MethodProp::function`]"] + Function, + } + impl ModuleField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Body(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ModuleField { + #[doc = "Represents [`Module::span`]"] + Span, + #[doc = "Represents [`Module::body`]"] + Body(usize), + #[doc = "Represents [`Module::shebang`]"] + Shebang, + } + impl ModuleDeclField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ModuleDeclField { + #[doc = "Represents [`ModuleDecl::Import`]"] + Import, + #[doc = "Represents [`ModuleDecl::ExportDecl`]"] + ExportDecl, + #[doc = "Represents [`ModuleDecl::ExportNamed`]"] + ExportNamed, + #[doc = "Represents [`ModuleDecl::ExportDefaultDecl`]"] + ExportDefaultDecl, + #[doc = "Represents [`ModuleDecl::ExportDefaultExpr`]"] + ExportDefaultExpr, + #[doc = "Represents [`ModuleDecl::ExportAll`]"] + ExportAll, + #[doc = "Represents [`ModuleDecl::TsImportEquals`]"] + TsImportEquals, + #[doc = "Represents [`ModuleDecl::TsExportAssignment`]"] + TsExportAssignment, + #[doc = "Represents [`ModuleDecl::TsNamespaceExport`]"] + TsNamespaceExport, + } + impl ModuleExportNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ModuleExportNameField { + #[doc = "Represents [`ModuleExportName::Ident`]"] + Ident, + #[doc = "Represents [`ModuleExportName::Str`]"] + Str, + } + impl ModuleItemField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ModuleItemField { + #[doc = "Represents [`ModuleItem::ModuleDecl`]"] + ModuleDecl, + #[doc = "Represents [`ModuleItem::Stmt`]"] + Stmt, + } + impl NamedExportField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Specifiers(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum NamedExportField { + #[doc = "Represents [`NamedExport::span`]"] + Span, + #[doc = "Represents [`NamedExport::specifiers`]"] + Specifiers(usize), + #[doc = "Represents [`NamedExport::src`]"] + Src, + #[doc = "Represents [`NamedExport::type_only`]"] + TypeOnly, + #[doc = "Represents [`NamedExport::with`]"] + With, + } + impl NewExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Args(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum NewExprField { + #[doc = "Represents [`NewExpr::span`]"] + Span, + #[doc = "Represents [`NewExpr::ctxt`]"] + Ctxt, + #[doc = "Represents [`NewExpr::callee`]"] + Callee, + #[doc = "Represents [`NewExpr::args`]"] + Args(usize), + #[doc = "Represents [`NewExpr::type_args`]"] + TypeArgs, + } + impl NullField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum NullField { + #[doc = "Represents [`Null::span`]"] + Span, + } + impl NumberField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum NumberField { + #[doc = "Represents [`Number::span`]"] + Span, + #[doc = "Represents [`Number::value`]"] + Value, + #[doc = "Represents [`Number::raw`]"] + Raw, + } + impl ObjectLitField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Props(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ObjectLitField { + #[doc = "Represents [`ObjectLit::span`]"] + Span, + #[doc = "Represents [`ObjectLit::props`]"] + Props(usize), + } + impl ObjectPatField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Props(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ObjectPatField { + #[doc = "Represents [`ObjectPat::span`]"] + Span, + #[doc = "Represents [`ObjectPat::props`]"] + Props(usize), + #[doc = "Represents [`ObjectPat::optional`]"] + Optional, + #[doc = "Represents [`ObjectPat::type_ann`]"] + TypeAnn, + } + impl ObjectPatPropField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ObjectPatPropField { + #[doc = "Represents [`ObjectPatProp::KeyValue`]"] + KeyValue, + #[doc = "Represents [`ObjectPatProp::Assign`]"] + Assign, + #[doc = "Represents [`ObjectPatProp::Rest`]"] + Rest, + } + impl OptCallField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Args(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum OptCallField { + #[doc = "Represents [`OptCall::span`]"] + Span, + #[doc = "Represents [`OptCall::ctxt`]"] + Ctxt, + #[doc = "Represents [`OptCall::callee`]"] + Callee, + #[doc = "Represents [`OptCall::args`]"] + Args(usize), + #[doc = "Represents [`OptCall::type_args`]"] + TypeArgs, + } + impl OptChainBaseField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum OptChainBaseField { + #[doc = "Represents [`OptChainBase::Member`]"] + Member, + #[doc = "Represents [`OptChainBase::Call`]"] + Call, + } + impl OptChainExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum OptChainExprField { + #[doc = "Represents [`OptChainExpr::span`]"] + Span, + #[doc = "Represents [`OptChainExpr::optional`]"] + Optional, + #[doc = "Represents [`OptChainExpr::base`]"] + Base, + } + impl ParamField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ParamField { + #[doc = "Represents [`Param::span`]"] + Span, + #[doc = "Represents [`Param::decorators`]"] + Decorators(usize), + #[doc = "Represents [`Param::pat`]"] + Pat, + } + impl ParamOrTsParamPropField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ParamOrTsParamPropField { + #[doc = "Represents [`ParamOrTsParamProp::TsParamProp`]"] + TsParamProp, + #[doc = "Represents [`ParamOrTsParamProp::Param`]"] + Param, + } + impl ParenExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ParenExprField { + #[doc = "Represents [`ParenExpr::span`]"] + Span, + #[doc = "Represents [`ParenExpr::expr`]"] + Expr, + } + impl PatField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PatField { + #[doc = "Represents [`Pat::Ident`]"] + Ident, + #[doc = "Represents [`Pat::Array`]"] + Array, + #[doc = "Represents [`Pat::Rest`]"] + Rest, + #[doc = "Represents [`Pat::Object`]"] + Object, + #[doc = "Represents [`Pat::Assign`]"] + Assign, + #[doc = "Represents [`Pat::Invalid`]"] + Invalid, + #[doc = "Represents [`Pat::Expr`]"] + Expr, + } + impl PrivateMethodField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PrivateMethodField { + #[doc = "Represents [`PrivateMethod::span`]"] + Span, + #[doc = "Represents [`PrivateMethod::key`]"] + Key, + #[doc = "Represents [`PrivateMethod::function`]"] + Function, + #[doc = "Represents [`PrivateMethod::kind`]"] + Kind, + #[doc = "Represents [`PrivateMethod::is_static`]"] + IsStatic, + #[doc = "Represents [`PrivateMethod::accessibility`]"] + Accessibility, + #[doc = "Represents [`PrivateMethod::is_abstract`]"] + IsAbstract, + #[doc = "Represents [`PrivateMethod::is_optional`]"] + IsOptional, + #[doc = "Represents [`PrivateMethod::is_override`]"] + IsOverride, + } + impl PrivateNameField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PrivateNameField { + #[doc = "Represents [`PrivateName::span`]"] + Span, + #[doc = "Represents [`PrivateName::name`]"] + Name, + } + impl PrivatePropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PrivatePropField { + #[doc = "Represents [`PrivateProp::span`]"] + Span, + #[doc = "Represents [`PrivateProp::ctxt`]"] + Ctxt, + #[doc = "Represents [`PrivateProp::key`]"] + Key, + #[doc = "Represents [`PrivateProp::value`]"] + Value, + #[doc = "Represents [`PrivateProp::type_ann`]"] + TypeAnn, + #[doc = "Represents [`PrivateProp::is_static`]"] + IsStatic, + #[doc = "Represents [`PrivateProp::decorators`]"] + Decorators(usize), + #[doc = "Represents [`PrivateProp::accessibility`]"] + Accessibility, + #[doc = "Represents [`PrivateProp::is_optional`]"] + IsOptional, + #[doc = "Represents [`PrivateProp::is_override`]"] + IsOverride, + #[doc = "Represents [`PrivateProp::readonly`]"] + Readonly, + #[doc = "Represents [`PrivateProp::definite`]"] + Definite, + } + impl ProgramField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ProgramField { + #[doc = "Represents [`Program::Module`]"] + Module, + #[doc = "Represents [`Program::Script`]"] + Script, + } + impl PropField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PropField { + #[doc = "Represents [`Prop::Shorthand`]"] + Shorthand, + #[doc = "Represents [`Prop::KeyValue`]"] + KeyValue, + #[doc = "Represents [`Prop::Assign`]"] + Assign, + #[doc = "Represents [`Prop::Getter`]"] + Getter, + #[doc = "Represents [`Prop::Setter`]"] + Setter, + #[doc = "Represents [`Prop::Method`]"] + Method, + } + impl PropNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PropNameField { + #[doc = "Represents [`PropName::Ident`]"] + Ident, + #[doc = "Represents [`PropName::Str`]"] + Str, + #[doc = "Represents [`PropName::Num`]"] + Num, + #[doc = "Represents [`PropName::Computed`]"] + Computed, + #[doc = "Represents [`PropName::BigInt`]"] + BigInt, + } + impl PropOrSpreadField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum PropOrSpreadField { + #[doc = "Represents [`PropOrSpread::Spread`]"] + Spread, + #[doc = "Represents [`PropOrSpread::Prop`]"] + Prop, + } + impl RegexField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum RegexField { + #[doc = "Represents [`Regex::span`]"] + Span, + #[doc = "Represents [`Regex::exp`]"] + Exp, + #[doc = "Represents [`Regex::flags`]"] + Flags, + } + impl RestPatField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum RestPatField { + #[doc = "Represents [`RestPat::span`]"] + Span, + #[doc = "Represents [`RestPat::dot3_token`]"] + Dot3Token, + #[doc = "Represents [`RestPat::arg`]"] + Arg, + #[doc = "Represents [`RestPat::type_ann`]"] + TypeAnn, + } + impl ReturnStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ReturnStmtField { + #[doc = "Represents [`ReturnStmt::span`]"] + Span, + #[doc = "Represents [`ReturnStmt::arg`]"] + Arg, + } + impl ScriptField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Body(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ScriptField { + #[doc = "Represents [`Script::span`]"] + Span, + #[doc = "Represents [`Script::body`]"] + Body(usize), + #[doc = "Represents [`Script::shebang`]"] + Shebang, + } + impl SeqExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Exprs(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SeqExprField { + #[doc = "Represents [`SeqExpr::span`]"] + Span, + #[doc = "Represents [`SeqExpr::exprs`]"] + Exprs(usize), + } + impl SetterPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SetterPropField { + #[doc = "Represents [`SetterProp::span`]"] + Span, + #[doc = "Represents [`SetterProp::key`]"] + Key, + #[doc = "Represents [`SetterProp::this_param`]"] + ThisParam, + #[doc = "Represents [`SetterProp::param`]"] + Param, + #[doc = "Represents [`SetterProp::body`]"] + Body, + } + impl SimpleAssignTargetField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SimpleAssignTargetField { + #[doc = "Represents [`SimpleAssignTarget::Ident`]"] + Ident, + #[doc = "Represents [`SimpleAssignTarget::Member`]"] + Member, + #[doc = "Represents [`SimpleAssignTarget::SuperProp`]"] + SuperProp, + #[doc = "Represents [`SimpleAssignTarget::Paren`]"] + Paren, + #[doc = "Represents [`SimpleAssignTarget::OptChain`]"] + OptChain, + #[doc = "Represents [`SimpleAssignTarget::TsAs`]"] + TsAs, + #[doc = "Represents [`SimpleAssignTarget::TsSatisfies`]"] + TsSatisfies, + #[doc = "Represents [`SimpleAssignTarget::TsNonNull`]"] + TsNonNull, + #[doc = "Represents [`SimpleAssignTarget::TsTypeAssertion`]"] + TsTypeAssertion, + #[doc = "Represents [`SimpleAssignTarget::TsInstantiation`]"] + TsInstantiation, + #[doc = "Represents [`SimpleAssignTarget::Invalid`]"] + Invalid, + } + impl SpreadElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SpreadElementField { + #[doc = "Represents [`SpreadElement::dot3_token`]"] + Dot3Token, + #[doc = "Represents [`SpreadElement::expr`]"] + Expr, + } + impl StaticBlockField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum StaticBlockField { + #[doc = "Represents [`StaticBlock::span`]"] + Span, + #[doc = "Represents [`StaticBlock::body`]"] + Body, + } + impl StmtField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum StmtField { + #[doc = "Represents [`Stmt::Block`]"] + Block, + #[doc = "Represents [`Stmt::Empty`]"] + Empty, + #[doc = "Represents [`Stmt::Debugger`]"] + Debugger, + #[doc = "Represents [`Stmt::With`]"] + With, + #[doc = "Represents [`Stmt::Return`]"] + Return, + #[doc = "Represents [`Stmt::Labeled`]"] + Labeled, + #[doc = "Represents [`Stmt::Break`]"] + Break, + #[doc = "Represents [`Stmt::Continue`]"] + Continue, + #[doc = "Represents [`Stmt::If`]"] + If, + #[doc = "Represents [`Stmt::Switch`]"] + Switch, + #[doc = "Represents [`Stmt::Throw`]"] + Throw, + #[doc = "Represents [`Stmt::Try`]"] + Try, + #[doc = "Represents [`Stmt::While`]"] + While, + #[doc = "Represents [`Stmt::DoWhile`]"] + DoWhile, + #[doc = "Represents [`Stmt::For`]"] + For, + #[doc = "Represents [`Stmt::ForIn`]"] + ForIn, + #[doc = "Represents [`Stmt::ForOf`]"] + ForOf, + #[doc = "Represents [`Stmt::Decl`]"] + Decl, + #[doc = "Represents [`Stmt::Expr`]"] + Expr, + } + impl StrField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum StrField { + #[doc = "Represents [`Str::span`]"] + Span, + #[doc = "Represents [`Str::value`]"] + Value, + #[doc = "Represents [`Str::raw`]"] + Raw, + } + impl SuperField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SuperField { + #[doc = "Represents [`Super::span`]"] + Span, + } + impl SuperPropField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SuperPropField { + #[doc = "Represents [`SuperProp::Ident`]"] + Ident, + #[doc = "Represents [`SuperProp::Computed`]"] + Computed, + } + impl SuperPropExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SuperPropExprField { + #[doc = "Represents [`SuperPropExpr::span`]"] + Span, + #[doc = "Represents [`SuperPropExpr::obj`]"] + Obj, + #[doc = "Represents [`SuperPropExpr::prop`]"] + Prop, + } + impl SwitchCaseField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Cons(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SwitchCaseField { + #[doc = "Represents [`SwitchCase::span`]"] + Span, + #[doc = "Represents [`SwitchCase::test`]"] + Test, + #[doc = "Represents [`SwitchCase::cons`]"] + Cons(usize), + } + impl SwitchStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Cases(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum SwitchStmtField { + #[doc = "Represents [`SwitchStmt::span`]"] + Span, + #[doc = "Represents [`SwitchStmt::discriminant`]"] + Discriminant, + #[doc = "Represents [`SwitchStmt::cases`]"] + Cases(usize), + } + impl TaggedTplField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TaggedTplField { + #[doc = "Represents [`TaggedTpl::span`]"] + Span, + #[doc = "Represents [`TaggedTpl::ctxt`]"] + Ctxt, + #[doc = "Represents [`TaggedTpl::tag`]"] + Tag, + #[doc = "Represents [`TaggedTpl::type_params`]"] + TypeParams, + #[doc = "Represents [`TaggedTpl::tpl`]"] + Tpl, + } + impl ThisExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ThisExprField { + #[doc = "Represents [`ThisExpr::span`]"] + Span, + } + impl ThrowStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum ThrowStmtField { + #[doc = "Represents [`ThrowStmt::span`]"] + Span, + #[doc = "Represents [`ThrowStmt::arg`]"] + Arg, + } + impl TplField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Exprs(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + Self::Quasis(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TplField { + #[doc = "Represents [`Tpl::span`]"] + Span, + #[doc = "Represents [`Tpl::exprs`]"] + Exprs(usize), + #[doc = "Represents [`Tpl::quasis`]"] + Quasis(usize), + } + impl TplElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TplElementField { + #[doc = "Represents [`TplElement::span`]"] + Span, + #[doc = "Represents [`TplElement::tail`]"] + Tail, + #[doc = "Represents [`TplElement::cooked`]"] + Cooked, + #[doc = "Represents [`TplElement::raw`]"] + Raw, + } + impl TruePlusMinusField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TruePlusMinusField { + #[doc = "Represents [`TruePlusMinus::True`]"] + True, + #[doc = "Represents [`TruePlusMinus::Plus`]"] + Plus, + #[doc = "Represents [`TruePlusMinus::Minus`]"] + Minus, + } + impl TryStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TryStmtField { + #[doc = "Represents [`TryStmt::span`]"] + Span, + #[doc = "Represents [`TryStmt::block`]"] + Block, + #[doc = "Represents [`TryStmt::handler`]"] + Handler, + #[doc = "Represents [`TryStmt::finalizer`]"] + Finalizer, + } + impl TsArrayTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsArrayTypeField { + #[doc = "Represents [`TsArrayType::span`]"] + Span, + #[doc = "Represents [`TsArrayType::elem_type`]"] + ElemType, + } + impl TsAsExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsAsExprField { + #[doc = "Represents [`TsAsExpr::span`]"] + Span, + #[doc = "Represents [`TsAsExpr::expr`]"] + Expr, + #[doc = "Represents [`TsAsExpr::type_ann`]"] + TypeAnn, + } + impl TsCallSignatureDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsCallSignatureDeclField { + #[doc = "Represents [`TsCallSignatureDecl::span`]"] + Span, + #[doc = "Represents [`TsCallSignatureDecl::params`]"] + Params(usize), + #[doc = "Represents [`TsCallSignatureDecl::type_ann`]"] + TypeAnn, + #[doc = "Represents [`TsCallSignatureDecl::type_params`]"] + TypeParams, + } + impl TsConditionalTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsConditionalTypeField { + #[doc = "Represents [`TsConditionalType::span`]"] + Span, + #[doc = "Represents [`TsConditionalType::check_type`]"] + CheckType, + #[doc = "Represents [`TsConditionalType::extends_type`]"] + ExtendsType, + #[doc = "Represents [`TsConditionalType::true_type`]"] + TrueType, + #[doc = "Represents [`TsConditionalType::false_type`]"] + FalseType, + } + impl TsConstAssertionField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsConstAssertionField { + #[doc = "Represents [`TsConstAssertion::span`]"] + Span, + #[doc = "Represents [`TsConstAssertion::expr`]"] + Expr, + } + impl TsConstructSignatureDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsConstructSignatureDeclField { + #[doc = "Represents [`TsConstructSignatureDecl::span`]"] + Span, + #[doc = "Represents [`TsConstructSignatureDecl::params`]"] + Params(usize), + #[doc = "Represents [`TsConstructSignatureDecl::type_ann`]"] + TypeAnn, + #[doc = "Represents [`TsConstructSignatureDecl::type_params`]"] + TypeParams, + } + impl TsConstructorTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsConstructorTypeField { + #[doc = "Represents [`TsConstructorType::span`]"] + Span, + #[doc = "Represents [`TsConstructorType::params`]"] + Params(usize), + #[doc = "Represents [`TsConstructorType::type_params`]"] + TypeParams, + #[doc = "Represents [`TsConstructorType::type_ann`]"] + TypeAnn, + #[doc = "Represents [`TsConstructorType::is_abstract`]"] + IsAbstract, + } + impl TsEntityNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsEntityNameField { + #[doc = "Represents [`TsEntityName::TsQualifiedName`]"] + TsQualifiedName, + #[doc = "Represents [`TsEntityName::Ident`]"] + Ident, + } + impl TsEnumDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Members(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsEnumDeclField { + #[doc = "Represents [`TsEnumDecl::span`]"] + Span, + #[doc = "Represents [`TsEnumDecl::declare`]"] + Declare, + #[doc = "Represents [`TsEnumDecl::is_const`]"] + IsConst, + #[doc = "Represents [`TsEnumDecl::id`]"] + Id, + #[doc = "Represents [`TsEnumDecl::members`]"] + Members(usize), + } + impl TsEnumMemberField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsEnumMemberField { + #[doc = "Represents [`TsEnumMember::span`]"] + Span, + #[doc = "Represents [`TsEnumMember::id`]"] + Id, + #[doc = "Represents [`TsEnumMember::init`]"] + Init, + } + impl TsEnumMemberIdField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsEnumMemberIdField { + #[doc = "Represents [`TsEnumMemberId::Ident`]"] + Ident, + #[doc = "Represents [`TsEnumMemberId::Str`]"] + Str, + } + impl TsExportAssignmentField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsExportAssignmentField { + #[doc = "Represents [`TsExportAssignment::span`]"] + Span, + #[doc = "Represents [`TsExportAssignment::expr`]"] + Expr, + } + impl TsExprWithTypeArgsField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsExprWithTypeArgsField { + #[doc = "Represents [`TsExprWithTypeArgs::span`]"] + Span, + #[doc = "Represents [`TsExprWithTypeArgs::expr`]"] + Expr, + #[doc = "Represents [`TsExprWithTypeArgs::type_args`]"] + TypeArgs, + } + impl TsExternalModuleRefField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsExternalModuleRefField { + #[doc = "Represents [`TsExternalModuleRef::span`]"] + Span, + #[doc = "Represents [`TsExternalModuleRef::expr`]"] + Expr, + } + impl TsFnOrConstructorTypeField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsFnOrConstructorTypeField { + #[doc = "Represents [`TsFnOrConstructorType::TsFnType`]"] + TsFnType, + #[doc = "Represents [`TsFnOrConstructorType::TsConstructorType`]"] + TsConstructorType, + } + impl TsFnParamField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsFnParamField { + #[doc = "Represents [`TsFnParam::Ident`]"] + Ident, + #[doc = "Represents [`TsFnParam::Array`]"] + Array, + #[doc = "Represents [`TsFnParam::Rest`]"] + Rest, + #[doc = "Represents [`TsFnParam::Object`]"] + Object, + } + impl TsFnTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsFnTypeField { + #[doc = "Represents [`TsFnType::span`]"] + Span, + #[doc = "Represents [`TsFnType::params`]"] + Params(usize), + #[doc = "Represents [`TsFnType::type_params`]"] + TypeParams, + #[doc = "Represents [`TsFnType::type_ann`]"] + TypeAnn, + } + impl TsGetterSignatureField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsGetterSignatureField { + #[doc = "Represents [`TsGetterSignature::span`]"] + Span, + #[doc = "Represents [`TsGetterSignature::key`]"] + Key, + #[doc = "Represents [`TsGetterSignature::computed`]"] + Computed, + #[doc = "Represents [`TsGetterSignature::type_ann`]"] + TypeAnn, + } + impl TsImportEqualsDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsImportEqualsDeclField { + #[doc = "Represents [`TsImportEqualsDecl::span`]"] + Span, + #[doc = "Represents [`TsImportEqualsDecl::is_export`]"] + IsExport, + #[doc = "Represents [`TsImportEqualsDecl::is_type_only`]"] + IsTypeOnly, + #[doc = "Represents [`TsImportEqualsDecl::id`]"] + Id, + #[doc = "Represents [`TsImportEqualsDecl::module_ref`]"] + ModuleRef, + } + impl TsImportTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsImportTypeField { + #[doc = "Represents [`TsImportType::span`]"] + Span, + #[doc = "Represents [`TsImportType::arg`]"] + Arg, + #[doc = "Represents [`TsImportType::qualifier`]"] + Qualifier, + #[doc = "Represents [`TsImportType::type_args`]"] + TypeArgs, + } + impl TsIndexSignatureField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsIndexSignatureField { + #[doc = "Represents [`TsIndexSignature::params`]"] + Params(usize), + #[doc = "Represents [`TsIndexSignature::type_ann`]"] + TypeAnn, + #[doc = "Represents [`TsIndexSignature::readonly`]"] + Readonly, + #[doc = "Represents [`TsIndexSignature::is_static`]"] + IsStatic, + #[doc = "Represents [`TsIndexSignature::span`]"] + Span, + } + impl TsIndexedAccessTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsIndexedAccessTypeField { + #[doc = "Represents [`TsIndexedAccessType::span`]"] + Span, + #[doc = "Represents [`TsIndexedAccessType::readonly`]"] + Readonly, + #[doc = "Represents [`TsIndexedAccessType::obj_type`]"] + ObjType, + #[doc = "Represents [`TsIndexedAccessType::index_type`]"] + IndexType, + } + impl TsInferTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsInferTypeField { + #[doc = "Represents [`TsInferType::span`]"] + Span, + #[doc = "Represents [`TsInferType::type_param`]"] + TypeParam, + } + impl TsInstantiationField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsInstantiationField { + #[doc = "Represents [`TsInstantiation::span`]"] + Span, + #[doc = "Represents [`TsInstantiation::expr`]"] + Expr, + #[doc = "Represents [`TsInstantiation::type_args`]"] + TypeArgs, + } + impl TsInterfaceBodyField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Body(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsInterfaceBodyField { + #[doc = "Represents [`TsInterfaceBody::span`]"] + Span, + #[doc = "Represents [`TsInterfaceBody::body`]"] + Body(usize), + } + impl TsInterfaceDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Extends(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsInterfaceDeclField { + #[doc = "Represents [`TsInterfaceDecl::span`]"] + Span, + #[doc = "Represents [`TsInterfaceDecl::id`]"] + Id, + #[doc = "Represents [`TsInterfaceDecl::declare`]"] + Declare, + #[doc = "Represents [`TsInterfaceDecl::type_params`]"] + TypeParams, + #[doc = "Represents [`TsInterfaceDecl::extends`]"] + Extends(usize), + #[doc = "Represents [`TsInterfaceDecl::body`]"] + Body, + } + impl TsIntersectionTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Types(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsIntersectionTypeField { + #[doc = "Represents [`TsIntersectionType::span`]"] + Span, + #[doc = "Represents [`TsIntersectionType::types`]"] + Types(usize), + } + impl TsKeywordTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsKeywordTypeField { + #[doc = "Represents [`TsKeywordType::span`]"] + Span, + #[doc = "Represents [`TsKeywordType::kind`]"] + Kind, + } + impl TsKeywordTypeKindField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsKeywordTypeKindField { + #[doc = "Represents [`TsKeywordTypeKind::TsAnyKeyword`]"] + TsAnyKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsUnknownKeyword`]"] + TsUnknownKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsNumberKeyword`]"] + TsNumberKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsObjectKeyword`]"] + TsObjectKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsBooleanKeyword`]"] + TsBooleanKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsBigIntKeyword`]"] + TsBigIntKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsStringKeyword`]"] + TsStringKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsSymbolKeyword`]"] + TsSymbolKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsVoidKeyword`]"] + TsVoidKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsUndefinedKeyword`]"] + TsUndefinedKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsNullKeyword`]"] + TsNullKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsNeverKeyword`]"] + TsNeverKeyword, + #[doc = "Represents [`TsKeywordTypeKind::TsIntrinsicKeyword`]"] + TsIntrinsicKeyword, + } + impl TsLitField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsLitField { + #[doc = "Represents [`TsLit::Number`]"] + Number, + #[doc = "Represents [`TsLit::Str`]"] + Str, + #[doc = "Represents [`TsLit::Bool`]"] + Bool, + #[doc = "Represents [`TsLit::BigInt`]"] + BigInt, + #[doc = "Represents [`TsLit::Tpl`]"] + Tpl, + } + impl TsLitTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsLitTypeField { + #[doc = "Represents [`TsLitType::span`]"] + Span, + #[doc = "Represents [`TsLitType::lit`]"] + Lit, + } + impl TsMappedTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsMappedTypeField { + #[doc = "Represents [`TsMappedType::span`]"] + Span, + #[doc = "Represents [`TsMappedType::readonly`]"] + Readonly, + #[doc = "Represents [`TsMappedType::type_param`]"] + TypeParam, + #[doc = "Represents [`TsMappedType::name_type`]"] + NameType, + #[doc = "Represents [`TsMappedType::optional`]"] + Optional, + #[doc = "Represents [`TsMappedType::type_ann`]"] + TypeAnn, + } + impl TsMethodSignatureField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsMethodSignatureField { + #[doc = "Represents [`TsMethodSignature::span`]"] + Span, + #[doc = "Represents [`TsMethodSignature::key`]"] + Key, + #[doc = "Represents [`TsMethodSignature::computed`]"] + Computed, + #[doc = "Represents [`TsMethodSignature::optional`]"] + Optional, + #[doc = "Represents [`TsMethodSignature::params`]"] + Params(usize), + #[doc = "Represents [`TsMethodSignature::type_ann`]"] + TypeAnn, + #[doc = "Represents [`TsMethodSignature::type_params`]"] + TypeParams, + } + impl TsModuleBlockField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Body(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsModuleBlockField { + #[doc = "Represents [`TsModuleBlock::span`]"] + Span, + #[doc = "Represents [`TsModuleBlock::body`]"] + Body(usize), + } + impl TsModuleDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsModuleDeclField { + #[doc = "Represents [`TsModuleDecl::span`]"] + Span, + #[doc = "Represents [`TsModuleDecl::declare`]"] + Declare, + #[doc = "Represents [`TsModuleDecl::global`]"] + Global, + #[doc = "Represents [`TsModuleDecl::id`]"] + Id, + #[doc = "Represents [`TsModuleDecl::body`]"] + Body, + } + impl TsModuleNameField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsModuleNameField { + #[doc = "Represents [`TsModuleName::Ident`]"] + Ident, + #[doc = "Represents [`TsModuleName::Str`]"] + Str, + } + impl TsModuleRefField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsModuleRefField { + #[doc = "Represents [`TsModuleRef::TsEntityName`]"] + TsEntityName, + #[doc = "Represents [`TsModuleRef::TsExternalModuleRef`]"] + TsExternalModuleRef, + } + impl TsNamespaceBodyField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsNamespaceBodyField { + #[doc = "Represents [`TsNamespaceBody::TsModuleBlock`]"] + TsModuleBlock, + #[doc = "Represents [`TsNamespaceBody::TsNamespaceDecl`]"] + TsNamespaceDecl, + } + impl TsNamespaceDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsNamespaceDeclField { + #[doc = "Represents [`TsNamespaceDecl::span`]"] + Span, + #[doc = "Represents [`TsNamespaceDecl::declare`]"] + Declare, + #[doc = "Represents [`TsNamespaceDecl::global`]"] + Global, + #[doc = "Represents [`TsNamespaceDecl::id`]"] + Id, + #[doc = "Represents [`TsNamespaceDecl::body`]"] + Body, + } + impl TsNamespaceExportDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsNamespaceExportDeclField { + #[doc = "Represents [`TsNamespaceExportDecl::span`]"] + Span, + #[doc = "Represents [`TsNamespaceExportDecl::id`]"] + Id, + } + impl TsNonNullExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsNonNullExprField { + #[doc = "Represents [`TsNonNullExpr::span`]"] + Span, + #[doc = "Represents [`TsNonNullExpr::expr`]"] + Expr, + } + impl TsOptionalTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsOptionalTypeField { + #[doc = "Represents [`TsOptionalType::span`]"] + Span, + #[doc = "Represents [`TsOptionalType::type_ann`]"] + TypeAnn, + } + impl TsParamPropField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decorators(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsParamPropField { + #[doc = "Represents [`TsParamProp::span`]"] + Span, + #[doc = "Represents [`TsParamProp::decorators`]"] + Decorators(usize), + #[doc = "Represents [`TsParamProp::accessibility`]"] + Accessibility, + #[doc = "Represents [`TsParamProp::is_override`]"] + IsOverride, + #[doc = "Represents [`TsParamProp::readonly`]"] + Readonly, + #[doc = "Represents [`TsParamProp::param`]"] + Param, + } + impl TsParamPropParamField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsParamPropParamField { + #[doc = "Represents [`TsParamPropParam::Ident`]"] + Ident, + #[doc = "Represents [`TsParamPropParam::Assign`]"] + Assign, + } + impl TsParenthesizedTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsParenthesizedTypeField { + #[doc = "Represents [`TsParenthesizedType::span`]"] + Span, + #[doc = "Represents [`TsParenthesizedType::type_ann`]"] + TypeAnn, + } + impl TsPropertySignatureField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsPropertySignatureField { + #[doc = "Represents [`TsPropertySignature::span`]"] + Span, + #[doc = "Represents [`TsPropertySignature::readonly`]"] + Readonly, + #[doc = "Represents [`TsPropertySignature::key`]"] + Key, + #[doc = "Represents [`TsPropertySignature::computed`]"] + Computed, + #[doc = "Represents [`TsPropertySignature::optional`]"] + Optional, + #[doc = "Represents [`TsPropertySignature::type_ann`]"] + TypeAnn, + } + impl TsQualifiedNameField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsQualifiedNameField { + #[doc = "Represents [`TsQualifiedName::span`]"] + Span, + #[doc = "Represents [`TsQualifiedName::left`]"] + Left, + #[doc = "Represents [`TsQualifiedName::right`]"] + Right, + } + impl TsRestTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsRestTypeField { + #[doc = "Represents [`TsRestType::span`]"] + Span, + #[doc = "Represents [`TsRestType::type_ann`]"] + TypeAnn, + } + impl TsSatisfiesExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsSatisfiesExprField { + #[doc = "Represents [`TsSatisfiesExpr::span`]"] + Span, + #[doc = "Represents [`TsSatisfiesExpr::expr`]"] + Expr, + #[doc = "Represents [`TsSatisfiesExpr::type_ann`]"] + TypeAnn, + } + impl TsSetterSignatureField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsSetterSignatureField { + #[doc = "Represents [`TsSetterSignature::span`]"] + Span, + #[doc = "Represents [`TsSetterSignature::key`]"] + Key, + #[doc = "Represents [`TsSetterSignature::computed`]"] + Computed, + #[doc = "Represents [`TsSetterSignature::param`]"] + Param, + } + impl TsThisTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsThisTypeField { + #[doc = "Represents [`TsThisType::span`]"] + Span, + } + impl TsThisTypeOrIdentField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsThisTypeOrIdentField { + #[doc = "Represents [`TsThisTypeOrIdent::TsThisType`]"] + TsThisType, + #[doc = "Represents [`TsThisTypeOrIdent::Ident`]"] + Ident, + } + impl TsTplLitTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Types(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + Self::Quasis(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTplLitTypeField { + #[doc = "Represents [`TsTplLitType::span`]"] + Span, + #[doc = "Represents [`TsTplLitType::types`]"] + Types(usize), + #[doc = "Represents [`TsTplLitType::quasis`]"] + Quasis(usize), + } + impl TsTupleElementField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTupleElementField { + #[doc = "Represents [`TsTupleElement::span`]"] + Span, + #[doc = "Represents [`TsTupleElement::label`]"] + Label, + #[doc = "Represents [`TsTupleElement::ty`]"] + Ty, + } + impl TsTupleTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::ElemTypes(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTupleTypeField { + #[doc = "Represents [`TsTupleType::span`]"] + Span, + #[doc = "Represents [`TsTupleType::elem_types`]"] + ElemTypes(usize), + } + impl TsTypeField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeField { + #[doc = "Represents [`TsType::TsKeywordType`]"] + TsKeywordType, + #[doc = "Represents [`TsType::TsThisType`]"] + TsThisType, + #[doc = "Represents [`TsType::TsFnOrConstructorType`]"] + TsFnOrConstructorType, + #[doc = "Represents [`TsType::TsTypeRef`]"] + TsTypeRef, + #[doc = "Represents [`TsType::TsTypeQuery`]"] + TsTypeQuery, + #[doc = "Represents [`TsType::TsTypeLit`]"] + TsTypeLit, + #[doc = "Represents [`TsType::TsArrayType`]"] + TsArrayType, + #[doc = "Represents [`TsType::TsTupleType`]"] + TsTupleType, + #[doc = "Represents [`TsType::TsOptionalType`]"] + TsOptionalType, + #[doc = "Represents [`TsType::TsRestType`]"] + TsRestType, + #[doc = "Represents [`TsType::TsUnionOrIntersectionType`]"] + TsUnionOrIntersectionType, + #[doc = "Represents [`TsType::TsConditionalType`]"] + TsConditionalType, + #[doc = "Represents [`TsType::TsInferType`]"] + TsInferType, + #[doc = "Represents [`TsType::TsParenthesizedType`]"] + TsParenthesizedType, + #[doc = "Represents [`TsType::TsTypeOperator`]"] + TsTypeOperator, + #[doc = "Represents [`TsType::TsIndexedAccessType`]"] + TsIndexedAccessType, + #[doc = "Represents [`TsType::TsMappedType`]"] + TsMappedType, + #[doc = "Represents [`TsType::TsLitType`]"] + TsLitType, + #[doc = "Represents [`TsType::TsTypePredicate`]"] + TsTypePredicate, + #[doc = "Represents [`TsType::TsImportType`]"] + TsImportType, + } + impl TsTypeAliasDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeAliasDeclField { + #[doc = "Represents [`TsTypeAliasDecl::span`]"] + Span, + #[doc = "Represents [`TsTypeAliasDecl::declare`]"] + Declare, + #[doc = "Represents [`TsTypeAliasDecl::id`]"] + Id, + #[doc = "Represents [`TsTypeAliasDecl::type_params`]"] + TypeParams, + #[doc = "Represents [`TsTypeAliasDecl::type_ann`]"] + TypeAnn, + } + impl TsTypeAnnField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeAnnField { + #[doc = "Represents [`TsTypeAnn::span`]"] + Span, + #[doc = "Represents [`TsTypeAnn::type_ann`]"] + TypeAnn, + } + impl TsTypeAssertionField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeAssertionField { + #[doc = "Represents [`TsTypeAssertion::span`]"] + Span, + #[doc = "Represents [`TsTypeAssertion::expr`]"] + Expr, + #[doc = "Represents [`TsTypeAssertion::type_ann`]"] + TypeAnn, + } + impl TsTypeElementField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeElementField { + #[doc = "Represents [`TsTypeElement::TsCallSignatureDecl`]"] + TsCallSignatureDecl, + #[doc = "Represents [`TsTypeElement::TsConstructSignatureDecl`]"] + TsConstructSignatureDecl, + #[doc = "Represents [`TsTypeElement::TsPropertySignature`]"] + TsPropertySignature, + #[doc = "Represents [`TsTypeElement::TsGetterSignature`]"] + TsGetterSignature, + #[doc = "Represents [`TsTypeElement::TsSetterSignature`]"] + TsSetterSignature, + #[doc = "Represents [`TsTypeElement::TsMethodSignature`]"] + TsMethodSignature, + #[doc = "Represents [`TsTypeElement::TsIndexSignature`]"] + TsIndexSignature, + } + impl TsTypeLitField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Members(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeLitField { + #[doc = "Represents [`TsTypeLit::span`]"] + Span, + #[doc = "Represents [`TsTypeLit::members`]"] + Members(usize), + } + impl TsTypeOperatorField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeOperatorField { + #[doc = "Represents [`TsTypeOperator::span`]"] + Span, + #[doc = "Represents [`TsTypeOperator::op`]"] + Op, + #[doc = "Represents [`TsTypeOperator::type_ann`]"] + TypeAnn, + } + impl TsTypeOperatorOpField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeOperatorOpField { + #[doc = "Represents [`TsTypeOperatorOp::KeyOf`]"] + KeyOf, + #[doc = "Represents [`TsTypeOperatorOp::Unique`]"] + Unique, + #[doc = "Represents [`TsTypeOperatorOp::ReadOnly`]"] + ReadOnly, + } + impl TsTypeParamField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeParamField { + #[doc = "Represents [`TsTypeParam::span`]"] + Span, + #[doc = "Represents [`TsTypeParam::name`]"] + Name, + #[doc = "Represents [`TsTypeParam::is_in`]"] + IsIn, + #[doc = "Represents [`TsTypeParam::is_out`]"] + IsOut, + #[doc = "Represents [`TsTypeParam::is_const`]"] + IsConst, + #[doc = "Represents [`TsTypeParam::constraint`]"] + Constraint, + #[doc = "Represents [`TsTypeParam::default`]"] + Default, + } + impl TsTypeParamDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeParamDeclField { + #[doc = "Represents [`TsTypeParamDecl::span`]"] + Span, + #[doc = "Represents [`TsTypeParamDecl::params`]"] + Params(usize), + } + impl TsTypeParamInstantiationField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Params(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeParamInstantiationField { + #[doc = "Represents [`TsTypeParamInstantiation::span`]"] + Span, + #[doc = "Represents [`TsTypeParamInstantiation::params`]"] + Params(usize), + } + impl TsTypePredicateField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypePredicateField { + #[doc = "Represents [`TsTypePredicate::span`]"] + Span, + #[doc = "Represents [`TsTypePredicate::asserts`]"] + Asserts, + #[doc = "Represents [`TsTypePredicate::param_name`]"] + ParamName, + #[doc = "Represents [`TsTypePredicate::type_ann`]"] + TypeAnn, + } + impl TsTypeQueryField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeQueryField { + #[doc = "Represents [`TsTypeQuery::span`]"] + Span, + #[doc = "Represents [`TsTypeQuery::expr_name`]"] + ExprName, + #[doc = "Represents [`TsTypeQuery::type_args`]"] + TypeArgs, + } + impl TsTypeQueryExprField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeQueryExprField { + #[doc = "Represents [`TsTypeQueryExpr::TsEntityName`]"] + TsEntityName, + #[doc = "Represents [`TsTypeQueryExpr::Import`]"] + Import, + } + impl TsTypeRefField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsTypeRefField { + #[doc = "Represents [`TsTypeRef::span`]"] + Span, + #[doc = "Represents [`TsTypeRef::type_name`]"] + TypeName, + #[doc = "Represents [`TsTypeRef::type_params`]"] + TypeParams, + } + impl TsUnionOrIntersectionTypeField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsUnionOrIntersectionTypeField { + #[doc = "Represents [`TsUnionOrIntersectionType::TsUnionType`]"] + TsUnionType, + #[doc = "Represents [`TsUnionOrIntersectionType::TsIntersectionType`]"] + TsIntersectionType, + } + impl TsUnionTypeField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Types(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum TsUnionTypeField { + #[doc = "Represents [`TsUnionType::span`]"] + Span, + #[doc = "Represents [`TsUnionType::types`]"] + Types(usize), + } + impl UnaryExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum UnaryExprField { + #[doc = "Represents [`UnaryExpr::span`]"] + Span, + #[doc = "Represents [`UnaryExpr::op`]"] + Op, + #[doc = "Represents [`UnaryExpr::arg`]"] + Arg, + } + impl UpdateExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum UpdateExprField { + #[doc = "Represents [`UpdateExpr::span`]"] + Span, + #[doc = "Represents [`UpdateExpr::op`]"] + Op, + #[doc = "Represents [`UpdateExpr::prefix`]"] + Prefix, + #[doc = "Represents [`UpdateExpr::arg`]"] + Arg, + } + impl UsingDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decls(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum UsingDeclField { + #[doc = "Represents [`UsingDecl::span`]"] + Span, + #[doc = "Represents [`UsingDecl::is_await`]"] + IsAwait, + #[doc = "Represents [`UsingDecl::decls`]"] + Decls(usize), + } + impl VarDeclField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + Self::Decls(idx) => { + assert_initial_index(*idx, index); + *idx = index; + } + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum VarDeclField { + #[doc = "Represents [`VarDecl::span`]"] + Span, + #[doc = "Represents [`VarDecl::ctxt`]"] + Ctxt, + #[doc = "Represents [`VarDecl::kind`]"] + Kind, + #[doc = "Represents [`VarDecl::declare`]"] + Declare, + #[doc = "Represents [`VarDecl::decls`]"] + Decls(usize), + } + impl VarDeclKindField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum VarDeclKindField { + #[doc = "Represents [`VarDeclKind::Var`]"] + Var, + #[doc = "Represents [`VarDeclKind::Let`]"] + Let, + #[doc = "Represents [`VarDeclKind::Const`]"] + Const, + } + impl VarDeclOrExprField { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum VarDeclOrExprField { + #[doc = "Represents [`VarDeclOrExpr::VarDecl`]"] + VarDecl, + #[doc = "Represents [`VarDeclOrExpr::Expr`]"] + Expr, + } + impl VarDeclaratorField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum VarDeclaratorField { + #[doc = "Represents [`VarDeclarator::span`]"] + Span, + #[doc = "Represents [`VarDeclarator::name`]"] + Name, + #[doc = "Represents [`VarDeclarator::init`]"] + Init, + #[doc = "Represents [`VarDeclarator::definite`]"] + Definite, + } + impl WhileStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum WhileStmtField { + #[doc = "Represents [`WhileStmt::span`]"] + Span, + #[doc = "Represents [`WhileStmt::test`]"] + Test, + #[doc = "Represents [`WhileStmt::body`]"] + Body, + } + impl WithStmtField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum WithStmtField { + #[doc = "Represents [`WithStmt::span`]"] + Span, + #[doc = "Represents [`WithStmt::obj`]"] + Obj, + #[doc = "Represents [`WithStmt::body`]"] + Body, + } + impl YieldExprField { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + _ => swc_visit::wrong_ast_path(), + } + } + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum YieldExprField { + #[doc = "Represents [`YieldExpr::span`]"] + Span, + #[doc = "Represents [`YieldExpr::arg`]"] + Arg, + #[doc = "Represents [`YieldExpr::delegate`]"] + Delegate, + } + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AstParentKind { + Accessibility(AccessibilityField), + ArrayLit(ArrayLitField), + ArrayPat(ArrayPatField), + ArrowExpr(ArrowExprField), + AssignExpr(AssignExprField), + AssignPat(AssignPatField), + AssignPatProp(AssignPatPropField), + AssignProp(AssignPropField), + AssignTarget(AssignTargetField), + AssignTargetPat(AssignTargetPatField), + AutoAccessor(AutoAccessorField), + AwaitExpr(AwaitExprField), + BigInt(BigIntField), + BinExpr(BinExprField), + BindingIdent(BindingIdentField), + BlockStmt(BlockStmtField), + BlockStmtOrExpr(BlockStmtOrExprField), + Bool(BoolField), + BreakStmt(BreakStmtField), + CallExpr(CallExprField), + Callee(CalleeField), + CatchClause(CatchClauseField), + Class(ClassField), + ClassDecl(ClassDeclField), + ClassExpr(ClassExprField), + ClassMember(ClassMemberField), + ClassMethod(ClassMethodField), + ClassProp(ClassPropField), + ComputedPropName(ComputedPropNameField), + CondExpr(CondExprField), + Constructor(ConstructorField), + ContinueStmt(ContinueStmtField), + DebuggerStmt(DebuggerStmtField), + Decl(DeclField), + Decorator(DecoratorField), + DefaultDecl(DefaultDeclField), + DoWhileStmt(DoWhileStmtField), + EmptyStmt(EmptyStmtField), + ExportAll(ExportAllField), + ExportDecl(ExportDeclField), + ExportDefaultDecl(ExportDefaultDeclField), + ExportDefaultExpr(ExportDefaultExprField), + ExportDefaultSpecifier(ExportDefaultSpecifierField), + ExportNamedSpecifier(ExportNamedSpecifierField), + ExportNamespaceSpecifier(ExportNamespaceSpecifierField), + ExportSpecifier(ExportSpecifierField), + Expr(ExprField), + ExprOrSpread(ExprOrSpreadField), + ExprStmt(ExprStmtField), + FnDecl(FnDeclField), + FnExpr(FnExprField), + ForHead(ForHeadField), + ForInStmt(ForInStmtField), + ForOfStmt(ForOfStmtField), + ForStmt(ForStmtField), + Function(FunctionField), + GetterProp(GetterPropField), + Ident(IdentField), + IdentName(IdentNameField), + IfStmt(IfStmtField), + Import(ImportField), + ImportDecl(ImportDeclField), + ImportDefaultSpecifier(ImportDefaultSpecifierField), + ImportNamedSpecifier(ImportNamedSpecifierField), + ImportPhase(ImportPhaseField), + ImportSpecifier(ImportSpecifierField), + ImportStarAsSpecifier(ImportStarAsSpecifierField), + ImportWith(ImportWithField), + ImportWithItem(ImportWithItemField), + Invalid(InvalidField), + JSXAttr(JSXAttrField), + JSXAttrName(JSXAttrNameField), + JSXAttrOrSpread(JSXAttrOrSpreadField), + JSXAttrValue(JSXAttrValueField), + JSXClosingElement(JSXClosingElementField), + JSXClosingFragment(JSXClosingFragmentField), + JSXElement(JSXElementField), + JSXElementChild(JSXElementChildField), + JSXElementName(JSXElementNameField), + JSXEmptyExpr(JSXEmptyExprField), + JSXExpr(JSXExprField), + JSXExprContainer(JSXExprContainerField), + JSXFragment(JSXFragmentField), + JSXMemberExpr(JSXMemberExprField), + JSXNamespacedName(JSXNamespacedNameField), + JSXObject(JSXObjectField), + JSXOpeningElement(JSXOpeningElementField), + JSXOpeningFragment(JSXOpeningFragmentField), + JSXSpreadChild(JSXSpreadChildField), + JSXText(JSXTextField), + Key(KeyField), + KeyValuePatProp(KeyValuePatPropField), + KeyValueProp(KeyValuePropField), + LabeledStmt(LabeledStmtField), + Lit(LitField), + MemberExpr(MemberExprField), + MemberProp(MemberPropField), + MetaPropExpr(MetaPropExprField), + MetaPropKind(MetaPropKindField), + MethodKind(MethodKindField), + MethodProp(MethodPropField), + Module(ModuleField), + ModuleDecl(ModuleDeclField), + ModuleExportName(ModuleExportNameField), + ModuleItem(ModuleItemField), + NamedExport(NamedExportField), + NewExpr(NewExprField), + Null(NullField), + Number(NumberField), + ObjectLit(ObjectLitField), + ObjectPat(ObjectPatField), + ObjectPatProp(ObjectPatPropField), + OptCall(OptCallField), + OptChainBase(OptChainBaseField), + OptChainExpr(OptChainExprField), + Param(ParamField), + ParamOrTsParamProp(ParamOrTsParamPropField), + ParenExpr(ParenExprField), + Pat(PatField), + PrivateMethod(PrivateMethodField), + PrivateName(PrivateNameField), + PrivateProp(PrivatePropField), + Program(ProgramField), + Prop(PropField), + PropName(PropNameField), + PropOrSpread(PropOrSpreadField), + Regex(RegexField), + RestPat(RestPatField), + ReturnStmt(ReturnStmtField), + Script(ScriptField), + SeqExpr(SeqExprField), + SetterProp(SetterPropField), + SimpleAssignTarget(SimpleAssignTargetField), + SpreadElement(SpreadElementField), + StaticBlock(StaticBlockField), + Stmt(StmtField), + Str(StrField), + Super(SuperField), + SuperProp(SuperPropField), + SuperPropExpr(SuperPropExprField), + SwitchCase(SwitchCaseField), + SwitchStmt(SwitchStmtField), + TaggedTpl(TaggedTplField), + ThisExpr(ThisExprField), + ThrowStmt(ThrowStmtField), + Tpl(TplField), + TplElement(TplElementField), + TruePlusMinus(TruePlusMinusField), + TryStmt(TryStmtField), + TsArrayType(TsArrayTypeField), + TsAsExpr(TsAsExprField), + TsCallSignatureDecl(TsCallSignatureDeclField), + TsConditionalType(TsConditionalTypeField), + TsConstAssertion(TsConstAssertionField), + TsConstructSignatureDecl(TsConstructSignatureDeclField), + TsConstructorType(TsConstructorTypeField), + TsEntityName(TsEntityNameField), + TsEnumDecl(TsEnumDeclField), + TsEnumMember(TsEnumMemberField), + TsEnumMemberId(TsEnumMemberIdField), + TsExportAssignment(TsExportAssignmentField), + TsExprWithTypeArgs(TsExprWithTypeArgsField), + TsExternalModuleRef(TsExternalModuleRefField), + TsFnOrConstructorType(TsFnOrConstructorTypeField), + TsFnParam(TsFnParamField), + TsFnType(TsFnTypeField), + TsGetterSignature(TsGetterSignatureField), + TsImportEqualsDecl(TsImportEqualsDeclField), + TsImportType(TsImportTypeField), + TsIndexSignature(TsIndexSignatureField), + TsIndexedAccessType(TsIndexedAccessTypeField), + TsInferType(TsInferTypeField), + TsInstantiation(TsInstantiationField), + TsInterfaceBody(TsInterfaceBodyField), + TsInterfaceDecl(TsInterfaceDeclField), + TsIntersectionType(TsIntersectionTypeField), + TsKeywordType(TsKeywordTypeField), + TsKeywordTypeKind(TsKeywordTypeKindField), + TsLit(TsLitField), + TsLitType(TsLitTypeField), + TsMappedType(TsMappedTypeField), + TsMethodSignature(TsMethodSignatureField), + TsModuleBlock(TsModuleBlockField), + TsModuleDecl(TsModuleDeclField), + TsModuleName(TsModuleNameField), + TsModuleRef(TsModuleRefField), + TsNamespaceBody(TsNamespaceBodyField), + TsNamespaceDecl(TsNamespaceDeclField), + TsNamespaceExportDecl(TsNamespaceExportDeclField), + TsNonNullExpr(TsNonNullExprField), + TsOptionalType(TsOptionalTypeField), + TsParamProp(TsParamPropField), + TsParamPropParam(TsParamPropParamField), + TsParenthesizedType(TsParenthesizedTypeField), + TsPropertySignature(TsPropertySignatureField), + TsQualifiedName(TsQualifiedNameField), + TsRestType(TsRestTypeField), + TsSatisfiesExpr(TsSatisfiesExprField), + TsSetterSignature(TsSetterSignatureField), + TsThisType(TsThisTypeField), + TsThisTypeOrIdent(TsThisTypeOrIdentField), + TsTplLitType(TsTplLitTypeField), + TsTupleElement(TsTupleElementField), + TsTupleType(TsTupleTypeField), + TsType(TsTypeField), + TsTypeAliasDecl(TsTypeAliasDeclField), + TsTypeAnn(TsTypeAnnField), + TsTypeAssertion(TsTypeAssertionField), + TsTypeElement(TsTypeElementField), + TsTypeLit(TsTypeLitField), + TsTypeOperator(TsTypeOperatorField), + TsTypeOperatorOp(TsTypeOperatorOpField), + TsTypeParam(TsTypeParamField), + TsTypeParamDecl(TsTypeParamDeclField), + TsTypeParamInstantiation(TsTypeParamInstantiationField), + TsTypePredicate(TsTypePredicateField), + TsTypeQuery(TsTypeQueryField), + TsTypeQueryExpr(TsTypeQueryExprField), + TsTypeRef(TsTypeRefField), + TsUnionOrIntersectionType(TsUnionOrIntersectionTypeField), + TsUnionType(TsUnionTypeField), + UnaryExpr(UnaryExprField), + UpdateExpr(UpdateExprField), + UsingDecl(UsingDeclField), + VarDecl(VarDeclField), + VarDeclKind(VarDeclKindField), + VarDeclOrExpr(VarDeclOrExprField), + VarDeclarator(VarDeclaratorField), + WhileStmt(WhileStmtField), + WithStmt(WithStmtField), + YieldExpr(YieldExprField), + } + impl ::swc_visit::ParentKind for AstParentKind { + #[inline] + fn set_index(&mut self, index: usize) { + match self { + Self::Accessibility(v) => v.set_index(index), + Self::ArrayLit(v) => v.set_index(index), + Self::ArrayPat(v) => v.set_index(index), + Self::ArrowExpr(v) => v.set_index(index), + Self::AssignExpr(v) => v.set_index(index), + Self::AssignPat(v) => v.set_index(index), + Self::AssignPatProp(v) => v.set_index(index), + Self::AssignProp(v) => v.set_index(index), + Self::AssignTarget(v) => v.set_index(index), + Self::AssignTargetPat(v) => v.set_index(index), + Self::AutoAccessor(v) => v.set_index(index), + Self::AwaitExpr(v) => v.set_index(index), + Self::BigInt(v) => v.set_index(index), + Self::BinExpr(v) => v.set_index(index), + Self::BindingIdent(v) => v.set_index(index), + Self::BlockStmt(v) => v.set_index(index), + Self::BlockStmtOrExpr(v) => v.set_index(index), + Self::Bool(v) => v.set_index(index), + Self::BreakStmt(v) => v.set_index(index), + Self::CallExpr(v) => v.set_index(index), + Self::Callee(v) => v.set_index(index), + Self::CatchClause(v) => v.set_index(index), + Self::Class(v) => v.set_index(index), + Self::ClassDecl(v) => v.set_index(index), + Self::ClassExpr(v) => v.set_index(index), + Self::ClassMember(v) => v.set_index(index), + Self::ClassMethod(v) => v.set_index(index), + Self::ClassProp(v) => v.set_index(index), + Self::ComputedPropName(v) => v.set_index(index), + Self::CondExpr(v) => v.set_index(index), + Self::Constructor(v) => v.set_index(index), + Self::ContinueStmt(v) => v.set_index(index), + Self::DebuggerStmt(v) => v.set_index(index), + Self::Decl(v) => v.set_index(index), + Self::Decorator(v) => v.set_index(index), + Self::DefaultDecl(v) => v.set_index(index), + Self::DoWhileStmt(v) => v.set_index(index), + Self::EmptyStmt(v) => v.set_index(index), + Self::ExportAll(v) => v.set_index(index), + Self::ExportDecl(v) => v.set_index(index), + Self::ExportDefaultDecl(v) => v.set_index(index), + Self::ExportDefaultExpr(v) => v.set_index(index), + Self::ExportDefaultSpecifier(v) => v.set_index(index), + Self::ExportNamedSpecifier(v) => v.set_index(index), + Self::ExportNamespaceSpecifier(v) => v.set_index(index), + Self::ExportSpecifier(v) => v.set_index(index), + Self::Expr(v) => v.set_index(index), + Self::ExprOrSpread(v) => v.set_index(index), + Self::ExprStmt(v) => v.set_index(index), + Self::FnDecl(v) => v.set_index(index), + Self::FnExpr(v) => v.set_index(index), + Self::ForHead(v) => v.set_index(index), + Self::ForInStmt(v) => v.set_index(index), + Self::ForOfStmt(v) => v.set_index(index), + Self::ForStmt(v) => v.set_index(index), + Self::Function(v) => v.set_index(index), + Self::GetterProp(v) => v.set_index(index), + Self::Ident(v) => v.set_index(index), + Self::IdentName(v) => v.set_index(index), + Self::IfStmt(v) => v.set_index(index), + Self::Import(v) => v.set_index(index), + Self::ImportDecl(v) => v.set_index(index), + Self::ImportDefaultSpecifier(v) => v.set_index(index), + Self::ImportNamedSpecifier(v) => v.set_index(index), + Self::ImportPhase(v) => v.set_index(index), + Self::ImportSpecifier(v) => v.set_index(index), + Self::ImportStarAsSpecifier(v) => v.set_index(index), + Self::ImportWith(v) => v.set_index(index), + Self::ImportWithItem(v) => v.set_index(index), + Self::Invalid(v) => v.set_index(index), + Self::JSXAttr(v) => v.set_index(index), + Self::JSXAttrName(v) => v.set_index(index), + Self::JSXAttrOrSpread(v) => v.set_index(index), + Self::JSXAttrValue(v) => v.set_index(index), + Self::JSXClosingElement(v) => v.set_index(index), + Self::JSXClosingFragment(v) => v.set_index(index), + Self::JSXElement(v) => v.set_index(index), + Self::JSXElementChild(v) => v.set_index(index), + Self::JSXElementName(v) => v.set_index(index), + Self::JSXEmptyExpr(v) => v.set_index(index), + Self::JSXExpr(v) => v.set_index(index), + Self::JSXExprContainer(v) => v.set_index(index), + Self::JSXFragment(v) => v.set_index(index), + Self::JSXMemberExpr(v) => v.set_index(index), + Self::JSXNamespacedName(v) => v.set_index(index), + Self::JSXObject(v) => v.set_index(index), + Self::JSXOpeningElement(v) => v.set_index(index), + Self::JSXOpeningFragment(v) => v.set_index(index), + Self::JSXSpreadChild(v) => v.set_index(index), + Self::JSXText(v) => v.set_index(index), + Self::Key(v) => v.set_index(index), + Self::KeyValuePatProp(v) => v.set_index(index), + Self::KeyValueProp(v) => v.set_index(index), + Self::LabeledStmt(v) => v.set_index(index), + Self::Lit(v) => v.set_index(index), + Self::MemberExpr(v) => v.set_index(index), + Self::MemberProp(v) => v.set_index(index), + Self::MetaPropExpr(v) => v.set_index(index), + Self::MetaPropKind(v) => v.set_index(index), + Self::MethodKind(v) => v.set_index(index), + Self::MethodProp(v) => v.set_index(index), + Self::Module(v) => v.set_index(index), + Self::ModuleDecl(v) => v.set_index(index), + Self::ModuleExportName(v) => v.set_index(index), + Self::ModuleItem(v) => v.set_index(index), + Self::NamedExport(v) => v.set_index(index), + Self::NewExpr(v) => v.set_index(index), + Self::Null(v) => v.set_index(index), + Self::Number(v) => v.set_index(index), + Self::ObjectLit(v) => v.set_index(index), + Self::ObjectPat(v) => v.set_index(index), + Self::ObjectPatProp(v) => v.set_index(index), + Self::OptCall(v) => v.set_index(index), + Self::OptChainBase(v) => v.set_index(index), + Self::OptChainExpr(v) => v.set_index(index), + Self::Param(v) => v.set_index(index), + Self::ParamOrTsParamProp(v) => v.set_index(index), + Self::ParenExpr(v) => v.set_index(index), + Self::Pat(v) => v.set_index(index), + Self::PrivateMethod(v) => v.set_index(index), + Self::PrivateName(v) => v.set_index(index), + Self::PrivateProp(v) => v.set_index(index), + Self::Program(v) => v.set_index(index), + Self::Prop(v) => v.set_index(index), + Self::PropName(v) => v.set_index(index), + Self::PropOrSpread(v) => v.set_index(index), + Self::Regex(v) => v.set_index(index), + Self::RestPat(v) => v.set_index(index), + Self::ReturnStmt(v) => v.set_index(index), + Self::Script(v) => v.set_index(index), + Self::SeqExpr(v) => v.set_index(index), + Self::SetterProp(v) => v.set_index(index), + Self::SimpleAssignTarget(v) => v.set_index(index), + Self::SpreadElement(v) => v.set_index(index), + Self::StaticBlock(v) => v.set_index(index), + Self::Stmt(v) => v.set_index(index), + Self::Str(v) => v.set_index(index), + Self::Super(v) => v.set_index(index), + Self::SuperProp(v) => v.set_index(index), + Self::SuperPropExpr(v) => v.set_index(index), + Self::SwitchCase(v) => v.set_index(index), + Self::SwitchStmt(v) => v.set_index(index), + Self::TaggedTpl(v) => v.set_index(index), + Self::ThisExpr(v) => v.set_index(index), + Self::ThrowStmt(v) => v.set_index(index), + Self::Tpl(v) => v.set_index(index), + Self::TplElement(v) => v.set_index(index), + Self::TruePlusMinus(v) => v.set_index(index), + Self::TryStmt(v) => v.set_index(index), + Self::TsArrayType(v) => v.set_index(index), + Self::TsAsExpr(v) => v.set_index(index), + Self::TsCallSignatureDecl(v) => v.set_index(index), + Self::TsConditionalType(v) => v.set_index(index), + Self::TsConstAssertion(v) => v.set_index(index), + Self::TsConstructSignatureDecl(v) => v.set_index(index), + Self::TsConstructorType(v) => v.set_index(index), + Self::TsEntityName(v) => v.set_index(index), + Self::TsEnumDecl(v) => v.set_index(index), + Self::TsEnumMember(v) => v.set_index(index), + Self::TsEnumMemberId(v) => v.set_index(index), + Self::TsExportAssignment(v) => v.set_index(index), + Self::TsExprWithTypeArgs(v) => v.set_index(index), + Self::TsExternalModuleRef(v) => v.set_index(index), + Self::TsFnOrConstructorType(v) => v.set_index(index), + Self::TsFnParam(v) => v.set_index(index), + Self::TsFnType(v) => v.set_index(index), + Self::TsGetterSignature(v) => v.set_index(index), + Self::TsImportEqualsDecl(v) => v.set_index(index), + Self::TsImportType(v) => v.set_index(index), + Self::TsIndexSignature(v) => v.set_index(index), + Self::TsIndexedAccessType(v) => v.set_index(index), + Self::TsInferType(v) => v.set_index(index), + Self::TsInstantiation(v) => v.set_index(index), + Self::TsInterfaceBody(v) => v.set_index(index), + Self::TsInterfaceDecl(v) => v.set_index(index), + Self::TsIntersectionType(v) => v.set_index(index), + Self::TsKeywordType(v) => v.set_index(index), + Self::TsKeywordTypeKind(v) => v.set_index(index), + Self::TsLit(v) => v.set_index(index), + Self::TsLitType(v) => v.set_index(index), + Self::TsMappedType(v) => v.set_index(index), + Self::TsMethodSignature(v) => v.set_index(index), + Self::TsModuleBlock(v) => v.set_index(index), + Self::TsModuleDecl(v) => v.set_index(index), + Self::TsModuleName(v) => v.set_index(index), + Self::TsModuleRef(v) => v.set_index(index), + Self::TsNamespaceBody(v) => v.set_index(index), + Self::TsNamespaceDecl(v) => v.set_index(index), + Self::TsNamespaceExportDecl(v) => v.set_index(index), + Self::TsNonNullExpr(v) => v.set_index(index), + Self::TsOptionalType(v) => v.set_index(index), + Self::TsParamProp(v) => v.set_index(index), + Self::TsParamPropParam(v) => v.set_index(index), + Self::TsParenthesizedType(v) => v.set_index(index), + Self::TsPropertySignature(v) => v.set_index(index), + Self::TsQualifiedName(v) => v.set_index(index), + Self::TsRestType(v) => v.set_index(index), + Self::TsSatisfiesExpr(v) => v.set_index(index), + Self::TsSetterSignature(v) => v.set_index(index), + Self::TsThisType(v) => v.set_index(index), + Self::TsThisTypeOrIdent(v) => v.set_index(index), + Self::TsTplLitType(v) => v.set_index(index), + Self::TsTupleElement(v) => v.set_index(index), + Self::TsTupleType(v) => v.set_index(index), + Self::TsType(v) => v.set_index(index), + Self::TsTypeAliasDecl(v) => v.set_index(index), + Self::TsTypeAnn(v) => v.set_index(index), + Self::TsTypeAssertion(v) => v.set_index(index), + Self::TsTypeElement(v) => v.set_index(index), + Self::TsTypeLit(v) => v.set_index(index), + Self::TsTypeOperator(v) => v.set_index(index), + Self::TsTypeOperatorOp(v) => v.set_index(index), + Self::TsTypeParam(v) => v.set_index(index), + Self::TsTypeParamDecl(v) => v.set_index(index), + Self::TsTypeParamInstantiation(v) => v.set_index(index), + Self::TsTypePredicate(v) => v.set_index(index), + Self::TsTypeQuery(v) => v.set_index(index), + Self::TsTypeQueryExpr(v) => v.set_index(index), + Self::TsTypeRef(v) => v.set_index(index), + Self::TsUnionOrIntersectionType(v) => v.set_index(index), + Self::TsUnionType(v) => v.set_index(index), + Self::UnaryExpr(v) => v.set_index(index), + Self::UpdateExpr(v) => v.set_index(index), + Self::UsingDecl(v) => v.set_index(index), + Self::VarDecl(v) => v.set_index(index), + Self::VarDeclKind(v) => v.set_index(index), + Self::VarDeclOrExpr(v) => v.set_index(index), + Self::VarDeclarator(v) => v.set_index(index), + Self::WhileStmt(v) => v.set_index(index), + Self::WithStmt(v) => v.set_index(index), + Self::YieldExpr(v) => v.set_index(index), + } + } + } + #[derive(Debug, Clone, Copy)] + pub enum AstParentNodeRef<'ast> { + Accessibility(&'ast Accessibility, AccessibilityField), + ArrayLit(&'ast ArrayLit<'ast>, ArrayLitField), + ArrayPat(&'ast ArrayPat<'ast>, ArrayPatField), + ArrowExpr(&'ast ArrowExpr<'ast>, ArrowExprField), + AssignExpr(&'ast AssignExpr<'ast>, AssignExprField), + AssignPat(&'ast AssignPat<'ast>, AssignPatField), + AssignPatProp(&'ast AssignPatProp<'ast>, AssignPatPropField), + AssignProp(&'ast AssignProp<'ast>, AssignPropField), + AssignTarget(&'ast AssignTarget<'ast>, AssignTargetField), + AssignTargetPat(&'ast AssignTargetPat<'ast>, AssignTargetPatField), + AutoAccessor(&'ast AutoAccessor<'ast>, AutoAccessorField), + AwaitExpr(&'ast AwaitExpr<'ast>, AwaitExprField), + BigInt(&'ast BigInt<'ast>, BigIntField), + BinExpr(&'ast BinExpr<'ast>, BinExprField), + BindingIdent(&'ast BindingIdent<'ast>, BindingIdentField), + BlockStmt(&'ast BlockStmt<'ast>, BlockStmtField), + BlockStmtOrExpr(&'ast BlockStmtOrExpr<'ast>, BlockStmtOrExprField), + Bool(&'ast Bool, BoolField), + BreakStmt(&'ast BreakStmt, BreakStmtField), + CallExpr(&'ast CallExpr<'ast>, CallExprField), + Callee(&'ast Callee<'ast>, CalleeField), + CatchClause(&'ast CatchClause<'ast>, CatchClauseField), + Class(&'ast Class<'ast>, ClassField), + ClassDecl(&'ast ClassDecl<'ast>, ClassDeclField), + ClassExpr(&'ast ClassExpr<'ast>, ClassExprField), + ClassMember(&'ast ClassMember<'ast>, ClassMemberField), + ClassMethod(&'ast ClassMethod<'ast>, ClassMethodField), + ClassProp(&'ast ClassProp<'ast>, ClassPropField), + ComputedPropName(&'ast ComputedPropName<'ast>, ComputedPropNameField), + CondExpr(&'ast CondExpr<'ast>, CondExprField), + Constructor(&'ast Constructor<'ast>, ConstructorField), + ContinueStmt(&'ast ContinueStmt, ContinueStmtField), + DebuggerStmt(&'ast DebuggerStmt, DebuggerStmtField), + Decl(&'ast Decl<'ast>, DeclField), + Decorator(&'ast Decorator<'ast>, DecoratorField), + DefaultDecl(&'ast DefaultDecl<'ast>, DefaultDeclField), + DoWhileStmt(&'ast DoWhileStmt<'ast>, DoWhileStmtField), + EmptyStmt(&'ast EmptyStmt, EmptyStmtField), + ExportAll(&'ast ExportAll<'ast>, ExportAllField), + ExportDecl(&'ast ExportDecl<'ast>, ExportDeclField), + ExportDefaultDecl(&'ast ExportDefaultDecl<'ast>, ExportDefaultDeclField), + ExportDefaultExpr(&'ast ExportDefaultExpr<'ast>, ExportDefaultExprField), + ExportDefaultSpecifier(&'ast ExportDefaultSpecifier, ExportDefaultSpecifierField), + ExportNamedSpecifier(&'ast ExportNamedSpecifier<'ast>, ExportNamedSpecifierField), + ExportNamespaceSpecifier( + &'ast ExportNamespaceSpecifier<'ast>, + ExportNamespaceSpecifierField, + ), + ExportSpecifier(&'ast ExportSpecifier<'ast>, ExportSpecifierField), + Expr(&'ast Expr<'ast>, ExprField), + ExprOrSpread(&'ast ExprOrSpread<'ast>, ExprOrSpreadField), + ExprStmt(&'ast ExprStmt<'ast>, ExprStmtField), + FnDecl(&'ast FnDecl<'ast>, FnDeclField), + FnExpr(&'ast FnExpr<'ast>, FnExprField), + ForHead(&'ast ForHead<'ast>, ForHeadField), + ForInStmt(&'ast ForInStmt<'ast>, ForInStmtField), + ForOfStmt(&'ast ForOfStmt<'ast>, ForOfStmtField), + ForStmt(&'ast ForStmt<'ast>, ForStmtField), + Function(&'ast Function<'ast>, FunctionField), + GetterProp(&'ast GetterProp<'ast>, GetterPropField), + Ident(&'ast Ident, IdentField), + IdentName(&'ast IdentName, IdentNameField), + IfStmt(&'ast IfStmt<'ast>, IfStmtField), + Import(&'ast Import, ImportField), + ImportDecl(&'ast ImportDecl<'ast>, ImportDeclField), + ImportDefaultSpecifier(&'ast ImportDefaultSpecifier, ImportDefaultSpecifierField), + ImportNamedSpecifier(&'ast ImportNamedSpecifier<'ast>, ImportNamedSpecifierField), + ImportPhase(&'ast ImportPhase, ImportPhaseField), + ImportSpecifier(&'ast ImportSpecifier<'ast>, ImportSpecifierField), + ImportStarAsSpecifier(&'ast ImportStarAsSpecifier, ImportStarAsSpecifierField), + ImportWith(&'ast ImportWith<'ast>, ImportWithField), + ImportWithItem(&'ast ImportWithItem, ImportWithItemField), + Invalid(&'ast Invalid, InvalidField), + JSXAttr(&'ast JSXAttr<'ast>, JSXAttrField), + JSXAttrName(&'ast JSXAttrName<'ast>, JSXAttrNameField), + JSXAttrOrSpread(&'ast JSXAttrOrSpread<'ast>, JSXAttrOrSpreadField), + JSXAttrValue(&'ast JSXAttrValue<'ast>, JSXAttrValueField), + JSXClosingElement(&'ast JSXClosingElement<'ast>, JSXClosingElementField), + JSXClosingFragment(&'ast JSXClosingFragment, JSXClosingFragmentField), + JSXElement(&'ast JSXElement<'ast>, JSXElementField), + JSXElementChild(&'ast JSXElementChild<'ast>, JSXElementChildField), + JSXElementName(&'ast JSXElementName<'ast>, JSXElementNameField), + JSXEmptyExpr(&'ast JSXEmptyExpr, JSXEmptyExprField), + JSXExpr(&'ast JSXExpr<'ast>, JSXExprField), + JSXExprContainer(&'ast JSXExprContainer<'ast>, JSXExprContainerField), + JSXFragment(&'ast JSXFragment<'ast>, JSXFragmentField), + JSXMemberExpr(&'ast JSXMemberExpr<'ast>, JSXMemberExprField), + JSXNamespacedName(&'ast JSXNamespacedName, JSXNamespacedNameField), + JSXObject(&'ast JSXObject<'ast>, JSXObjectField), + JSXOpeningElement(&'ast JSXOpeningElement<'ast>, JSXOpeningElementField), + JSXOpeningFragment(&'ast JSXOpeningFragment, JSXOpeningFragmentField), + JSXSpreadChild(&'ast JSXSpreadChild<'ast>, JSXSpreadChildField), + JSXText(&'ast JSXText, JSXTextField), + Key(&'ast Key<'ast>, KeyField), + KeyValuePatProp(&'ast KeyValuePatProp<'ast>, KeyValuePatPropField), + KeyValueProp(&'ast KeyValueProp<'ast>, KeyValuePropField), + LabeledStmt(&'ast LabeledStmt<'ast>, LabeledStmtField), + Lit(&'ast Lit<'ast>, LitField), + MemberExpr(&'ast MemberExpr<'ast>, MemberExprField), + MemberProp(&'ast MemberProp<'ast>, MemberPropField), + MetaPropExpr(&'ast MetaPropExpr, MetaPropExprField), + MetaPropKind(&'ast MetaPropKind, MetaPropKindField), + MethodKind(&'ast MethodKind, MethodKindField), + MethodProp(&'ast MethodProp<'ast>, MethodPropField), + Module(&'ast Module<'ast>, ModuleField), + ModuleDecl(&'ast ModuleDecl<'ast>, ModuleDeclField), + ModuleExportName(&'ast ModuleExportName<'ast>, ModuleExportNameField), + ModuleItem(&'ast ModuleItem<'ast>, ModuleItemField), + NamedExport(&'ast NamedExport<'ast>, NamedExportField), + NewExpr(&'ast NewExpr<'ast>, NewExprField), + Null(&'ast Null, NullField), + Number(&'ast Number, NumberField), + ObjectLit(&'ast ObjectLit<'ast>, ObjectLitField), + ObjectPat(&'ast ObjectPat<'ast>, ObjectPatField), + ObjectPatProp(&'ast ObjectPatProp<'ast>, ObjectPatPropField), + OptCall(&'ast OptCall<'ast>, OptCallField), + OptChainBase(&'ast OptChainBase<'ast>, OptChainBaseField), + OptChainExpr(&'ast OptChainExpr<'ast>, OptChainExprField), + Param(&'ast Param<'ast>, ParamField), + ParamOrTsParamProp(&'ast ParamOrTsParamProp<'ast>, ParamOrTsParamPropField), + ParenExpr(&'ast ParenExpr<'ast>, ParenExprField), + Pat(&'ast Pat<'ast>, PatField), + PrivateMethod(&'ast PrivateMethod<'ast>, PrivateMethodField), + PrivateName(&'ast PrivateName, PrivateNameField), + PrivateProp(&'ast PrivateProp<'ast>, PrivatePropField), + Program(&'ast Program<'ast>, ProgramField), + Prop(&'ast Prop<'ast>, PropField), + PropName(&'ast PropName<'ast>, PropNameField), + PropOrSpread(&'ast PropOrSpread<'ast>, PropOrSpreadField), + Regex(&'ast Regex, RegexField), + RestPat(&'ast RestPat<'ast>, RestPatField), + ReturnStmt(&'ast ReturnStmt<'ast>, ReturnStmtField), + Script(&'ast Script<'ast>, ScriptField), + SeqExpr(&'ast SeqExpr<'ast>, SeqExprField), + SetterProp(&'ast SetterProp<'ast>, SetterPropField), + SimpleAssignTarget(&'ast SimpleAssignTarget<'ast>, SimpleAssignTargetField), + SpreadElement(&'ast SpreadElement<'ast>, SpreadElementField), + StaticBlock(&'ast StaticBlock<'ast>, StaticBlockField), + Stmt(&'ast Stmt<'ast>, StmtField), + Str(&'ast Str, StrField), + Super(&'ast Super, SuperField), + SuperProp(&'ast SuperProp<'ast>, SuperPropField), + SuperPropExpr(&'ast SuperPropExpr<'ast>, SuperPropExprField), + SwitchCase(&'ast SwitchCase<'ast>, SwitchCaseField), + SwitchStmt(&'ast SwitchStmt<'ast>, SwitchStmtField), + TaggedTpl(&'ast TaggedTpl<'ast>, TaggedTplField), + ThisExpr(&'ast ThisExpr, ThisExprField), + ThrowStmt(&'ast ThrowStmt<'ast>, ThrowStmtField), + Tpl(&'ast Tpl<'ast>, TplField), + TplElement(&'ast TplElement, TplElementField), + TruePlusMinus(&'ast TruePlusMinus, TruePlusMinusField), + TryStmt(&'ast TryStmt<'ast>, TryStmtField), + TsArrayType(&'ast TsArrayType<'ast>, TsArrayTypeField), + TsAsExpr(&'ast TsAsExpr<'ast>, TsAsExprField), + TsCallSignatureDecl(&'ast TsCallSignatureDecl<'ast>, TsCallSignatureDeclField), + TsConditionalType(&'ast TsConditionalType<'ast>, TsConditionalTypeField), + TsConstAssertion(&'ast TsConstAssertion<'ast>, TsConstAssertionField), + TsConstructSignatureDecl( + &'ast TsConstructSignatureDecl<'ast>, + TsConstructSignatureDeclField, + ), + TsConstructorType(&'ast TsConstructorType<'ast>, TsConstructorTypeField), + TsEntityName(&'ast TsEntityName<'ast>, TsEntityNameField), + TsEnumDecl(&'ast TsEnumDecl<'ast>, TsEnumDeclField), + TsEnumMember(&'ast TsEnumMember<'ast>, TsEnumMemberField), + TsEnumMemberId(&'ast TsEnumMemberId<'ast>, TsEnumMemberIdField), + TsExportAssignment(&'ast TsExportAssignment<'ast>, TsExportAssignmentField), + TsExprWithTypeArgs(&'ast TsExprWithTypeArgs<'ast>, TsExprWithTypeArgsField), + TsExternalModuleRef(&'ast TsExternalModuleRef, TsExternalModuleRefField), + TsFnOrConstructorType( + &'ast TsFnOrConstructorType<'ast>, + TsFnOrConstructorTypeField, + ), + TsFnParam(&'ast TsFnParam<'ast>, TsFnParamField), + TsFnType(&'ast TsFnType<'ast>, TsFnTypeField), + TsGetterSignature(&'ast TsGetterSignature<'ast>, TsGetterSignatureField), + TsImportEqualsDecl(&'ast TsImportEqualsDecl<'ast>, TsImportEqualsDeclField), + TsImportType(&'ast TsImportType<'ast>, TsImportTypeField), + TsIndexSignature(&'ast TsIndexSignature<'ast>, TsIndexSignatureField), + TsIndexedAccessType(&'ast TsIndexedAccessType<'ast>, TsIndexedAccessTypeField), + TsInferType(&'ast TsInferType<'ast>, TsInferTypeField), + TsInstantiation(&'ast TsInstantiation<'ast>, TsInstantiationField), + TsInterfaceBody(&'ast TsInterfaceBody<'ast>, TsInterfaceBodyField), + TsInterfaceDecl(&'ast TsInterfaceDecl<'ast>, TsInterfaceDeclField), + TsIntersectionType(&'ast TsIntersectionType<'ast>, TsIntersectionTypeField), + TsKeywordType(&'ast TsKeywordType, TsKeywordTypeField), + TsKeywordTypeKind(&'ast TsKeywordTypeKind, TsKeywordTypeKindField), + TsLit(&'ast TsLit<'ast>, TsLitField), + TsLitType(&'ast TsLitType<'ast>, TsLitTypeField), + TsMappedType(&'ast TsMappedType<'ast>, TsMappedTypeField), + TsMethodSignature(&'ast TsMethodSignature<'ast>, TsMethodSignatureField), + TsModuleBlock(&'ast TsModuleBlock<'ast>, TsModuleBlockField), + TsModuleDecl(&'ast TsModuleDecl<'ast>, TsModuleDeclField), + TsModuleName(&'ast TsModuleName<'ast>, TsModuleNameField), + TsModuleRef(&'ast TsModuleRef<'ast>, TsModuleRefField), + TsNamespaceBody(&'ast TsNamespaceBody<'ast>, TsNamespaceBodyField), + TsNamespaceDecl(&'ast TsNamespaceDecl<'ast>, TsNamespaceDeclField), + TsNamespaceExportDecl(&'ast TsNamespaceExportDecl, TsNamespaceExportDeclField), + TsNonNullExpr(&'ast TsNonNullExpr<'ast>, TsNonNullExprField), + TsOptionalType(&'ast TsOptionalType<'ast>, TsOptionalTypeField), + TsParamProp(&'ast TsParamProp<'ast>, TsParamPropField), + TsParamPropParam(&'ast TsParamPropParam<'ast>, TsParamPropParamField), + TsParenthesizedType(&'ast TsParenthesizedType<'ast>, TsParenthesizedTypeField), + TsPropertySignature(&'ast TsPropertySignature<'ast>, TsPropertySignatureField), + TsQualifiedName(&'ast TsQualifiedName<'ast>, TsQualifiedNameField), + TsRestType(&'ast TsRestType<'ast>, TsRestTypeField), + TsSatisfiesExpr(&'ast TsSatisfiesExpr<'ast>, TsSatisfiesExprField), + TsSetterSignature(&'ast TsSetterSignature<'ast>, TsSetterSignatureField), + TsThisType(&'ast TsThisType, TsThisTypeField), + TsThisTypeOrIdent(&'ast TsThisTypeOrIdent<'ast>, TsThisTypeOrIdentField), + TsTplLitType(&'ast TsTplLitType<'ast>, TsTplLitTypeField), + TsTupleElement(&'ast TsTupleElement<'ast>, TsTupleElementField), + TsTupleType(&'ast TsTupleType<'ast>, TsTupleTypeField), + TsType(&'ast TsType<'ast>, TsTypeField), + TsTypeAliasDecl(&'ast TsTypeAliasDecl<'ast>, TsTypeAliasDeclField), + TsTypeAnn(&'ast TsTypeAnn<'ast>, TsTypeAnnField), + TsTypeAssertion(&'ast TsTypeAssertion<'ast>, TsTypeAssertionField), + TsTypeElement(&'ast TsTypeElement<'ast>, TsTypeElementField), + TsTypeLit(&'ast TsTypeLit<'ast>, TsTypeLitField), + TsTypeOperator(&'ast TsTypeOperator<'ast>, TsTypeOperatorField), + TsTypeOperatorOp(&'ast TsTypeOperatorOp, TsTypeOperatorOpField), + TsTypeParam(&'ast TsTypeParam<'ast>, TsTypeParamField), + TsTypeParamDecl(&'ast TsTypeParamDecl<'ast>, TsTypeParamDeclField), + TsTypeParamInstantiation( + &'ast TsTypeParamInstantiation<'ast>, + TsTypeParamInstantiationField, + ), + TsTypePredicate(&'ast TsTypePredicate<'ast>, TsTypePredicateField), + TsTypeQuery(&'ast TsTypeQuery<'ast>, TsTypeQueryField), + TsTypeQueryExpr(&'ast TsTypeQueryExpr<'ast>, TsTypeQueryExprField), + TsTypeRef(&'ast TsTypeRef<'ast>, TsTypeRefField), + TsUnionOrIntersectionType( + &'ast TsUnionOrIntersectionType<'ast>, + TsUnionOrIntersectionTypeField, + ), + TsUnionType(&'ast TsUnionType<'ast>, TsUnionTypeField), + UnaryExpr(&'ast UnaryExpr<'ast>, UnaryExprField), + UpdateExpr(&'ast UpdateExpr<'ast>, UpdateExprField), + UsingDecl(&'ast UsingDecl<'ast>, UsingDeclField), + VarDecl(&'ast VarDecl<'ast>, VarDeclField), + VarDeclKind(&'ast VarDeclKind, VarDeclKindField), + VarDeclOrExpr(&'ast VarDeclOrExpr<'ast>, VarDeclOrExprField), + VarDeclarator(&'ast VarDeclarator<'ast>, VarDeclaratorField), + WhileStmt(&'ast WhileStmt<'ast>, WhileStmtField), + WithStmt(&'ast WithStmt<'ast>, WithStmtField), + YieldExpr(&'ast YieldExpr<'ast>, YieldExprField), + } + impl<'ast> ::swc_visit::NodeRef for AstParentNodeRef<'ast> { + type ParentKind = AstParentKind; + + #[inline(always)] + fn kind(&self) -> AstParentKind { + self.kind() + } + + fn set_index(&mut self, index: usize) { + match self { + Self::Accessibility(_, __field_kind) => __field_kind.set_index(index), + Self::ArrayLit(_, __field_kind) => __field_kind.set_index(index), + Self::ArrayPat(_, __field_kind) => __field_kind.set_index(index), + Self::ArrowExpr(_, __field_kind) => __field_kind.set_index(index), + Self::AssignExpr(_, __field_kind) => __field_kind.set_index(index), + Self::AssignPat(_, __field_kind) => __field_kind.set_index(index), + Self::AssignPatProp(_, __field_kind) => __field_kind.set_index(index), + Self::AssignProp(_, __field_kind) => __field_kind.set_index(index), + Self::AssignTarget(_, __field_kind) => __field_kind.set_index(index), + Self::AssignTargetPat(_, __field_kind) => __field_kind.set_index(index), + Self::AutoAccessor(_, __field_kind) => __field_kind.set_index(index), + Self::AwaitExpr(_, __field_kind) => __field_kind.set_index(index), + Self::BigInt(_, __field_kind) => __field_kind.set_index(index), + Self::BinExpr(_, __field_kind) => __field_kind.set_index(index), + Self::BindingIdent(_, __field_kind) => __field_kind.set_index(index), + Self::BlockStmt(_, __field_kind) => __field_kind.set_index(index), + Self::BlockStmtOrExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Bool(_, __field_kind) => __field_kind.set_index(index), + Self::BreakStmt(_, __field_kind) => __field_kind.set_index(index), + Self::CallExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Callee(_, __field_kind) => __field_kind.set_index(index), + Self::CatchClause(_, __field_kind) => __field_kind.set_index(index), + Self::Class(_, __field_kind) => __field_kind.set_index(index), + Self::ClassDecl(_, __field_kind) => __field_kind.set_index(index), + Self::ClassExpr(_, __field_kind) => __field_kind.set_index(index), + Self::ClassMember(_, __field_kind) => __field_kind.set_index(index), + Self::ClassMethod(_, __field_kind) => __field_kind.set_index(index), + Self::ClassProp(_, __field_kind) => __field_kind.set_index(index), + Self::ComputedPropName(_, __field_kind) => __field_kind.set_index(index), + Self::CondExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Constructor(_, __field_kind) => __field_kind.set_index(index), + Self::ContinueStmt(_, __field_kind) => __field_kind.set_index(index), + Self::DebuggerStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Decl(_, __field_kind) => __field_kind.set_index(index), + Self::Decorator(_, __field_kind) => __field_kind.set_index(index), + Self::DefaultDecl(_, __field_kind) => __field_kind.set_index(index), + Self::DoWhileStmt(_, __field_kind) => __field_kind.set_index(index), + Self::EmptyStmt(_, __field_kind) => __field_kind.set_index(index), + Self::ExportAll(_, __field_kind) => __field_kind.set_index(index), + Self::ExportDecl(_, __field_kind) => __field_kind.set_index(index), + Self::ExportDefaultDecl(_, __field_kind) => __field_kind.set_index(index), + Self::ExportDefaultExpr(_, __field_kind) => __field_kind.set_index(index), + Self::ExportDefaultSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ExportNamedSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ExportNamespaceSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ExportSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::Expr(_, __field_kind) => __field_kind.set_index(index), + Self::ExprOrSpread(_, __field_kind) => __field_kind.set_index(index), + Self::ExprStmt(_, __field_kind) => __field_kind.set_index(index), + Self::FnDecl(_, __field_kind) => __field_kind.set_index(index), + Self::FnExpr(_, __field_kind) => __field_kind.set_index(index), + Self::ForHead(_, __field_kind) => __field_kind.set_index(index), + Self::ForInStmt(_, __field_kind) => __field_kind.set_index(index), + Self::ForOfStmt(_, __field_kind) => __field_kind.set_index(index), + Self::ForStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Function(_, __field_kind) => __field_kind.set_index(index), + Self::GetterProp(_, __field_kind) => __field_kind.set_index(index), + Self::Ident(_, __field_kind) => __field_kind.set_index(index), + Self::IdentName(_, __field_kind) => __field_kind.set_index(index), + Self::IfStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Import(_, __field_kind) => __field_kind.set_index(index), + Self::ImportDecl(_, __field_kind) => __field_kind.set_index(index), + Self::ImportDefaultSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ImportNamedSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ImportPhase(_, __field_kind) => __field_kind.set_index(index), + Self::ImportSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ImportStarAsSpecifier(_, __field_kind) => __field_kind.set_index(index), + Self::ImportWith(_, __field_kind) => __field_kind.set_index(index), + Self::ImportWithItem(_, __field_kind) => __field_kind.set_index(index), + Self::Invalid(_, __field_kind) => __field_kind.set_index(index), + Self::JSXAttr(_, __field_kind) => __field_kind.set_index(index), + Self::JSXAttrName(_, __field_kind) => __field_kind.set_index(index), + Self::JSXAttrOrSpread(_, __field_kind) => __field_kind.set_index(index), + Self::JSXAttrValue(_, __field_kind) => __field_kind.set_index(index), + Self::JSXClosingElement(_, __field_kind) => __field_kind.set_index(index), + Self::JSXClosingFragment(_, __field_kind) => __field_kind.set_index(index), + Self::JSXElement(_, __field_kind) => __field_kind.set_index(index), + Self::JSXElementChild(_, __field_kind) => __field_kind.set_index(index), + Self::JSXElementName(_, __field_kind) => __field_kind.set_index(index), + Self::JSXEmptyExpr(_, __field_kind) => __field_kind.set_index(index), + Self::JSXExpr(_, __field_kind) => __field_kind.set_index(index), + Self::JSXExprContainer(_, __field_kind) => __field_kind.set_index(index), + Self::JSXFragment(_, __field_kind) => __field_kind.set_index(index), + Self::JSXMemberExpr(_, __field_kind) => __field_kind.set_index(index), + Self::JSXNamespacedName(_, __field_kind) => __field_kind.set_index(index), + Self::JSXObject(_, __field_kind) => __field_kind.set_index(index), + Self::JSXOpeningElement(_, __field_kind) => __field_kind.set_index(index), + Self::JSXOpeningFragment(_, __field_kind) => __field_kind.set_index(index), + Self::JSXSpreadChild(_, __field_kind) => __field_kind.set_index(index), + Self::JSXText(_, __field_kind) => __field_kind.set_index(index), + Self::Key(_, __field_kind) => __field_kind.set_index(index), + Self::KeyValuePatProp(_, __field_kind) => __field_kind.set_index(index), + Self::KeyValueProp(_, __field_kind) => __field_kind.set_index(index), + Self::LabeledStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Lit(_, __field_kind) => __field_kind.set_index(index), + Self::MemberExpr(_, __field_kind) => __field_kind.set_index(index), + Self::MemberProp(_, __field_kind) => __field_kind.set_index(index), + Self::MetaPropExpr(_, __field_kind) => __field_kind.set_index(index), + Self::MetaPropKind(_, __field_kind) => __field_kind.set_index(index), + Self::MethodKind(_, __field_kind) => __field_kind.set_index(index), + Self::MethodProp(_, __field_kind) => __field_kind.set_index(index), + Self::Module(_, __field_kind) => __field_kind.set_index(index), + Self::ModuleDecl(_, __field_kind) => __field_kind.set_index(index), + Self::ModuleExportName(_, __field_kind) => __field_kind.set_index(index), + Self::ModuleItem(_, __field_kind) => __field_kind.set_index(index), + Self::NamedExport(_, __field_kind) => __field_kind.set_index(index), + Self::NewExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Null(_, __field_kind) => __field_kind.set_index(index), + Self::Number(_, __field_kind) => __field_kind.set_index(index), + Self::ObjectLit(_, __field_kind) => __field_kind.set_index(index), + Self::ObjectPat(_, __field_kind) => __field_kind.set_index(index), + Self::ObjectPatProp(_, __field_kind) => __field_kind.set_index(index), + Self::OptCall(_, __field_kind) => __field_kind.set_index(index), + Self::OptChainBase(_, __field_kind) => __field_kind.set_index(index), + Self::OptChainExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Param(_, __field_kind) => __field_kind.set_index(index), + Self::ParamOrTsParamProp(_, __field_kind) => __field_kind.set_index(index), + Self::ParenExpr(_, __field_kind) => __field_kind.set_index(index), + Self::Pat(_, __field_kind) => __field_kind.set_index(index), + Self::PrivateMethod(_, __field_kind) => __field_kind.set_index(index), + Self::PrivateName(_, __field_kind) => __field_kind.set_index(index), + Self::PrivateProp(_, __field_kind) => __field_kind.set_index(index), + Self::Program(_, __field_kind) => __field_kind.set_index(index), + Self::Prop(_, __field_kind) => __field_kind.set_index(index), + Self::PropName(_, __field_kind) => __field_kind.set_index(index), + Self::PropOrSpread(_, __field_kind) => __field_kind.set_index(index), + Self::Regex(_, __field_kind) => __field_kind.set_index(index), + Self::RestPat(_, __field_kind) => __field_kind.set_index(index), + Self::ReturnStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Script(_, __field_kind) => __field_kind.set_index(index), + Self::SeqExpr(_, __field_kind) => __field_kind.set_index(index), + Self::SetterProp(_, __field_kind) => __field_kind.set_index(index), + Self::SimpleAssignTarget(_, __field_kind) => __field_kind.set_index(index), + Self::SpreadElement(_, __field_kind) => __field_kind.set_index(index), + Self::StaticBlock(_, __field_kind) => __field_kind.set_index(index), + Self::Stmt(_, __field_kind) => __field_kind.set_index(index), + Self::Str(_, __field_kind) => __field_kind.set_index(index), + Self::Super(_, __field_kind) => __field_kind.set_index(index), + Self::SuperProp(_, __field_kind) => __field_kind.set_index(index), + Self::SuperPropExpr(_, __field_kind) => __field_kind.set_index(index), + Self::SwitchCase(_, __field_kind) => __field_kind.set_index(index), + Self::SwitchStmt(_, __field_kind) => __field_kind.set_index(index), + Self::TaggedTpl(_, __field_kind) => __field_kind.set_index(index), + Self::ThisExpr(_, __field_kind) => __field_kind.set_index(index), + Self::ThrowStmt(_, __field_kind) => __field_kind.set_index(index), + Self::Tpl(_, __field_kind) => __field_kind.set_index(index), + Self::TplElement(_, __field_kind) => __field_kind.set_index(index), + Self::TruePlusMinus(_, __field_kind) => __field_kind.set_index(index), + Self::TryStmt(_, __field_kind) => __field_kind.set_index(index), + Self::TsArrayType(_, __field_kind) => __field_kind.set_index(index), + Self::TsAsExpr(_, __field_kind) => __field_kind.set_index(index), + Self::TsCallSignatureDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsConditionalType(_, __field_kind) => __field_kind.set_index(index), + Self::TsConstAssertion(_, __field_kind) => __field_kind.set_index(index), + Self::TsConstructSignatureDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsConstructorType(_, __field_kind) => __field_kind.set_index(index), + Self::TsEntityName(_, __field_kind) => __field_kind.set_index(index), + Self::TsEnumDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsEnumMember(_, __field_kind) => __field_kind.set_index(index), + Self::TsEnumMemberId(_, __field_kind) => __field_kind.set_index(index), + Self::TsExportAssignment(_, __field_kind) => __field_kind.set_index(index), + Self::TsExprWithTypeArgs(_, __field_kind) => __field_kind.set_index(index), + Self::TsExternalModuleRef(_, __field_kind) => __field_kind.set_index(index), + Self::TsFnOrConstructorType(_, __field_kind) => __field_kind.set_index(index), + Self::TsFnParam(_, __field_kind) => __field_kind.set_index(index), + Self::TsFnType(_, __field_kind) => __field_kind.set_index(index), + Self::TsGetterSignature(_, __field_kind) => __field_kind.set_index(index), + Self::TsImportEqualsDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsImportType(_, __field_kind) => __field_kind.set_index(index), + Self::TsIndexSignature(_, __field_kind) => __field_kind.set_index(index), + Self::TsIndexedAccessType(_, __field_kind) => __field_kind.set_index(index), + Self::TsInferType(_, __field_kind) => __field_kind.set_index(index), + Self::TsInstantiation(_, __field_kind) => __field_kind.set_index(index), + Self::TsInterfaceBody(_, __field_kind) => __field_kind.set_index(index), + Self::TsInterfaceDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsIntersectionType(_, __field_kind) => __field_kind.set_index(index), + Self::TsKeywordType(_, __field_kind) => __field_kind.set_index(index), + Self::TsKeywordTypeKind(_, __field_kind) => __field_kind.set_index(index), + Self::TsLit(_, __field_kind) => __field_kind.set_index(index), + Self::TsLitType(_, __field_kind) => __field_kind.set_index(index), + Self::TsMappedType(_, __field_kind) => __field_kind.set_index(index), + Self::TsMethodSignature(_, __field_kind) => __field_kind.set_index(index), + Self::TsModuleBlock(_, __field_kind) => __field_kind.set_index(index), + Self::TsModuleDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsModuleName(_, __field_kind) => __field_kind.set_index(index), + Self::TsModuleRef(_, __field_kind) => __field_kind.set_index(index), + Self::TsNamespaceBody(_, __field_kind) => __field_kind.set_index(index), + Self::TsNamespaceDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsNamespaceExportDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsNonNullExpr(_, __field_kind) => __field_kind.set_index(index), + Self::TsOptionalType(_, __field_kind) => __field_kind.set_index(index), + Self::TsParamProp(_, __field_kind) => __field_kind.set_index(index), + Self::TsParamPropParam(_, __field_kind) => __field_kind.set_index(index), + Self::TsParenthesizedType(_, __field_kind) => __field_kind.set_index(index), + Self::TsPropertySignature(_, __field_kind) => __field_kind.set_index(index), + Self::TsQualifiedName(_, __field_kind) => __field_kind.set_index(index), + Self::TsRestType(_, __field_kind) => __field_kind.set_index(index), + Self::TsSatisfiesExpr(_, __field_kind) => __field_kind.set_index(index), + Self::TsSetterSignature(_, __field_kind) => __field_kind.set_index(index), + Self::TsThisType(_, __field_kind) => __field_kind.set_index(index), + Self::TsThisTypeOrIdent(_, __field_kind) => __field_kind.set_index(index), + Self::TsTplLitType(_, __field_kind) => __field_kind.set_index(index), + Self::TsTupleElement(_, __field_kind) => __field_kind.set_index(index), + Self::TsTupleType(_, __field_kind) => __field_kind.set_index(index), + Self::TsType(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeAliasDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeAnn(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeAssertion(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeElement(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeLit(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeOperator(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeOperatorOp(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeParam(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeParamDecl(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeParamInstantiation(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypePredicate(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeQuery(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeQueryExpr(_, __field_kind) => __field_kind.set_index(index), + Self::TsTypeRef(_, __field_kind) => __field_kind.set_index(index), + Self::TsUnionOrIntersectionType(_, __field_kind) => __field_kind.set_index(index), + Self::TsUnionType(_, __field_kind) => __field_kind.set_index(index), + Self::UnaryExpr(_, __field_kind) => __field_kind.set_index(index), + Self::UpdateExpr(_, __field_kind) => __field_kind.set_index(index), + Self::UsingDecl(_, __field_kind) => __field_kind.set_index(index), + Self::VarDecl(_, __field_kind) => __field_kind.set_index(index), + Self::VarDeclKind(_, __field_kind) => __field_kind.set_index(index), + Self::VarDeclOrExpr(_, __field_kind) => __field_kind.set_index(index), + Self::VarDeclarator(_, __field_kind) => __field_kind.set_index(index), + Self::WhileStmt(_, __field_kind) => __field_kind.set_index(index), + Self::WithStmt(_, __field_kind) => __field_kind.set_index(index), + Self::YieldExpr(_, __field_kind) => __field_kind.set_index(index), + } + } + } + #[cfg(any(docsrs, feature = "path"))] + impl<'ast> AstParentNodeRef<'ast> { + #[inline] + pub fn kind(&self) -> AstParentKind { + match self { + Self::Accessibility(_, __field_kind) => AstParentKind::Accessibility(*__field_kind), + Self::ArrayLit(_, __field_kind) => AstParentKind::ArrayLit(*__field_kind), + Self::ArrayPat(_, __field_kind) => AstParentKind::ArrayPat(*__field_kind), + Self::ArrowExpr(_, __field_kind) => AstParentKind::ArrowExpr(*__field_kind), + Self::AssignExpr(_, __field_kind) => AstParentKind::AssignExpr(*__field_kind), + Self::AssignPat(_, __field_kind) => AstParentKind::AssignPat(*__field_kind), + Self::AssignPatProp(_, __field_kind) => AstParentKind::AssignPatProp(*__field_kind), + Self::AssignProp(_, __field_kind) => AstParentKind::AssignProp(*__field_kind), + Self::AssignTarget(_, __field_kind) => AstParentKind::AssignTarget(*__field_kind), + Self::AssignTargetPat(_, __field_kind) => { + AstParentKind::AssignTargetPat(*__field_kind) + } + Self::AutoAccessor(_, __field_kind) => AstParentKind::AutoAccessor(*__field_kind), + Self::AwaitExpr(_, __field_kind) => AstParentKind::AwaitExpr(*__field_kind), + Self::BigInt(_, __field_kind) => AstParentKind::BigInt(*__field_kind), + Self::BinExpr(_, __field_kind) => AstParentKind::BinExpr(*__field_kind), + Self::BindingIdent(_, __field_kind) => AstParentKind::BindingIdent(*__field_kind), + Self::BlockStmt(_, __field_kind) => AstParentKind::BlockStmt(*__field_kind), + Self::BlockStmtOrExpr(_, __field_kind) => { + AstParentKind::BlockStmtOrExpr(*__field_kind) + } + Self::Bool(_, __field_kind) => AstParentKind::Bool(*__field_kind), + Self::BreakStmt(_, __field_kind) => AstParentKind::BreakStmt(*__field_kind), + Self::CallExpr(_, __field_kind) => AstParentKind::CallExpr(*__field_kind), + Self::Callee(_, __field_kind) => AstParentKind::Callee(*__field_kind), + Self::CatchClause(_, __field_kind) => AstParentKind::CatchClause(*__field_kind), + Self::Class(_, __field_kind) => AstParentKind::Class(*__field_kind), + Self::ClassDecl(_, __field_kind) => AstParentKind::ClassDecl(*__field_kind), + Self::ClassExpr(_, __field_kind) => AstParentKind::ClassExpr(*__field_kind), + Self::ClassMember(_, __field_kind) => AstParentKind::ClassMember(*__field_kind), + Self::ClassMethod(_, __field_kind) => AstParentKind::ClassMethod(*__field_kind), + Self::ClassProp(_, __field_kind) => AstParentKind::ClassProp(*__field_kind), + Self::ComputedPropName(_, __field_kind) => { + AstParentKind::ComputedPropName(*__field_kind) + } + Self::CondExpr(_, __field_kind) => AstParentKind::CondExpr(*__field_kind), + Self::Constructor(_, __field_kind) => AstParentKind::Constructor(*__field_kind), + Self::ContinueStmt(_, __field_kind) => AstParentKind::ContinueStmt(*__field_kind), + Self::DebuggerStmt(_, __field_kind) => AstParentKind::DebuggerStmt(*__field_kind), + Self::Decl(_, __field_kind) => AstParentKind::Decl(*__field_kind), + Self::Decorator(_, __field_kind) => AstParentKind::Decorator(*__field_kind), + Self::DefaultDecl(_, __field_kind) => AstParentKind::DefaultDecl(*__field_kind), + Self::DoWhileStmt(_, __field_kind) => AstParentKind::DoWhileStmt(*__field_kind), + Self::EmptyStmt(_, __field_kind) => AstParentKind::EmptyStmt(*__field_kind), + Self::ExportAll(_, __field_kind) => AstParentKind::ExportAll(*__field_kind), + Self::ExportDecl(_, __field_kind) => AstParentKind::ExportDecl(*__field_kind), + Self::ExportDefaultDecl(_, __field_kind) => { + AstParentKind::ExportDefaultDecl(*__field_kind) + } + Self::ExportDefaultExpr(_, __field_kind) => { + AstParentKind::ExportDefaultExpr(*__field_kind) + } + Self::ExportDefaultSpecifier(_, __field_kind) => { + AstParentKind::ExportDefaultSpecifier(*__field_kind) + } + Self::ExportNamedSpecifier(_, __field_kind) => { + AstParentKind::ExportNamedSpecifier(*__field_kind) + } + Self::ExportNamespaceSpecifier(_, __field_kind) => { + AstParentKind::ExportNamespaceSpecifier(*__field_kind) + } + Self::ExportSpecifier(_, __field_kind) => { + AstParentKind::ExportSpecifier(*__field_kind) + } + Self::Expr(_, __field_kind) => AstParentKind::Expr(*__field_kind), + Self::ExprOrSpread(_, __field_kind) => AstParentKind::ExprOrSpread(*__field_kind), + Self::ExprStmt(_, __field_kind) => AstParentKind::ExprStmt(*__field_kind), + Self::FnDecl(_, __field_kind) => AstParentKind::FnDecl(*__field_kind), + Self::FnExpr(_, __field_kind) => AstParentKind::FnExpr(*__field_kind), + Self::ForHead(_, __field_kind) => AstParentKind::ForHead(*__field_kind), + Self::ForInStmt(_, __field_kind) => AstParentKind::ForInStmt(*__field_kind), + Self::ForOfStmt(_, __field_kind) => AstParentKind::ForOfStmt(*__field_kind), + Self::ForStmt(_, __field_kind) => AstParentKind::ForStmt(*__field_kind), + Self::Function(_, __field_kind) => AstParentKind::Function(*__field_kind), + Self::GetterProp(_, __field_kind) => AstParentKind::GetterProp(*__field_kind), + Self::Ident(_, __field_kind) => AstParentKind::Ident(*__field_kind), + Self::IdentName(_, __field_kind) => AstParentKind::IdentName(*__field_kind), + Self::IfStmt(_, __field_kind) => AstParentKind::IfStmt(*__field_kind), + Self::Import(_, __field_kind) => AstParentKind::Import(*__field_kind), + Self::ImportDecl(_, __field_kind) => AstParentKind::ImportDecl(*__field_kind), + Self::ImportDefaultSpecifier(_, __field_kind) => { + AstParentKind::ImportDefaultSpecifier(*__field_kind) + } + Self::ImportNamedSpecifier(_, __field_kind) => { + AstParentKind::ImportNamedSpecifier(*__field_kind) + } + Self::ImportPhase(_, __field_kind) => AstParentKind::ImportPhase(*__field_kind), + Self::ImportSpecifier(_, __field_kind) => { + AstParentKind::ImportSpecifier(*__field_kind) + } + Self::ImportStarAsSpecifier(_, __field_kind) => { + AstParentKind::ImportStarAsSpecifier(*__field_kind) + } + Self::ImportWith(_, __field_kind) => AstParentKind::ImportWith(*__field_kind), + Self::ImportWithItem(_, __field_kind) => { + AstParentKind::ImportWithItem(*__field_kind) + } + Self::Invalid(_, __field_kind) => AstParentKind::Invalid(*__field_kind), + Self::JSXAttr(_, __field_kind) => AstParentKind::JSXAttr(*__field_kind), + Self::JSXAttrName(_, __field_kind) => AstParentKind::JSXAttrName(*__field_kind), + Self::JSXAttrOrSpread(_, __field_kind) => { + AstParentKind::JSXAttrOrSpread(*__field_kind) + } + Self::JSXAttrValue(_, __field_kind) => AstParentKind::JSXAttrValue(*__field_kind), + Self::JSXClosingElement(_, __field_kind) => { + AstParentKind::JSXClosingElement(*__field_kind) + } + Self::JSXClosingFragment(_, __field_kind) => { + AstParentKind::JSXClosingFragment(*__field_kind) + } + Self::JSXElement(_, __field_kind) => AstParentKind::JSXElement(*__field_kind), + Self::JSXElementChild(_, __field_kind) => { + AstParentKind::JSXElementChild(*__field_kind) + } + Self::JSXElementName(_, __field_kind) => { + AstParentKind::JSXElementName(*__field_kind) + } + Self::JSXEmptyExpr(_, __field_kind) => AstParentKind::JSXEmptyExpr(*__field_kind), + Self::JSXExpr(_, __field_kind) => AstParentKind::JSXExpr(*__field_kind), + Self::JSXExprContainer(_, __field_kind) => { + AstParentKind::JSXExprContainer(*__field_kind) + } + Self::JSXFragment(_, __field_kind) => AstParentKind::JSXFragment(*__field_kind), + Self::JSXMemberExpr(_, __field_kind) => AstParentKind::JSXMemberExpr(*__field_kind), + Self::JSXNamespacedName(_, __field_kind) => { + AstParentKind::JSXNamespacedName(*__field_kind) + } + Self::JSXObject(_, __field_kind) => AstParentKind::JSXObject(*__field_kind), + Self::JSXOpeningElement(_, __field_kind) => { + AstParentKind::JSXOpeningElement(*__field_kind) + } + Self::JSXOpeningFragment(_, __field_kind) => { + AstParentKind::JSXOpeningFragment(*__field_kind) + } + Self::JSXSpreadChild(_, __field_kind) => { + AstParentKind::JSXSpreadChild(*__field_kind) + } + Self::JSXText(_, __field_kind) => AstParentKind::JSXText(*__field_kind), + Self::Key(_, __field_kind) => AstParentKind::Key(*__field_kind), + Self::KeyValuePatProp(_, __field_kind) => { + AstParentKind::KeyValuePatProp(*__field_kind) + } + Self::KeyValueProp(_, __field_kind) => AstParentKind::KeyValueProp(*__field_kind), + Self::LabeledStmt(_, __field_kind) => AstParentKind::LabeledStmt(*__field_kind), + Self::Lit(_, __field_kind) => AstParentKind::Lit(*__field_kind), + Self::MemberExpr(_, __field_kind) => AstParentKind::MemberExpr(*__field_kind), + Self::MemberProp(_, __field_kind) => AstParentKind::MemberProp(*__field_kind), + Self::MetaPropExpr(_, __field_kind) => AstParentKind::MetaPropExpr(*__field_kind), + Self::MetaPropKind(_, __field_kind) => AstParentKind::MetaPropKind(*__field_kind), + Self::MethodKind(_, __field_kind) => AstParentKind::MethodKind(*__field_kind), + Self::MethodProp(_, __field_kind) => AstParentKind::MethodProp(*__field_kind), + Self::Module(_, __field_kind) => AstParentKind::Module(*__field_kind), + Self::ModuleDecl(_, __field_kind) => AstParentKind::ModuleDecl(*__field_kind), + Self::ModuleExportName(_, __field_kind) => { + AstParentKind::ModuleExportName(*__field_kind) + } + Self::ModuleItem(_, __field_kind) => AstParentKind::ModuleItem(*__field_kind), + Self::NamedExport(_, __field_kind) => AstParentKind::NamedExport(*__field_kind), + Self::NewExpr(_, __field_kind) => AstParentKind::NewExpr(*__field_kind), + Self::Null(_, __field_kind) => AstParentKind::Null(*__field_kind), + Self::Number(_, __field_kind) => AstParentKind::Number(*__field_kind), + Self::ObjectLit(_, __field_kind) => AstParentKind::ObjectLit(*__field_kind), + Self::ObjectPat(_, __field_kind) => AstParentKind::ObjectPat(*__field_kind), + Self::ObjectPatProp(_, __field_kind) => AstParentKind::ObjectPatProp(*__field_kind), + Self::OptCall(_, __field_kind) => AstParentKind::OptCall(*__field_kind), + Self::OptChainBase(_, __field_kind) => AstParentKind::OptChainBase(*__field_kind), + Self::OptChainExpr(_, __field_kind) => AstParentKind::OptChainExpr(*__field_kind), + Self::Param(_, __field_kind) => AstParentKind::Param(*__field_kind), + Self::ParamOrTsParamProp(_, __field_kind) => { + AstParentKind::ParamOrTsParamProp(*__field_kind) + } + Self::ParenExpr(_, __field_kind) => AstParentKind::ParenExpr(*__field_kind), + Self::Pat(_, __field_kind) => AstParentKind::Pat(*__field_kind), + Self::PrivateMethod(_, __field_kind) => AstParentKind::PrivateMethod(*__field_kind), + Self::PrivateName(_, __field_kind) => AstParentKind::PrivateName(*__field_kind), + Self::PrivateProp(_, __field_kind) => AstParentKind::PrivateProp(*__field_kind), + Self::Program(_, __field_kind) => AstParentKind::Program(*__field_kind), + Self::Prop(_, __field_kind) => AstParentKind::Prop(*__field_kind), + Self::PropName(_, __field_kind) => AstParentKind::PropName(*__field_kind), + Self::PropOrSpread(_, __field_kind) => AstParentKind::PropOrSpread(*__field_kind), + Self::Regex(_, __field_kind) => AstParentKind::Regex(*__field_kind), + Self::RestPat(_, __field_kind) => AstParentKind::RestPat(*__field_kind), + Self::ReturnStmt(_, __field_kind) => AstParentKind::ReturnStmt(*__field_kind), + Self::Script(_, __field_kind) => AstParentKind::Script(*__field_kind), + Self::SeqExpr(_, __field_kind) => AstParentKind::SeqExpr(*__field_kind), + Self::SetterProp(_, __field_kind) => AstParentKind::SetterProp(*__field_kind), + Self::SimpleAssignTarget(_, __field_kind) => { + AstParentKind::SimpleAssignTarget(*__field_kind) + } + Self::SpreadElement(_, __field_kind) => AstParentKind::SpreadElement(*__field_kind), + Self::StaticBlock(_, __field_kind) => AstParentKind::StaticBlock(*__field_kind), + Self::Stmt(_, __field_kind) => AstParentKind::Stmt(*__field_kind), + Self::Str(_, __field_kind) => AstParentKind::Str(*__field_kind), + Self::Super(_, __field_kind) => AstParentKind::Super(*__field_kind), + Self::SuperProp(_, __field_kind) => AstParentKind::SuperProp(*__field_kind), + Self::SuperPropExpr(_, __field_kind) => AstParentKind::SuperPropExpr(*__field_kind), + Self::SwitchCase(_, __field_kind) => AstParentKind::SwitchCase(*__field_kind), + Self::SwitchStmt(_, __field_kind) => AstParentKind::SwitchStmt(*__field_kind), + Self::TaggedTpl(_, __field_kind) => AstParentKind::TaggedTpl(*__field_kind), + Self::ThisExpr(_, __field_kind) => AstParentKind::ThisExpr(*__field_kind), + Self::ThrowStmt(_, __field_kind) => AstParentKind::ThrowStmt(*__field_kind), + Self::Tpl(_, __field_kind) => AstParentKind::Tpl(*__field_kind), + Self::TplElement(_, __field_kind) => AstParentKind::TplElement(*__field_kind), + Self::TruePlusMinus(_, __field_kind) => AstParentKind::TruePlusMinus(*__field_kind), + Self::TryStmt(_, __field_kind) => AstParentKind::TryStmt(*__field_kind), + Self::TsArrayType(_, __field_kind) => AstParentKind::TsArrayType(*__field_kind), + Self::TsAsExpr(_, __field_kind) => AstParentKind::TsAsExpr(*__field_kind), + Self::TsCallSignatureDecl(_, __field_kind) => { + AstParentKind::TsCallSignatureDecl(*__field_kind) + } + Self::TsConditionalType(_, __field_kind) => { + AstParentKind::TsConditionalType(*__field_kind) + } + Self::TsConstAssertion(_, __field_kind) => { + AstParentKind::TsConstAssertion(*__field_kind) + } + Self::TsConstructSignatureDecl(_, __field_kind) => { + AstParentKind::TsConstructSignatureDecl(*__field_kind) + } + Self::TsConstructorType(_, __field_kind) => { + AstParentKind::TsConstructorType(*__field_kind) + } + Self::TsEntityName(_, __field_kind) => AstParentKind::TsEntityName(*__field_kind), + Self::TsEnumDecl(_, __field_kind) => AstParentKind::TsEnumDecl(*__field_kind), + Self::TsEnumMember(_, __field_kind) => AstParentKind::TsEnumMember(*__field_kind), + Self::TsEnumMemberId(_, __field_kind) => { + AstParentKind::TsEnumMemberId(*__field_kind) + } + Self::TsExportAssignment(_, __field_kind) => { + AstParentKind::TsExportAssignment(*__field_kind) + } + Self::TsExprWithTypeArgs(_, __field_kind) => { + AstParentKind::TsExprWithTypeArgs(*__field_kind) + } + Self::TsExternalModuleRef(_, __field_kind) => { + AstParentKind::TsExternalModuleRef(*__field_kind) + } + Self::TsFnOrConstructorType(_, __field_kind) => { + AstParentKind::TsFnOrConstructorType(*__field_kind) + } + Self::TsFnParam(_, __field_kind) => AstParentKind::TsFnParam(*__field_kind), + Self::TsFnType(_, __field_kind) => AstParentKind::TsFnType(*__field_kind), + Self::TsGetterSignature(_, __field_kind) => { + AstParentKind::TsGetterSignature(*__field_kind) + } + Self::TsImportEqualsDecl(_, __field_kind) => { + AstParentKind::TsImportEqualsDecl(*__field_kind) + } + Self::TsImportType(_, __field_kind) => AstParentKind::TsImportType(*__field_kind), + Self::TsIndexSignature(_, __field_kind) => { + AstParentKind::TsIndexSignature(*__field_kind) + } + Self::TsIndexedAccessType(_, __field_kind) => { + AstParentKind::TsIndexedAccessType(*__field_kind) + } + Self::TsInferType(_, __field_kind) => AstParentKind::TsInferType(*__field_kind), + Self::TsInstantiation(_, __field_kind) => { + AstParentKind::TsInstantiation(*__field_kind) + } + Self::TsInterfaceBody(_, __field_kind) => { + AstParentKind::TsInterfaceBody(*__field_kind) + } + Self::TsInterfaceDecl(_, __field_kind) => { + AstParentKind::TsInterfaceDecl(*__field_kind) + } + Self::TsIntersectionType(_, __field_kind) => { + AstParentKind::TsIntersectionType(*__field_kind) + } + Self::TsKeywordType(_, __field_kind) => AstParentKind::TsKeywordType(*__field_kind), + Self::TsKeywordTypeKind(_, __field_kind) => { + AstParentKind::TsKeywordTypeKind(*__field_kind) + } + Self::TsLit(_, __field_kind) => AstParentKind::TsLit(*__field_kind), + Self::TsLitType(_, __field_kind) => AstParentKind::TsLitType(*__field_kind), + Self::TsMappedType(_, __field_kind) => AstParentKind::TsMappedType(*__field_kind), + Self::TsMethodSignature(_, __field_kind) => { + AstParentKind::TsMethodSignature(*__field_kind) + } + Self::TsModuleBlock(_, __field_kind) => AstParentKind::TsModuleBlock(*__field_kind), + Self::TsModuleDecl(_, __field_kind) => AstParentKind::TsModuleDecl(*__field_kind), + Self::TsModuleName(_, __field_kind) => AstParentKind::TsModuleName(*__field_kind), + Self::TsModuleRef(_, __field_kind) => AstParentKind::TsModuleRef(*__field_kind), + Self::TsNamespaceBody(_, __field_kind) => { + AstParentKind::TsNamespaceBody(*__field_kind) + } + Self::TsNamespaceDecl(_, __field_kind) => { + AstParentKind::TsNamespaceDecl(*__field_kind) + } + Self::TsNamespaceExportDecl(_, __field_kind) => { + AstParentKind::TsNamespaceExportDecl(*__field_kind) + } + Self::TsNonNullExpr(_, __field_kind) => AstParentKind::TsNonNullExpr(*__field_kind), + Self::TsOptionalType(_, __field_kind) => { + AstParentKind::TsOptionalType(*__field_kind) + } + Self::TsParamProp(_, __field_kind) => AstParentKind::TsParamProp(*__field_kind), + Self::TsParamPropParam(_, __field_kind) => { + AstParentKind::TsParamPropParam(*__field_kind) + } + Self::TsParenthesizedType(_, __field_kind) => { + AstParentKind::TsParenthesizedType(*__field_kind) + } + Self::TsPropertySignature(_, __field_kind) => { + AstParentKind::TsPropertySignature(*__field_kind) + } + Self::TsQualifiedName(_, __field_kind) => { + AstParentKind::TsQualifiedName(*__field_kind) + } + Self::TsRestType(_, __field_kind) => AstParentKind::TsRestType(*__field_kind), + Self::TsSatisfiesExpr(_, __field_kind) => { + AstParentKind::TsSatisfiesExpr(*__field_kind) + } + Self::TsSetterSignature(_, __field_kind) => { + AstParentKind::TsSetterSignature(*__field_kind) + } + Self::TsThisType(_, __field_kind) => AstParentKind::TsThisType(*__field_kind), + Self::TsThisTypeOrIdent(_, __field_kind) => { + AstParentKind::TsThisTypeOrIdent(*__field_kind) + } + Self::TsTplLitType(_, __field_kind) => AstParentKind::TsTplLitType(*__field_kind), + Self::TsTupleElement(_, __field_kind) => { + AstParentKind::TsTupleElement(*__field_kind) + } + Self::TsTupleType(_, __field_kind) => AstParentKind::TsTupleType(*__field_kind), + Self::TsType(_, __field_kind) => AstParentKind::TsType(*__field_kind), + Self::TsTypeAliasDecl(_, __field_kind) => { + AstParentKind::TsTypeAliasDecl(*__field_kind) + } + Self::TsTypeAnn(_, __field_kind) => AstParentKind::TsTypeAnn(*__field_kind), + Self::TsTypeAssertion(_, __field_kind) => { + AstParentKind::TsTypeAssertion(*__field_kind) + } + Self::TsTypeElement(_, __field_kind) => AstParentKind::TsTypeElement(*__field_kind), + Self::TsTypeLit(_, __field_kind) => AstParentKind::TsTypeLit(*__field_kind), + Self::TsTypeOperator(_, __field_kind) => { + AstParentKind::TsTypeOperator(*__field_kind) + } + Self::TsTypeOperatorOp(_, __field_kind) => { + AstParentKind::TsTypeOperatorOp(*__field_kind) + } + Self::TsTypeParam(_, __field_kind) => AstParentKind::TsTypeParam(*__field_kind), + Self::TsTypeParamDecl(_, __field_kind) => { + AstParentKind::TsTypeParamDecl(*__field_kind) + } + Self::TsTypeParamInstantiation(_, __field_kind) => { + AstParentKind::TsTypeParamInstantiation(*__field_kind) + } + Self::TsTypePredicate(_, __field_kind) => { + AstParentKind::TsTypePredicate(*__field_kind) + } + Self::TsTypeQuery(_, __field_kind) => AstParentKind::TsTypeQuery(*__field_kind), + Self::TsTypeQueryExpr(_, __field_kind) => { + AstParentKind::TsTypeQueryExpr(*__field_kind) + } + Self::TsTypeRef(_, __field_kind) => AstParentKind::TsTypeRef(*__field_kind), + Self::TsUnionOrIntersectionType(_, __field_kind) => { + AstParentKind::TsUnionOrIntersectionType(*__field_kind) + } + Self::TsUnionType(_, __field_kind) => AstParentKind::TsUnionType(*__field_kind), + Self::UnaryExpr(_, __field_kind) => AstParentKind::UnaryExpr(*__field_kind), + Self::UpdateExpr(_, __field_kind) => AstParentKind::UpdateExpr(*__field_kind), + Self::UsingDecl(_, __field_kind) => AstParentKind::UsingDecl(*__field_kind), + Self::VarDecl(_, __field_kind) => AstParentKind::VarDecl(*__field_kind), + Self::VarDeclKind(_, __field_kind) => AstParentKind::VarDeclKind(*__field_kind), + Self::VarDeclOrExpr(_, __field_kind) => AstParentKind::VarDeclOrExpr(*__field_kind), + Self::VarDeclarator(_, __field_kind) => AstParentKind::VarDeclarator(*__field_kind), + Self::WhileStmt(_, __field_kind) => AstParentKind::WhileStmt(*__field_kind), + Self::WithStmt(_, __field_kind) => AstParentKind::WithStmt(*__field_kind), + Self::YieldExpr(_, __field_kind) => AstParentKind::YieldExpr(*__field_kind), + } + } + } +} +impl<'ast> From<&'ast Accessibility> for NodeRef<'ast> { + fn from(node: &'ast Accessibility) -> Self { + NodeRef::Accessibility(node) + } +} +impl<'ast> From<&'ast ArrayLit<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ArrayLit<'ast>) -> Self { + NodeRef::ArrayLit(node) + } +} +impl<'ast> From<&'ast ArrayPat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ArrayPat<'ast>) -> Self { + NodeRef::ArrayPat(node) + } +} +impl<'ast> From<&'ast ArrowExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ArrowExpr<'ast>) -> Self { + NodeRef::ArrowExpr(node) + } +} +impl<'ast> From<&'ast AssignExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignExpr<'ast>) -> Self { + NodeRef::AssignExpr(node) + } +} +impl<'ast> From<&'ast AssignPat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignPat<'ast>) -> Self { + NodeRef::AssignPat(node) + } +} +impl<'ast> From<&'ast AssignPatProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignPatProp<'ast>) -> Self { + NodeRef::AssignPatProp(node) + } +} +impl<'ast> From<&'ast AssignProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignProp<'ast>) -> Self { + NodeRef::AssignProp(node) + } +} +impl<'ast> From<&'ast AssignTarget<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignTarget<'ast>) -> Self { + NodeRef::AssignTarget(node) + } +} +impl<'ast> From<&'ast AssignTargetPat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AssignTargetPat<'ast>) -> Self { + NodeRef::AssignTargetPat(node) + } +} +impl<'ast> From<&'ast AutoAccessor<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AutoAccessor<'ast>) -> Self { + NodeRef::AutoAccessor(node) + } +} +impl<'ast> From<&'ast AwaitExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast AwaitExpr<'ast>) -> Self { + NodeRef::AwaitExpr(node) + } +} +impl<'ast> From<&'ast BigInt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast BigInt<'ast>) -> Self { + NodeRef::BigInt(node) + } +} +impl<'ast> From<&'ast BinExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast BinExpr<'ast>) -> Self { + NodeRef::BinExpr(node) + } +} +impl<'ast> From<&'ast BindingIdent<'ast>> for NodeRef<'ast> { + fn from(node: &'ast BindingIdent<'ast>) -> Self { + NodeRef::BindingIdent(node) + } +} +impl<'ast> From<&'ast BlockStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast BlockStmt<'ast>) -> Self { + NodeRef::BlockStmt(node) + } +} +impl<'ast> From<&'ast BlockStmtOrExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast BlockStmtOrExpr<'ast>) -> Self { + NodeRef::BlockStmtOrExpr(node) + } +} +impl<'ast> From<&'ast Bool> for NodeRef<'ast> { + fn from(node: &'ast Bool) -> Self { + NodeRef::Bool(node) + } +} +impl<'ast> From<&'ast BreakStmt> for NodeRef<'ast> { + fn from(node: &'ast BreakStmt) -> Self { + NodeRef::BreakStmt(node) + } +} +impl<'ast> From<&'ast CallExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast CallExpr<'ast>) -> Self { + NodeRef::CallExpr(node) + } +} +impl<'ast> From<&'ast Callee<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Callee<'ast>) -> Self { + NodeRef::Callee(node) + } +} +impl<'ast> From<&'ast CatchClause<'ast>> for NodeRef<'ast> { + fn from(node: &'ast CatchClause<'ast>) -> Self { + NodeRef::CatchClause(node) + } +} +impl<'ast> From<&'ast Class<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Class<'ast>) -> Self { + NodeRef::Class(node) + } +} +impl<'ast> From<&'ast ClassDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ClassDecl<'ast>) -> Self { + NodeRef::ClassDecl(node) + } +} +impl<'ast> From<&'ast ClassExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ClassExpr<'ast>) -> Self { + NodeRef::ClassExpr(node) + } +} +impl<'ast> From<&'ast ClassMember<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ClassMember<'ast>) -> Self { + NodeRef::ClassMember(node) + } +} +impl<'ast> From<&'ast ClassMethod<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ClassMethod<'ast>) -> Self { + NodeRef::ClassMethod(node) + } +} +impl<'ast> From<&'ast ClassProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ClassProp<'ast>) -> Self { + NodeRef::ClassProp(node) + } +} +impl<'ast> From<&'ast ComputedPropName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ComputedPropName<'ast>) -> Self { + NodeRef::ComputedPropName(node) + } +} +impl<'ast> From<&'ast CondExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast CondExpr<'ast>) -> Self { + NodeRef::CondExpr(node) + } +} +impl<'ast> From<&'ast Constructor<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Constructor<'ast>) -> Self { + NodeRef::Constructor(node) + } +} +impl<'ast> From<&'ast ContinueStmt> for NodeRef<'ast> { + fn from(node: &'ast ContinueStmt) -> Self { + NodeRef::ContinueStmt(node) + } +} +impl<'ast> From<&'ast DebuggerStmt> for NodeRef<'ast> { + fn from(node: &'ast DebuggerStmt) -> Self { + NodeRef::DebuggerStmt(node) + } +} +impl<'ast> From<&'ast Decl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Decl<'ast>) -> Self { + NodeRef::Decl(node) + } +} +impl<'ast> From<&'ast Decorator<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Decorator<'ast>) -> Self { + NodeRef::Decorator(node) + } +} +impl<'ast> From<&'ast DefaultDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast DefaultDecl<'ast>) -> Self { + NodeRef::DefaultDecl(node) + } +} +impl<'ast> From<&'ast DoWhileStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast DoWhileStmt<'ast>) -> Self { + NodeRef::DoWhileStmt(node) + } +} +impl<'ast> From<&'ast EmptyStmt> for NodeRef<'ast> { + fn from(node: &'ast EmptyStmt) -> Self { + NodeRef::EmptyStmt(node) + } +} +impl<'ast> From<&'ast ExportAll<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportAll<'ast>) -> Self { + NodeRef::ExportAll(node) + } +} +impl<'ast> From<&'ast ExportDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportDecl<'ast>) -> Self { + NodeRef::ExportDecl(node) + } +} +impl<'ast> From<&'ast ExportDefaultDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultDecl<'ast>) -> Self { + NodeRef::ExportDefaultDecl(node) + } +} +impl<'ast> From<&'ast ExportDefaultExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultExpr<'ast>) -> Self { + NodeRef::ExportDefaultExpr(node) + } +} +impl<'ast> From<&'ast ExportDefaultSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultSpecifier) -> Self { + NodeRef::ExportDefaultSpecifier(node) + } +} +impl<'ast> From<&'ast ExportNamedSpecifier<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportNamedSpecifier<'ast>) -> Self { + NodeRef::ExportNamedSpecifier(node) + } +} +impl<'ast> From<&'ast ExportNamespaceSpecifier<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportNamespaceSpecifier<'ast>) -> Self { + NodeRef::ExportNamespaceSpecifier(node) + } +} +impl<'ast> From<&'ast ExportSpecifier<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExportSpecifier<'ast>) -> Self { + NodeRef::ExportSpecifier(node) + } +} +impl<'ast> From<&'ast Expr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Expr<'ast>) -> Self { + NodeRef::Expr(node) + } +} +impl<'ast> From<&'ast ExprOrSpread<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExprOrSpread<'ast>) -> Self { + NodeRef::ExprOrSpread(node) + } +} +impl<'ast> From<&'ast ExprStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ExprStmt<'ast>) -> Self { + NodeRef::ExprStmt(node) + } +} +impl<'ast> From<&'ast FnDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast FnDecl<'ast>) -> Self { + NodeRef::FnDecl(node) + } +} +impl<'ast> From<&'ast FnExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast FnExpr<'ast>) -> Self { + NodeRef::FnExpr(node) + } +} +impl<'ast> From<&'ast ForHead<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ForHead<'ast>) -> Self { + NodeRef::ForHead(node) + } +} +impl<'ast> From<&'ast ForInStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ForInStmt<'ast>) -> Self { + NodeRef::ForInStmt(node) + } +} +impl<'ast> From<&'ast ForOfStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ForOfStmt<'ast>) -> Self { + NodeRef::ForOfStmt(node) + } +} +impl<'ast> From<&'ast ForStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ForStmt<'ast>) -> Self { + NodeRef::ForStmt(node) + } +} +impl<'ast> From<&'ast Function<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Function<'ast>) -> Self { + NodeRef::Function(node) + } +} +impl<'ast> From<&'ast GetterProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast GetterProp<'ast>) -> Self { + NodeRef::GetterProp(node) + } +} +impl<'ast> From<&'ast Ident> for NodeRef<'ast> { + fn from(node: &'ast Ident) -> Self { + NodeRef::Ident(node) + } +} +impl<'ast> From<&'ast IdentName> for NodeRef<'ast> { + fn from(node: &'ast IdentName) -> Self { + NodeRef::IdentName(node) + } +} +impl<'ast> From<&'ast IfStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast IfStmt<'ast>) -> Self { + NodeRef::IfStmt(node) + } +} +impl<'ast> From<&'ast Import> for NodeRef<'ast> { + fn from(node: &'ast Import) -> Self { + NodeRef::Import(node) + } +} +impl<'ast> From<&'ast ImportDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ImportDecl<'ast>) -> Self { + NodeRef::ImportDecl(node) + } +} +impl<'ast> From<&'ast ImportDefaultSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportDefaultSpecifier) -> Self { + NodeRef::ImportDefaultSpecifier(node) + } +} +impl<'ast> From<&'ast ImportNamedSpecifier<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ImportNamedSpecifier<'ast>) -> Self { + NodeRef::ImportNamedSpecifier(node) + } +} +impl<'ast> From<&'ast ImportPhase> for NodeRef<'ast> { + fn from(node: &'ast ImportPhase) -> Self { + NodeRef::ImportPhase(node) + } +} +impl<'ast> From<&'ast ImportSpecifier<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ImportSpecifier<'ast>) -> Self { + NodeRef::ImportSpecifier(node) + } +} +impl<'ast> From<&'ast ImportStarAsSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportStarAsSpecifier) -> Self { + NodeRef::ImportStarAsSpecifier(node) + } +} +impl<'ast> From<&'ast ImportWith<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ImportWith<'ast>) -> Self { + NodeRef::ImportWith(node) + } +} +impl<'ast> From<&'ast ImportWithItem> for NodeRef<'ast> { + fn from(node: &'ast ImportWithItem) -> Self { + NodeRef::ImportWithItem(node) + } +} +impl<'ast> From<&'ast Invalid> for NodeRef<'ast> { + fn from(node: &'ast Invalid) -> Self { + NodeRef::Invalid(node) + } +} +impl<'ast> From<&'ast JSXAttr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXAttr<'ast>) -> Self { + NodeRef::JSXAttr(node) + } +} +impl<'ast> From<&'ast JSXAttrName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrName<'ast>) -> Self { + NodeRef::JSXAttrName(node) + } +} +impl<'ast> From<&'ast JSXAttrOrSpread<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrOrSpread<'ast>) -> Self { + NodeRef::JSXAttrOrSpread(node) + } +} +impl<'ast> From<&'ast JSXAttrValue<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrValue<'ast>) -> Self { + NodeRef::JSXAttrValue(node) + } +} +impl<'ast> From<&'ast JSXClosingElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXClosingElement<'ast>) -> Self { + NodeRef::JSXClosingElement(node) + } +} +impl<'ast> From<&'ast JSXClosingFragment> for NodeRef<'ast> { + fn from(node: &'ast JSXClosingFragment) -> Self { + NodeRef::JSXClosingFragment(node) + } +} +impl<'ast> From<&'ast JSXElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXElement<'ast>) -> Self { + NodeRef::JSXElement(node) + } +} +impl<'ast> From<&'ast JSXElementChild<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXElementChild<'ast>) -> Self { + NodeRef::JSXElementChild(node) + } +} +impl<'ast> From<&'ast JSXElementName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXElementName<'ast>) -> Self { + NodeRef::JSXElementName(node) + } +} +impl<'ast> From<&'ast JSXEmptyExpr> for NodeRef<'ast> { + fn from(node: &'ast JSXEmptyExpr) -> Self { + NodeRef::JSXEmptyExpr(node) + } +} +impl<'ast> From<&'ast JSXExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXExpr<'ast>) -> Self { + NodeRef::JSXExpr(node) + } +} +impl<'ast> From<&'ast JSXExprContainer<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXExprContainer<'ast>) -> Self { + NodeRef::JSXExprContainer(node) + } +} +impl<'ast> From<&'ast JSXFragment<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXFragment<'ast>) -> Self { + NodeRef::JSXFragment(node) + } +} +impl<'ast> From<&'ast JSXMemberExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXMemberExpr<'ast>) -> Self { + NodeRef::JSXMemberExpr(node) + } +} +impl<'ast> From<&'ast JSXNamespacedName> for NodeRef<'ast> { + fn from(node: &'ast JSXNamespacedName) -> Self { + NodeRef::JSXNamespacedName(node) + } +} +impl<'ast> From<&'ast JSXObject<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXObject<'ast>) -> Self { + NodeRef::JSXObject(node) + } +} +impl<'ast> From<&'ast JSXOpeningElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXOpeningElement<'ast>) -> Self { + NodeRef::JSXOpeningElement(node) + } +} +impl<'ast> From<&'ast JSXOpeningFragment> for NodeRef<'ast> { + fn from(node: &'ast JSXOpeningFragment) -> Self { + NodeRef::JSXOpeningFragment(node) + } +} +impl<'ast> From<&'ast JSXSpreadChild<'ast>> for NodeRef<'ast> { + fn from(node: &'ast JSXSpreadChild<'ast>) -> Self { + NodeRef::JSXSpreadChild(node) + } +} +impl<'ast> From<&'ast JSXText> for NodeRef<'ast> { + fn from(node: &'ast JSXText) -> Self { + NodeRef::JSXText(node) + } +} +impl<'ast> From<&'ast Key<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Key<'ast>) -> Self { + NodeRef::Key(node) + } +} +impl<'ast> From<&'ast KeyValuePatProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast KeyValuePatProp<'ast>) -> Self { + NodeRef::KeyValuePatProp(node) + } +} +impl<'ast> From<&'ast KeyValueProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast KeyValueProp<'ast>) -> Self { + NodeRef::KeyValueProp(node) + } +} +impl<'ast> From<&'ast LabeledStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast LabeledStmt<'ast>) -> Self { + NodeRef::LabeledStmt(node) + } +} +impl<'ast> From<&'ast Lit<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Lit<'ast>) -> Self { + NodeRef::Lit(node) + } +} +impl<'ast> From<&'ast MemberExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast MemberExpr<'ast>) -> Self { + NodeRef::MemberExpr(node) + } +} +impl<'ast> From<&'ast MemberProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast MemberProp<'ast>) -> Self { + NodeRef::MemberProp(node) + } +} +impl<'ast> From<&'ast MetaPropExpr> for NodeRef<'ast> { + fn from(node: &'ast MetaPropExpr) -> Self { + NodeRef::MetaPropExpr(node) + } +} +impl<'ast> From<&'ast MetaPropKind> for NodeRef<'ast> { + fn from(node: &'ast MetaPropKind) -> Self { + NodeRef::MetaPropKind(node) + } +} +impl<'ast> From<&'ast MethodKind> for NodeRef<'ast> { + fn from(node: &'ast MethodKind) -> Self { + NodeRef::MethodKind(node) + } +} +impl<'ast> From<&'ast MethodProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast MethodProp<'ast>) -> Self { + NodeRef::MethodProp(node) + } +} +impl<'ast> From<&'ast Module<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Module<'ast>) -> Self { + NodeRef::Module(node) + } +} +impl<'ast> From<&'ast ModuleDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ModuleDecl<'ast>) -> Self { + NodeRef::ModuleDecl(node) + } +} +impl<'ast> From<&'ast ModuleExportName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ModuleExportName<'ast>) -> Self { + NodeRef::ModuleExportName(node) + } +} +impl<'ast> From<&'ast ModuleItem<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ModuleItem<'ast>) -> Self { + NodeRef::ModuleItem(node) + } +} +impl<'ast> From<&'ast NamedExport<'ast>> for NodeRef<'ast> { + fn from(node: &'ast NamedExport<'ast>) -> Self { + NodeRef::NamedExport(node) + } +} +impl<'ast> From<&'ast NewExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast NewExpr<'ast>) -> Self { + NodeRef::NewExpr(node) + } +} +impl<'ast> From<&'ast Null> for NodeRef<'ast> { + fn from(node: &'ast Null) -> Self { + NodeRef::Null(node) + } +} +impl<'ast> From<&'ast Number> for NodeRef<'ast> { + fn from(node: &'ast Number) -> Self { + NodeRef::Number(node) + } +} +impl<'ast> From<&'ast ObjectLit<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ObjectLit<'ast>) -> Self { + NodeRef::ObjectLit(node) + } +} +impl<'ast> From<&'ast ObjectPat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ObjectPat<'ast>) -> Self { + NodeRef::ObjectPat(node) + } +} +impl<'ast> From<&'ast ObjectPatProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ObjectPatProp<'ast>) -> Self { + NodeRef::ObjectPatProp(node) + } +} +impl<'ast> From<&'ast OptCall<'ast>> for NodeRef<'ast> { + fn from(node: &'ast OptCall<'ast>) -> Self { + NodeRef::OptCall(node) + } +} +impl<'ast> From<&'ast OptChainBase<'ast>> for NodeRef<'ast> { + fn from(node: &'ast OptChainBase<'ast>) -> Self { + NodeRef::OptChainBase(node) + } +} +impl<'ast> From<&'ast OptChainExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast OptChainExpr<'ast>) -> Self { + NodeRef::OptChainExpr(node) + } +} +impl<'ast> From<&'ast Param<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Param<'ast>) -> Self { + NodeRef::Param(node) + } +} +impl<'ast> From<&'ast ParamOrTsParamProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ParamOrTsParamProp<'ast>) -> Self { + NodeRef::ParamOrTsParamProp(node) + } +} +impl<'ast> From<&'ast ParenExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ParenExpr<'ast>) -> Self { + NodeRef::ParenExpr(node) + } +} +impl<'ast> From<&'ast Pat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Pat<'ast>) -> Self { + NodeRef::Pat(node) + } +} +impl<'ast> From<&'ast PrivateMethod<'ast>> for NodeRef<'ast> { + fn from(node: &'ast PrivateMethod<'ast>) -> Self { + NodeRef::PrivateMethod(node) + } +} +impl<'ast> From<&'ast PrivateName> for NodeRef<'ast> { + fn from(node: &'ast PrivateName) -> Self { + NodeRef::PrivateName(node) + } +} +impl<'ast> From<&'ast PrivateProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast PrivateProp<'ast>) -> Self { + NodeRef::PrivateProp(node) + } +} +impl<'ast> From<&'ast Program<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Program<'ast>) -> Self { + NodeRef::Program(node) + } +} +impl<'ast> From<&'ast Prop<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Prop<'ast>) -> Self { + NodeRef::Prop(node) + } +} +impl<'ast> From<&'ast PropName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast PropName<'ast>) -> Self { + NodeRef::PropName(node) + } +} +impl<'ast> From<&'ast PropOrSpread<'ast>> for NodeRef<'ast> { + fn from(node: &'ast PropOrSpread<'ast>) -> Self { + NodeRef::PropOrSpread(node) + } +} +impl<'ast> From<&'ast Regex> for NodeRef<'ast> { + fn from(node: &'ast Regex) -> Self { + NodeRef::Regex(node) + } +} +impl<'ast> From<&'ast RestPat<'ast>> for NodeRef<'ast> { + fn from(node: &'ast RestPat<'ast>) -> Self { + NodeRef::RestPat(node) + } +} +impl<'ast> From<&'ast ReturnStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ReturnStmt<'ast>) -> Self { + NodeRef::ReturnStmt(node) + } +} +impl<'ast> From<&'ast Script<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Script<'ast>) -> Self { + NodeRef::Script(node) + } +} +impl<'ast> From<&'ast SeqExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SeqExpr<'ast>) -> Self { + NodeRef::SeqExpr(node) + } +} +impl<'ast> From<&'ast SetterProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SetterProp<'ast>) -> Self { + NodeRef::SetterProp(node) + } +} +impl<'ast> From<&'ast SimpleAssignTarget<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SimpleAssignTarget<'ast>) -> Self { + NodeRef::SimpleAssignTarget(node) + } +} +impl<'ast> From<&'ast SpreadElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SpreadElement<'ast>) -> Self { + NodeRef::SpreadElement(node) + } +} +impl<'ast> From<&'ast StaticBlock<'ast>> for NodeRef<'ast> { + fn from(node: &'ast StaticBlock<'ast>) -> Self { + NodeRef::StaticBlock(node) + } +} +impl<'ast> From<&'ast Stmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Stmt<'ast>) -> Self { + NodeRef::Stmt(node) + } +} +impl<'ast> From<&'ast Str> for NodeRef<'ast> { + fn from(node: &'ast Str) -> Self { + NodeRef::Str(node) + } +} +impl<'ast> From<&'ast Super> for NodeRef<'ast> { + fn from(node: &'ast Super) -> Self { + NodeRef::Super(node) + } +} +impl<'ast> From<&'ast SuperProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SuperProp<'ast>) -> Self { + NodeRef::SuperProp(node) + } +} +impl<'ast> From<&'ast SuperPropExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SuperPropExpr<'ast>) -> Self { + NodeRef::SuperPropExpr(node) + } +} +impl<'ast> From<&'ast SwitchCase<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SwitchCase<'ast>) -> Self { + NodeRef::SwitchCase(node) + } +} +impl<'ast> From<&'ast SwitchStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast SwitchStmt<'ast>) -> Self { + NodeRef::SwitchStmt(node) + } +} +impl<'ast> From<&'ast TaggedTpl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TaggedTpl<'ast>) -> Self { + NodeRef::TaggedTpl(node) + } +} +impl<'ast> From<&'ast ThisExpr> for NodeRef<'ast> { + fn from(node: &'ast ThisExpr) -> Self { + NodeRef::ThisExpr(node) + } +} +impl<'ast> From<&'ast ThrowStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast ThrowStmt<'ast>) -> Self { + NodeRef::ThrowStmt(node) + } +} +impl<'ast> From<&'ast Tpl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast Tpl<'ast>) -> Self { + NodeRef::Tpl(node) + } +} +impl<'ast> From<&'ast TplElement> for NodeRef<'ast> { + fn from(node: &'ast TplElement) -> Self { + NodeRef::TplElement(node) + } +} +impl<'ast> From<&'ast TruePlusMinus> for NodeRef<'ast> { + fn from(node: &'ast TruePlusMinus) -> Self { + NodeRef::TruePlusMinus(node) + } +} +impl<'ast> From<&'ast TryStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TryStmt<'ast>) -> Self { + NodeRef::TryStmt(node) + } +} +impl<'ast> From<&'ast TsArrayType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsArrayType<'ast>) -> Self { + NodeRef::TsArrayType(node) + } +} +impl<'ast> From<&'ast TsAsExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsAsExpr<'ast>) -> Self { + NodeRef::TsAsExpr(node) + } +} +impl<'ast> From<&'ast TsCallSignatureDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsCallSignatureDecl<'ast>) -> Self { + NodeRef::TsCallSignatureDecl(node) + } +} +impl<'ast> From<&'ast TsConditionalType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsConditionalType<'ast>) -> Self { + NodeRef::TsConditionalType(node) + } +} +impl<'ast> From<&'ast TsConstAssertion<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsConstAssertion<'ast>) -> Self { + NodeRef::TsConstAssertion(node) + } +} +impl<'ast> From<&'ast TsConstructSignatureDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsConstructSignatureDecl<'ast>) -> Self { + NodeRef::TsConstructSignatureDecl(node) + } +} +impl<'ast> From<&'ast TsConstructorType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsConstructorType<'ast>) -> Self { + NodeRef::TsConstructorType(node) + } +} +impl<'ast> From<&'ast TsEntityName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsEntityName<'ast>) -> Self { + NodeRef::TsEntityName(node) + } +} +impl<'ast> From<&'ast TsEnumDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsEnumDecl<'ast>) -> Self { + NodeRef::TsEnumDecl(node) + } +} +impl<'ast> From<&'ast TsEnumMember<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsEnumMember<'ast>) -> Self { + NodeRef::TsEnumMember(node) + } +} +impl<'ast> From<&'ast TsEnumMemberId<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsEnumMemberId<'ast>) -> Self { + NodeRef::TsEnumMemberId(node) + } +} +impl<'ast> From<&'ast TsExportAssignment<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsExportAssignment<'ast>) -> Self { + NodeRef::TsExportAssignment(node) + } +} +impl<'ast> From<&'ast TsExprWithTypeArgs<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsExprWithTypeArgs<'ast>) -> Self { + NodeRef::TsExprWithTypeArgs(node) + } +} +impl<'ast> From<&'ast TsExternalModuleRef> for NodeRef<'ast> { + fn from(node: &'ast TsExternalModuleRef) -> Self { + NodeRef::TsExternalModuleRef(node) + } +} +impl<'ast> From<&'ast TsFnOrConstructorType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsFnOrConstructorType<'ast>) -> Self { + NodeRef::TsFnOrConstructorType(node) + } +} +impl<'ast> From<&'ast TsFnParam<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsFnParam<'ast>) -> Self { + NodeRef::TsFnParam(node) + } +} +impl<'ast> From<&'ast TsFnType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsFnType<'ast>) -> Self { + NodeRef::TsFnType(node) + } +} +impl<'ast> From<&'ast TsGetterSignature<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsGetterSignature<'ast>) -> Self { + NodeRef::TsGetterSignature(node) + } +} +impl<'ast> From<&'ast TsImportEqualsDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsImportEqualsDecl<'ast>) -> Self { + NodeRef::TsImportEqualsDecl(node) + } +} +impl<'ast> From<&'ast TsImportType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsImportType<'ast>) -> Self { + NodeRef::TsImportType(node) + } +} +impl<'ast> From<&'ast TsIndexSignature<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsIndexSignature<'ast>) -> Self { + NodeRef::TsIndexSignature(node) + } +} +impl<'ast> From<&'ast TsIndexedAccessType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsIndexedAccessType<'ast>) -> Self { + NodeRef::TsIndexedAccessType(node) + } +} +impl<'ast> From<&'ast TsInferType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsInferType<'ast>) -> Self { + NodeRef::TsInferType(node) + } +} +impl<'ast> From<&'ast TsInstantiation<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsInstantiation<'ast>) -> Self { + NodeRef::TsInstantiation(node) + } +} +impl<'ast> From<&'ast TsInterfaceBody<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsInterfaceBody<'ast>) -> Self { + NodeRef::TsInterfaceBody(node) + } +} +impl<'ast> From<&'ast TsInterfaceDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsInterfaceDecl<'ast>) -> Self { + NodeRef::TsInterfaceDecl(node) + } +} +impl<'ast> From<&'ast TsIntersectionType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsIntersectionType<'ast>) -> Self { + NodeRef::TsIntersectionType(node) + } +} +impl<'ast> From<&'ast TsKeywordType> for NodeRef<'ast> { + fn from(node: &'ast TsKeywordType) -> Self { + NodeRef::TsKeywordType(node) + } +} +impl<'ast> From<&'ast TsKeywordTypeKind> for NodeRef<'ast> { + fn from(node: &'ast TsKeywordTypeKind) -> Self { + NodeRef::TsKeywordTypeKind(node) + } +} +impl<'ast> From<&'ast TsLit<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsLit<'ast>) -> Self { + NodeRef::TsLit(node) + } +} +impl<'ast> From<&'ast TsLitType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsLitType<'ast>) -> Self { + NodeRef::TsLitType(node) + } +} +impl<'ast> From<&'ast TsMappedType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsMappedType<'ast>) -> Self { + NodeRef::TsMappedType(node) + } +} +impl<'ast> From<&'ast TsMethodSignature<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsMethodSignature<'ast>) -> Self { + NodeRef::TsMethodSignature(node) + } +} +impl<'ast> From<&'ast TsModuleBlock<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsModuleBlock<'ast>) -> Self { + NodeRef::TsModuleBlock(node) + } +} +impl<'ast> From<&'ast TsModuleDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsModuleDecl<'ast>) -> Self { + NodeRef::TsModuleDecl(node) + } +} +impl<'ast> From<&'ast TsModuleName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsModuleName<'ast>) -> Self { + NodeRef::TsModuleName(node) + } +} +impl<'ast> From<&'ast TsModuleRef<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsModuleRef<'ast>) -> Self { + NodeRef::TsModuleRef(node) + } +} +impl<'ast> From<&'ast TsNamespaceBody<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceBody<'ast>) -> Self { + NodeRef::TsNamespaceBody(node) + } +} +impl<'ast> From<&'ast TsNamespaceDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceDecl<'ast>) -> Self { + NodeRef::TsNamespaceDecl(node) + } +} +impl<'ast> From<&'ast TsNamespaceExportDecl> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceExportDecl) -> Self { + NodeRef::TsNamespaceExportDecl(node) + } +} +impl<'ast> From<&'ast TsNonNullExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsNonNullExpr<'ast>) -> Self { + NodeRef::TsNonNullExpr(node) + } +} +impl<'ast> From<&'ast TsOptionalType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsOptionalType<'ast>) -> Self { + NodeRef::TsOptionalType(node) + } +} +impl<'ast> From<&'ast TsParamProp<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsParamProp<'ast>) -> Self { + NodeRef::TsParamProp(node) + } +} +impl<'ast> From<&'ast TsParamPropParam<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsParamPropParam<'ast>) -> Self { + NodeRef::TsParamPropParam(node) + } +} +impl<'ast> From<&'ast TsParenthesizedType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsParenthesizedType<'ast>) -> Self { + NodeRef::TsParenthesizedType(node) + } +} +impl<'ast> From<&'ast TsPropertySignature<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsPropertySignature<'ast>) -> Self { + NodeRef::TsPropertySignature(node) + } +} +impl<'ast> From<&'ast TsQualifiedName<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsQualifiedName<'ast>) -> Self { + NodeRef::TsQualifiedName(node) + } +} +impl<'ast> From<&'ast TsRestType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsRestType<'ast>) -> Self { + NodeRef::TsRestType(node) + } +} +impl<'ast> From<&'ast TsSatisfiesExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsSatisfiesExpr<'ast>) -> Self { + NodeRef::TsSatisfiesExpr(node) + } +} +impl<'ast> From<&'ast TsSetterSignature<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsSetterSignature<'ast>) -> Self { + NodeRef::TsSetterSignature(node) + } +} +impl<'ast> From<&'ast TsThisType> for NodeRef<'ast> { + fn from(node: &'ast TsThisType) -> Self { + NodeRef::TsThisType(node) + } +} +impl<'ast> From<&'ast TsThisTypeOrIdent<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsThisTypeOrIdent<'ast>) -> Self { + NodeRef::TsThisTypeOrIdent(node) + } +} +impl<'ast> From<&'ast TsTplLitType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTplLitType<'ast>) -> Self { + NodeRef::TsTplLitType(node) + } +} +impl<'ast> From<&'ast TsTupleElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTupleElement<'ast>) -> Self { + NodeRef::TsTupleElement(node) + } +} +impl<'ast> From<&'ast TsTupleType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTupleType<'ast>) -> Self { + NodeRef::TsTupleType(node) + } +} +impl<'ast> From<&'ast TsType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsType<'ast>) -> Self { + NodeRef::TsType(node) + } +} +impl<'ast> From<&'ast TsTypeAliasDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAliasDecl<'ast>) -> Self { + NodeRef::TsTypeAliasDecl(node) + } +} +impl<'ast> From<&'ast TsTypeAnn<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAnn<'ast>) -> Self { + NodeRef::TsTypeAnn(node) + } +} +impl<'ast> From<&'ast TsTypeAssertion<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAssertion<'ast>) -> Self { + NodeRef::TsTypeAssertion(node) + } +} +impl<'ast> From<&'ast TsTypeElement<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeElement<'ast>) -> Self { + NodeRef::TsTypeElement(node) + } +} +impl<'ast> From<&'ast TsTypeLit<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeLit<'ast>) -> Self { + NodeRef::TsTypeLit(node) + } +} +impl<'ast> From<&'ast TsTypeOperator<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeOperator<'ast>) -> Self { + NodeRef::TsTypeOperator(node) + } +} +impl<'ast> From<&'ast TsTypeOperatorOp> for NodeRef<'ast> { + fn from(node: &'ast TsTypeOperatorOp) -> Self { + NodeRef::TsTypeOperatorOp(node) + } +} +impl<'ast> From<&'ast TsTypeParam<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParam<'ast>) -> Self { + NodeRef::TsTypeParam(node) + } +} +impl<'ast> From<&'ast TsTypeParamDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParamDecl<'ast>) -> Self { + NodeRef::TsTypeParamDecl(node) + } +} +impl<'ast> From<&'ast TsTypeParamInstantiation<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParamInstantiation<'ast>) -> Self { + NodeRef::TsTypeParamInstantiation(node) + } +} +impl<'ast> From<&'ast TsTypePredicate<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypePredicate<'ast>) -> Self { + NodeRef::TsTypePredicate(node) + } +} +impl<'ast> From<&'ast TsTypeQuery<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeQuery<'ast>) -> Self { + NodeRef::TsTypeQuery(node) + } +} +impl<'ast> From<&'ast TsTypeQueryExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeQueryExpr<'ast>) -> Self { + NodeRef::TsTypeQueryExpr(node) + } +} +impl<'ast> From<&'ast TsTypeRef<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsTypeRef<'ast>) -> Self { + NodeRef::TsTypeRef(node) + } +} +impl<'ast> From<&'ast TsUnionOrIntersectionType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsUnionOrIntersectionType<'ast>) -> Self { + NodeRef::TsUnionOrIntersectionType(node) + } +} +impl<'ast> From<&'ast TsUnionType<'ast>> for NodeRef<'ast> { + fn from(node: &'ast TsUnionType<'ast>) -> Self { + NodeRef::TsUnionType(node) + } +} +impl<'ast> From<&'ast UnaryExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast UnaryExpr<'ast>) -> Self { + NodeRef::UnaryExpr(node) + } +} +impl<'ast> From<&'ast UpdateExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast UpdateExpr<'ast>) -> Self { + NodeRef::UpdateExpr(node) + } +} +impl<'ast> From<&'ast UsingDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast UsingDecl<'ast>) -> Self { + NodeRef::UsingDecl(node) + } +} +impl<'ast> From<&'ast VarDecl<'ast>> for NodeRef<'ast> { + fn from(node: &'ast VarDecl<'ast>) -> Self { + NodeRef::VarDecl(node) + } +} +impl<'ast> From<&'ast VarDeclKind> for NodeRef<'ast> { + fn from(node: &'ast VarDeclKind) -> Self { + NodeRef::VarDeclKind(node) + } +} +impl<'ast> From<&'ast VarDeclOrExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast VarDeclOrExpr<'ast>) -> Self { + NodeRef::VarDeclOrExpr(node) + } +} +impl<'ast> From<&'ast VarDeclarator<'ast>> for NodeRef<'ast> { + fn from(node: &'ast VarDeclarator<'ast>) -> Self { + NodeRef::VarDeclarator(node) + } +} +impl<'ast> From<&'ast WhileStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast WhileStmt<'ast>) -> Self { + NodeRef::WhileStmt(node) + } +} +impl<'ast> From<&'ast WithStmt<'ast>> for NodeRef<'ast> { + fn from(node: &'ast WithStmt<'ast>) -> Self { + NodeRef::WithStmt(node) + } +} +impl<'ast> From<&'ast YieldExpr<'ast>> for NodeRef<'ast> { + fn from(node: &'ast YieldExpr<'ast>) -> Self { + NodeRef::YieldExpr(node) + } +} +#[derive(Debug, Clone, Copy)] +pub enum NodeRef<'ast> { + Accessibility(&'ast Accessibility), + ArrayLit(&'ast ArrayLit<'ast>), + ArrayPat(&'ast ArrayPat<'ast>), + ArrowExpr(&'ast ArrowExpr<'ast>), + AssignExpr(&'ast AssignExpr<'ast>), + AssignPat(&'ast AssignPat<'ast>), + AssignPatProp(&'ast AssignPatProp<'ast>), + AssignProp(&'ast AssignProp<'ast>), + AssignTarget(&'ast AssignTarget<'ast>), + AssignTargetPat(&'ast AssignTargetPat<'ast>), + AutoAccessor(&'ast AutoAccessor<'ast>), + AwaitExpr(&'ast AwaitExpr<'ast>), + BigInt(&'ast BigInt<'ast>), + BinExpr(&'ast BinExpr<'ast>), + BindingIdent(&'ast BindingIdent<'ast>), + BlockStmt(&'ast BlockStmt<'ast>), + BlockStmtOrExpr(&'ast BlockStmtOrExpr<'ast>), + Bool(&'ast Bool), + BreakStmt(&'ast BreakStmt), + CallExpr(&'ast CallExpr<'ast>), + Callee(&'ast Callee<'ast>), + CatchClause(&'ast CatchClause<'ast>), + Class(&'ast Class<'ast>), + ClassDecl(&'ast ClassDecl<'ast>), + ClassExpr(&'ast ClassExpr<'ast>), + ClassMember(&'ast ClassMember<'ast>), + ClassMethod(&'ast ClassMethod<'ast>), + ClassProp(&'ast ClassProp<'ast>), + ComputedPropName(&'ast ComputedPropName<'ast>), + CondExpr(&'ast CondExpr<'ast>), + Constructor(&'ast Constructor<'ast>), + ContinueStmt(&'ast ContinueStmt), + DebuggerStmt(&'ast DebuggerStmt), + Decl(&'ast Decl<'ast>), + Decorator(&'ast Decorator<'ast>), + DefaultDecl(&'ast DefaultDecl<'ast>), + DoWhileStmt(&'ast DoWhileStmt<'ast>), + EmptyStmt(&'ast EmptyStmt), + ExportAll(&'ast ExportAll<'ast>), + ExportDecl(&'ast ExportDecl<'ast>), + ExportDefaultDecl(&'ast ExportDefaultDecl<'ast>), + ExportDefaultExpr(&'ast ExportDefaultExpr<'ast>), + ExportDefaultSpecifier(&'ast ExportDefaultSpecifier), + ExportNamedSpecifier(&'ast ExportNamedSpecifier<'ast>), + ExportNamespaceSpecifier(&'ast ExportNamespaceSpecifier<'ast>), + ExportSpecifier(&'ast ExportSpecifier<'ast>), + Expr(&'ast Expr<'ast>), + ExprOrSpread(&'ast ExprOrSpread<'ast>), + ExprStmt(&'ast ExprStmt<'ast>), + FnDecl(&'ast FnDecl<'ast>), + FnExpr(&'ast FnExpr<'ast>), + ForHead(&'ast ForHead<'ast>), + ForInStmt(&'ast ForInStmt<'ast>), + ForOfStmt(&'ast ForOfStmt<'ast>), + ForStmt(&'ast ForStmt<'ast>), + Function(&'ast Function<'ast>), + GetterProp(&'ast GetterProp<'ast>), + Ident(&'ast Ident), + IdentName(&'ast IdentName), + IfStmt(&'ast IfStmt<'ast>), + Import(&'ast Import), + ImportDecl(&'ast ImportDecl<'ast>), + ImportDefaultSpecifier(&'ast ImportDefaultSpecifier), + ImportNamedSpecifier(&'ast ImportNamedSpecifier<'ast>), + ImportPhase(&'ast ImportPhase), + ImportSpecifier(&'ast ImportSpecifier<'ast>), + ImportStarAsSpecifier(&'ast ImportStarAsSpecifier), + ImportWith(&'ast ImportWith<'ast>), + ImportWithItem(&'ast ImportWithItem), + Invalid(&'ast Invalid), + JSXAttr(&'ast JSXAttr<'ast>), + JSXAttrName(&'ast JSXAttrName<'ast>), + JSXAttrOrSpread(&'ast JSXAttrOrSpread<'ast>), + JSXAttrValue(&'ast JSXAttrValue<'ast>), + JSXClosingElement(&'ast JSXClosingElement<'ast>), + JSXClosingFragment(&'ast JSXClosingFragment), + JSXElement(&'ast JSXElement<'ast>), + JSXElementChild(&'ast JSXElementChild<'ast>), + JSXElementName(&'ast JSXElementName<'ast>), + JSXEmptyExpr(&'ast JSXEmptyExpr), + JSXExpr(&'ast JSXExpr<'ast>), + JSXExprContainer(&'ast JSXExprContainer<'ast>), + JSXFragment(&'ast JSXFragment<'ast>), + JSXMemberExpr(&'ast JSXMemberExpr<'ast>), + JSXNamespacedName(&'ast JSXNamespacedName), + JSXObject(&'ast JSXObject<'ast>), + JSXOpeningElement(&'ast JSXOpeningElement<'ast>), + JSXOpeningFragment(&'ast JSXOpeningFragment), + JSXSpreadChild(&'ast JSXSpreadChild<'ast>), + JSXText(&'ast JSXText), + Key(&'ast Key<'ast>), + KeyValuePatProp(&'ast KeyValuePatProp<'ast>), + KeyValueProp(&'ast KeyValueProp<'ast>), + LabeledStmt(&'ast LabeledStmt<'ast>), + Lit(&'ast Lit<'ast>), + MemberExpr(&'ast MemberExpr<'ast>), + MemberProp(&'ast MemberProp<'ast>), + MetaPropExpr(&'ast MetaPropExpr), + MetaPropKind(&'ast MetaPropKind), + MethodKind(&'ast MethodKind), + MethodProp(&'ast MethodProp<'ast>), + Module(&'ast Module<'ast>), + ModuleDecl(&'ast ModuleDecl<'ast>), + ModuleExportName(&'ast ModuleExportName<'ast>), + ModuleItem(&'ast ModuleItem<'ast>), + NamedExport(&'ast NamedExport<'ast>), + NewExpr(&'ast NewExpr<'ast>), + Null(&'ast Null), + Number(&'ast Number), + ObjectLit(&'ast ObjectLit<'ast>), + ObjectPat(&'ast ObjectPat<'ast>), + ObjectPatProp(&'ast ObjectPatProp<'ast>), + OptCall(&'ast OptCall<'ast>), + OptChainBase(&'ast OptChainBase<'ast>), + OptChainExpr(&'ast OptChainExpr<'ast>), + Param(&'ast Param<'ast>), + ParamOrTsParamProp(&'ast ParamOrTsParamProp<'ast>), + ParenExpr(&'ast ParenExpr<'ast>), + Pat(&'ast Pat<'ast>), + PrivateMethod(&'ast PrivateMethod<'ast>), + PrivateName(&'ast PrivateName), + PrivateProp(&'ast PrivateProp<'ast>), + Program(&'ast Program<'ast>), + Prop(&'ast Prop<'ast>), + PropName(&'ast PropName<'ast>), + PropOrSpread(&'ast PropOrSpread<'ast>), + Regex(&'ast Regex), + RestPat(&'ast RestPat<'ast>), + ReturnStmt(&'ast ReturnStmt<'ast>), + Script(&'ast Script<'ast>), + SeqExpr(&'ast SeqExpr<'ast>), + SetterProp(&'ast SetterProp<'ast>), + SimpleAssignTarget(&'ast SimpleAssignTarget<'ast>), + SpreadElement(&'ast SpreadElement<'ast>), + StaticBlock(&'ast StaticBlock<'ast>), + Stmt(&'ast Stmt<'ast>), + Str(&'ast Str), + Super(&'ast Super), + SuperProp(&'ast SuperProp<'ast>), + SuperPropExpr(&'ast SuperPropExpr<'ast>), + SwitchCase(&'ast SwitchCase<'ast>), + SwitchStmt(&'ast SwitchStmt<'ast>), + TaggedTpl(&'ast TaggedTpl<'ast>), + ThisExpr(&'ast ThisExpr), + ThrowStmt(&'ast ThrowStmt<'ast>), + Tpl(&'ast Tpl<'ast>), + TplElement(&'ast TplElement), + TruePlusMinus(&'ast TruePlusMinus), + TryStmt(&'ast TryStmt<'ast>), + TsArrayType(&'ast TsArrayType<'ast>), + TsAsExpr(&'ast TsAsExpr<'ast>), + TsCallSignatureDecl(&'ast TsCallSignatureDecl<'ast>), + TsConditionalType(&'ast TsConditionalType<'ast>), + TsConstAssertion(&'ast TsConstAssertion<'ast>), + TsConstructSignatureDecl(&'ast TsConstructSignatureDecl<'ast>), + TsConstructorType(&'ast TsConstructorType<'ast>), + TsEntityName(&'ast TsEntityName<'ast>), + TsEnumDecl(&'ast TsEnumDecl<'ast>), + TsEnumMember(&'ast TsEnumMember<'ast>), + TsEnumMemberId(&'ast TsEnumMemberId<'ast>), + TsExportAssignment(&'ast TsExportAssignment<'ast>), + TsExprWithTypeArgs(&'ast TsExprWithTypeArgs<'ast>), + TsExternalModuleRef(&'ast TsExternalModuleRef), + TsFnOrConstructorType(&'ast TsFnOrConstructorType<'ast>), + TsFnParam(&'ast TsFnParam<'ast>), + TsFnType(&'ast TsFnType<'ast>), + TsGetterSignature(&'ast TsGetterSignature<'ast>), + TsImportEqualsDecl(&'ast TsImportEqualsDecl<'ast>), + TsImportType(&'ast TsImportType<'ast>), + TsIndexSignature(&'ast TsIndexSignature<'ast>), + TsIndexedAccessType(&'ast TsIndexedAccessType<'ast>), + TsInferType(&'ast TsInferType<'ast>), + TsInstantiation(&'ast TsInstantiation<'ast>), + TsInterfaceBody(&'ast TsInterfaceBody<'ast>), + TsInterfaceDecl(&'ast TsInterfaceDecl<'ast>), + TsIntersectionType(&'ast TsIntersectionType<'ast>), + TsKeywordType(&'ast TsKeywordType), + TsKeywordTypeKind(&'ast TsKeywordTypeKind), + TsLit(&'ast TsLit<'ast>), + TsLitType(&'ast TsLitType<'ast>), + TsMappedType(&'ast TsMappedType<'ast>), + TsMethodSignature(&'ast TsMethodSignature<'ast>), + TsModuleBlock(&'ast TsModuleBlock<'ast>), + TsModuleDecl(&'ast TsModuleDecl<'ast>), + TsModuleName(&'ast TsModuleName<'ast>), + TsModuleRef(&'ast TsModuleRef<'ast>), + TsNamespaceBody(&'ast TsNamespaceBody<'ast>), + TsNamespaceDecl(&'ast TsNamespaceDecl<'ast>), + TsNamespaceExportDecl(&'ast TsNamespaceExportDecl), + TsNonNullExpr(&'ast TsNonNullExpr<'ast>), + TsOptionalType(&'ast TsOptionalType<'ast>), + TsParamProp(&'ast TsParamProp<'ast>), + TsParamPropParam(&'ast TsParamPropParam<'ast>), + TsParenthesizedType(&'ast TsParenthesizedType<'ast>), + TsPropertySignature(&'ast TsPropertySignature<'ast>), + TsQualifiedName(&'ast TsQualifiedName<'ast>), + TsRestType(&'ast TsRestType<'ast>), + TsSatisfiesExpr(&'ast TsSatisfiesExpr<'ast>), + TsSetterSignature(&'ast TsSetterSignature<'ast>), + TsThisType(&'ast TsThisType), + TsThisTypeOrIdent(&'ast TsThisTypeOrIdent<'ast>), + TsTplLitType(&'ast TsTplLitType<'ast>), + TsTupleElement(&'ast TsTupleElement<'ast>), + TsTupleType(&'ast TsTupleType<'ast>), + TsType(&'ast TsType<'ast>), + TsTypeAliasDecl(&'ast TsTypeAliasDecl<'ast>), + TsTypeAnn(&'ast TsTypeAnn<'ast>), + TsTypeAssertion(&'ast TsTypeAssertion<'ast>), + TsTypeElement(&'ast TsTypeElement<'ast>), + TsTypeLit(&'ast TsTypeLit<'ast>), + TsTypeOperator(&'ast TsTypeOperator<'ast>), + TsTypeOperatorOp(&'ast TsTypeOperatorOp), + TsTypeParam(&'ast TsTypeParam<'ast>), + TsTypeParamDecl(&'ast TsTypeParamDecl<'ast>), + TsTypeParamInstantiation(&'ast TsTypeParamInstantiation<'ast>), + TsTypePredicate(&'ast TsTypePredicate<'ast>), + TsTypeQuery(&'ast TsTypeQuery<'ast>), + TsTypeQueryExpr(&'ast TsTypeQueryExpr<'ast>), + TsTypeRef(&'ast TsTypeRef<'ast>), + TsUnionOrIntersectionType(&'ast TsUnionOrIntersectionType<'ast>), + TsUnionType(&'ast TsUnionType<'ast>), + UnaryExpr(&'ast UnaryExpr<'ast>), + UpdateExpr(&'ast UpdateExpr<'ast>), + UsingDecl(&'ast UsingDecl<'ast>), + VarDecl(&'ast VarDecl<'ast>), + VarDeclKind(&'ast VarDeclKind), + VarDeclOrExpr(&'ast VarDeclOrExpr<'ast>), + VarDeclarator(&'ast VarDeclarator<'ast>), + WhileStmt(&'ast WhileStmt<'ast>), + WithStmt(&'ast WithStmt<'ast>), + YieldExpr(&'ast YieldExpr<'ast>), +} +impl<'ast> NodeRef<'ast> { + #[doc = r" This is not a part of semver-stable API. It is experimental and subject to change."] + #[allow(unreachable_patterns)] + pub fn experimental_raw_children<'a>( + &'a self, + ) -> std::boxed::Box>> { + match self { + NodeRef::Accessibility(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ArrayLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.elems.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))) + }), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ArrayPat(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.elems.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))) + })) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::ArrowExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain(::std::iter::once(NodeRef::BlockStmtOrExpr(&node.body))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.return_type.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::AssignExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::AssignTarget(&node.left))) + .chain(::std::iter::once(NodeRef::Expr(&node.right))); + std::boxed::Box::new(iterator) + } + NodeRef::AssignPat(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Pat(&node.left))) + .chain(::std::iter::once(NodeRef::Expr(&node.right))); + std::boxed::Box::new(iterator) + } + NodeRef::AssignPatProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BindingIdent(&node.key))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::AssignProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.key))) + .chain(::std::iter::once(NodeRef::Expr(&node.value))); + std::boxed::Box::new(iterator) + } + NodeRef::AssignTarget(node) => match node { + AssignTarget::Simple(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SimpleAssignTarget(v0))) + } + AssignTarget::Pat(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AssignTargetPat(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::AssignTargetPat(node) => match node { + AssignTargetPat::Array(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ArrayPat(v0))) + } + AssignTargetPat::Object(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ObjectPat(v0))) + } + AssignTargetPat::Invalid(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Invalid(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::AutoAccessor(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Key(&node.key))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::AwaitExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.arg))); + std::boxed::Box::new(iterator) + } + NodeRef::BigInt(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::BinExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.left))) + .chain(::std::iter::once(NodeRef::Expr(&node.right))); + std::boxed::Box::new(iterator) + } + NodeRef::BindingIdent(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::BlockStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.stmts + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::BlockStmtOrExpr(node) => match node { + BlockStmtOrExpr::BlockStmt(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BlockStmt(v0))) + } + BlockStmtOrExpr::Expr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Expr(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Bool(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::BreakStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::CallExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Callee(&node.callee))) + .chain( + node.args + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::Callee(node) => match node { + Callee::Super(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Super(v0))), + Callee::Import(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Import(v0))), + Callee::Expr(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::CatchClause(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.param + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain(::std::iter::once(NodeRef::BlockStmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::Class(node) => { + let iterator = + ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ClassMember(&item))), + ) + .chain( + node.super_class + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.super_type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })) + .chain(node.implements.iter().flat_map(|item| { + ::std::iter::once(NodeRef::TsExprWithTypeArgs(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::ClassDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.ident))) + .chain({ + let item = &*node.class; + ::std::iter::once(NodeRef::Class(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::ClassExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.ident + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.class; + ::std::iter::once(NodeRef::Class(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::ClassMember(node) => match node { + ClassMember::Constructor(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Constructor(v0))) + } + ClassMember::Method(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ClassMethod(v0))) + } + ClassMember::PrivateMethod(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::PrivateMethod(v0))) + } + ClassMember::ClassProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ClassProp(v0))) + } + ClassMember::PrivateProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::PrivateProp(v0))) + } + ClassMember::TsIndexSignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsIndexSignature(v0))) + } + ClassMember::Empty(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::EmptyStmt(v0))) + } + ClassMember::StaticBlock(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::StaticBlock(v0))) + } + ClassMember::AutoAccessor(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AutoAccessor(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ClassMethod(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }) + .chain(::std::iter::once(NodeRef::MethodKind(&node.kind))) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ClassProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ComputedPropName(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::CondExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.test))) + .chain(::std::iter::once(NodeRef::Expr(&node.cons))) + .chain(::std::iter::once(NodeRef::Expr(&node.alt))); + std::boxed::Box::new(iterator) + } + NodeRef::Constructor(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ParamOrTsParamProp(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ContinueStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::DebuggerStmt(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::Decl(node) => match node { + Decl::Class(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ClassDecl(v0))), + Decl::Fn(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::FnDecl(v0))), + Decl::Var(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::VarDecl(v0))), + Decl::Using(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::UsingDecl(v0))), + Decl::TsInterface(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsInterfaceDecl(v0))) + } + Decl::TsTypeAlias(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeAliasDecl(v0))) + } + Decl::TsEnum(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsEnumDecl(v0))) + } + Decl::TsModule(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsModuleDecl(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Decorator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::DefaultDecl(node) => match node { + DefaultDecl::Class(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ClassExpr(v0))) + } + DefaultDecl::Fn(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::FnExpr(v0))), + DefaultDecl::TsInterfaceDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsInterfaceDecl(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::DoWhileStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.test))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::EmptyStmt(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::ExportAll(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.src; + ::std::iter::once(NodeRef::Str(&item)) + }) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::ExportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Decl(&node.decl))); + std::boxed::Box::new(iterator) + } + NodeRef::ExportDefaultDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::DefaultDecl(&node.decl))); + std::boxed::Box::new(iterator) + } + NodeRef::ExportDefaultExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::ExportDefaultSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.exported))); + std::boxed::Box::new(iterator) + } + NodeRef::ExportNamedSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ModuleExportName(&node.orig))) + .chain( + node.exported + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleExportName(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ExportNamespaceSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ModuleExportName(&node.name))); + std::boxed::Box::new(iterator) + } + NodeRef::ExportSpecifier(node) => match node { + ExportSpecifier::Namespace(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportNamespaceSpecifier(v0))) + } + ExportSpecifier::Default(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportDefaultSpecifier(v0))) + } + ExportSpecifier::Named(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportNamedSpecifier(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Expr(node) => match node { + Expr::This(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ThisExpr(v0))), + Expr::Array(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ArrayLit(v0))), + Expr::Object(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ObjectLit(v0))), + Expr::Fn(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::FnExpr(v0))), + Expr::Unary(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::UnaryExpr(v0))), + Expr::Update(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::UpdateExpr(v0))) + } + Expr::Bin(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::BinExpr(v0))), + Expr::Assign(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AssignExpr(v0))) + } + Expr::Member(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::MemberExpr(v0))) + } + Expr::SuperProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SuperPropExpr(v0))) + } + Expr::Cond(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::CondExpr(v0))), + Expr::Call(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::CallExpr(v0))), + Expr::New(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::NewExpr(v0))), + Expr::Seq(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::SeqExpr(v0))), + Expr::Ident(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))), + Expr::Lit(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Lit(v0))), + Expr::Tpl(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Tpl(v0))), + Expr::TaggedTpl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TaggedTpl(v0))) + } + Expr::Arrow(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ArrowExpr(v0))), + Expr::Class(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ClassExpr(v0))), + Expr::Yield(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::YieldExpr(v0))), + Expr::MetaProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::MetaPropExpr(v0))) + } + Expr::Await(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::AwaitExpr(v0))), + Expr::Paren(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ParenExpr(v0))), + Expr::JSXMember(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))) + } + Expr::JSXNamespacedName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + Expr::JSXEmpty(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXEmptyExpr(v0))) + } + Expr::JSXElement(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXElement(v0))) + } + Expr::JSXFragment(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXFragment(v0))) + } + Expr::TsTypeAssertion(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeAssertion(v0))) + } + Expr::TsConstAssertion(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsConstAssertion(v0))) + } + Expr::TsNonNull(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsNonNullExpr(v0))) + } + Expr::TsAs(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::TsAsExpr(v0))), + Expr::TsInstantiation(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsInstantiation(v0))) + } + Expr::TsSatisfies(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsSatisfiesExpr(v0))) + } + Expr::PrivateName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::PrivateName(v0))) + } + Expr::OptChain(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::OptChainExpr(v0))) + } + Expr::Invalid(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Invalid(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ExprOrSpread(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::ExprStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::FnDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.ident))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::FnExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.ident + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::ForHead(node) => match node { + ForHead::VarDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::VarDecl(v0))) + } + ForHead::UsingDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::UsingDecl(v0))) + } + ForHead::Pat(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Pat(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ForInStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ForHead(&node.left))) + .chain(::std::iter::once(NodeRef::Expr(&node.right))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::ForOfStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ForHead(&node.left))) + .chain(::std::iter::once(NodeRef::Expr(&node.right))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::ForStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.init + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclOrExpr(&item))), + ) + .chain( + node.test + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain( + node.update + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::Function(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Param(&item))), + ) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.return_type.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::GetterProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::Ident(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::IdentName(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::IfStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.test))) + .chain(::std::iter::once(NodeRef::Stmt(&node.cons))) + .chain( + node.alt + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::Import(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ImportPhase(&node.phase))); + std::boxed::Box::new(iterator) + } + NodeRef::ImportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.specifiers + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ImportSpecifier(&item))), + ) + .chain({ + let item = &*node.src; + ::std::iter::once(NodeRef::Str(&item)) + }) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })) + .chain(::std::iter::once(NodeRef::ImportPhase(&node.phase))); + std::boxed::Box::new(iterator) + } + NodeRef::ImportDefaultSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))); + std::boxed::Box::new(iterator) + } + NodeRef::ImportNamedSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))) + .chain( + node.imported + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleExportName(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ImportPhase(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportSpecifier(node) => match node { + ImportSpecifier::Named(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ImportNamedSpecifier(v0))) + } + ImportSpecifier::Default(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ImportDefaultSpecifier(v0))) + } + ImportSpecifier::Namespace(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ImportStarAsSpecifier(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportStarAsSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))); + std::boxed::Box::new(iterator) + } + NodeRef::ImportWith(node) => { + let iterator = ::std::iter::empty::>().chain( + node.values + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ImportWithItem(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ImportWithItem(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::IdentName(&node.key))) + .chain(::std::iter::once(NodeRef::Str(&node.value))); + std::boxed::Box::new(iterator) + } + NodeRef::Invalid(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::JSXAttr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXAttrName(&node.name))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXAttrValue(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::JSXAttrName(node) => match node { + JSXAttrName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::IdentName(v0))) + } + JSXAttrName::JSXNamespacedName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXAttrOrSpread(node) => match node { + JSXAttrOrSpread::JSXAttr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXAttr(v0))) + } + JSXAttrOrSpread::SpreadElement(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SpreadElement(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXAttrValue(node) => match node { + JSXAttrValue::Lit(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Lit(v0))), + JSXAttrValue::JSXExprContainer(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXExprContainer(v0))) + } + JSXAttrValue::JSXElement(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXElement(v0))) + } + JSXAttrValue::JSXFragment(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXFragment(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXClosingElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXElementName(&node.name))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXClosingFragment(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::JSXElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXOpeningElement(&node.opening))) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXElementChild(&item))), + ) + .chain( + node.closing + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXClosingElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::JSXElementChild(node) => match node { + JSXElementChild::JSXText(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXText(v0))) + } + JSXElementChild::JSXExprContainer(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXExprContainer(v0))) + } + JSXElementChild::JSXSpreadChild(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXSpreadChild(v0))) + } + JSXElementChild::JSXElement(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXElement(v0))) + } + JSXElementChild::JSXFragment(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXFragment(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXElementName(node) => match node { + JSXElementName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + JSXElementName::JSXMemberExpr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))) + } + JSXElementName::JSXNamespacedName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXEmptyExpr(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::JSXExpr(node) => match node { + JSXExpr::JSXEmptyExpr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXEmptyExpr(v0))) + } + JSXExpr::Expr(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXExprContainer(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXExpr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXFragment(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXOpeningFragment( + &node.opening, + ))) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXElementChild(&item))), + ) + .chain(::std::iter::once(NodeRef::JSXClosingFragment( + &node.closing, + ))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXMemberExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXObject(&node.obj))) + .chain(::std::iter::once(NodeRef::IdentName(&node.prop))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXNamespacedName(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::IdentName(&node.ns))) + .chain(::std::iter::once(NodeRef::IdentName(&node.name))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXObject(node) => match node { + JSXObject::JSXMemberExpr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))) + } + JSXObject::Ident(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXOpeningElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXElementName(&node.name))) + .chain( + node.attrs + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXAttrOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::JSXOpeningFragment(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::JSXSpreadChild(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::JSXText(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::Key(node) => match node { + Key::Private(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::PrivateName(v0))) + } + Key::Public(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::PropName(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::KeyValuePatProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain(::std::iter::once(NodeRef::Pat(&node.value))); + std::boxed::Box::new(iterator) + } + NodeRef::KeyValueProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain(::std::iter::once(NodeRef::Expr(&node.value))); + std::boxed::Box::new(iterator) + } + NodeRef::LabeledStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.label))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::Lit(node) => match node { + Lit::Str(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))), + Lit::Bool(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Bool(v0))), + Lit::Null(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Null(v0))), + Lit::Num(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Number(v0))), + Lit::BigInt(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::BigInt(v0))), + Lit::Regex(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Regex(v0))), + Lit::JSXText(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::JSXText(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::MemberExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.obj))) + .chain(::std::iter::once(NodeRef::MemberProp(&node.prop))); + std::boxed::Box::new(iterator) + } + NodeRef::MemberProp(node) => match node { + MemberProp::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::IdentName(v0))) + } + MemberProp::PrivateName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::PrivateName(v0))) + } + MemberProp::Computed(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::MetaPropExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::MetaPropKind(&node.kind))); + std::boxed::Box::new(iterator) + } + NodeRef::MetaPropKind(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::MethodKind(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::MethodProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::Module(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleItem(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ModuleDecl(node) => match node { + ModuleDecl::Import(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ImportDecl(v0))) + } + ModuleDecl::ExportDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportDecl(v0))) + } + ModuleDecl::ExportNamed(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::NamedExport(v0))) + } + ModuleDecl::ExportDefaultDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportDefaultDecl(v0))) + } + ModuleDecl::ExportDefaultExpr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportDefaultExpr(v0))) + } + ModuleDecl::ExportAll(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ExportAll(v0))) + } + ModuleDecl::TsImportEquals(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsImportEqualsDecl(v0))) + } + ModuleDecl::TsExportAssignment(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsExportAssignment(v0))) + } + ModuleDecl::TsNamespaceExport(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsNamespaceExportDecl(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ModuleExportName(node) => match node { + ModuleExportName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + ModuleExportName::Str(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ModuleItem(node) => match node { + ModuleItem::ModuleDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ModuleDecl(v0))) + } + ModuleItem::Stmt(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Stmt(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::NamedExport(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.specifiers + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExportSpecifier(&item))), + ) + .chain(node.src.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Str(&item)) + })) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::NewExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.callee))) + .chain(node.args.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))) + })) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::Null(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::Number(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::ObjectLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.props + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::PropOrSpread(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::ObjectPat(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.props + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ObjectPatProp(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::ObjectPatProp(node) => match node { + ObjectPatProp::KeyValue(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::KeyValuePatProp(v0))) + } + ObjectPatProp::Assign(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AssignPatProp(v0))) + } + ObjectPatProp::Rest(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::RestPat(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::OptCall(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.callee))) + .chain( + node.args + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::OptChainBase(node) => match node { + OptChainBase::Member(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::MemberExpr(v0))) + } + OptChainBase::Call(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::OptCall(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::OptChainExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::OptChainBase(&node.base))); + std::boxed::Box::new(iterator) + } + NodeRef::Param(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain(::std::iter::once(NodeRef::Pat(&node.pat))); + std::boxed::Box::new(iterator) + } + NodeRef::ParamOrTsParamProp(node) => match node { + ParamOrTsParamProp::TsParamProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsParamProp(v0))) + } + ParamOrTsParamProp::Param(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Param(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::ParenExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::Pat(node) => match node { + Pat::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + Pat::Array(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ArrayPat(v0))), + Pat::Rest(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::RestPat(v0))), + Pat::Object(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ObjectPat(v0))), + Pat::Assign(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::AssignPat(v0))), + Pat::Invalid(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Invalid(v0))), + Pat::Expr(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::PrivateMethod(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PrivateName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }) + .chain(::std::iter::once(NodeRef::MethodKind(&node.kind))) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::PrivateName(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::PrivateProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PrivateName(&node.key))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::Program(node) => match node { + Program::Module(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Module(v0))), + Program::Script(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Script(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Prop(node) => match node { + Prop::Shorthand(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))), + Prop::KeyValue(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::KeyValueProp(v0))) + } + Prop::Assign(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AssignProp(v0))) + } + Prop::Getter(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::GetterProp(v0))) + } + Prop::Setter(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SetterProp(v0))) + } + Prop::Method(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::MethodProp(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::PropName(node) => match node { + PropName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::IdentName(v0))) + } + PropName::Str(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))), + PropName::Num(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Number(v0))), + PropName::Computed(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + PropName::BigInt(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BigInt(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::PropOrSpread(node) => match node { + PropOrSpread::Spread(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SpreadElement(v0))) + } + PropOrSpread::Prop(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Prop(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Regex(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::RestPat(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Pat(&node.arg))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::ReturnStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.arg + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::Script(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::SeqExpr(node) => { + let iterator = ::std::iter::empty::>().chain( + node.exprs + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::SetterProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain( + node.this_param + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain(::std::iter::once(NodeRef::Pat(&node.param))) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::SimpleAssignTarget(node) => match node { + SimpleAssignTarget::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + SimpleAssignTarget::Member(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::MemberExpr(v0))) + } + SimpleAssignTarget::SuperProp(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SuperPropExpr(v0))) + } + SimpleAssignTarget::Paren(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ParenExpr(v0))) + } + SimpleAssignTarget::OptChain(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::OptChainExpr(v0))) + } + SimpleAssignTarget::TsAs(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsAsExpr(v0))) + } + SimpleAssignTarget::TsSatisfies(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsSatisfiesExpr(v0))) + } + SimpleAssignTarget::TsNonNull(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsNonNullExpr(v0))) + } + SimpleAssignTarget::TsTypeAssertion(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeAssertion(v0))) + } + SimpleAssignTarget::TsInstantiation(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsInstantiation(v0))) + } + SimpleAssignTarget::Invalid(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Invalid(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::SpreadElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::StaticBlock(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BlockStmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::Stmt(node) => match node { + Stmt::Block(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::BlockStmt(v0))), + Stmt::Empty(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::EmptyStmt(v0))), + Stmt::Debugger(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::DebuggerStmt(v0))) + } + Stmt::With(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::WithStmt(v0))), + Stmt::Return(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ReturnStmt(v0))) + } + Stmt::Labeled(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::LabeledStmt(v0))) + } + Stmt::Break(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::BreakStmt(v0))), + Stmt::Continue(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ContinueStmt(v0))) + } + Stmt::If(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::IfStmt(v0))), + Stmt::Switch(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::SwitchStmt(v0))) + } + Stmt::Throw(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ThrowStmt(v0))), + Stmt::Try(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::TryStmt(v0))), + Stmt::While(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::WhileStmt(v0))), + Stmt::DoWhile(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::DoWhileStmt(v0))) + } + Stmt::For(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ForStmt(v0))), + Stmt::ForIn(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ForInStmt(v0))), + Stmt::ForOf(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ForOfStmt(v0))), + Stmt::Decl(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Decl(v0))), + Stmt::Expr(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::ExprStmt(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::Str(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::Super(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::SuperProp(node) => match node { + SuperProp::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::IdentName(v0))) + } + SuperProp::Computed(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::SuperPropExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Super(&node.obj))) + .chain(::std::iter::once(NodeRef::SuperProp(&node.prop))); + std::boxed::Box::new(iterator) + } + NodeRef::SwitchCase(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.test + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain( + node.cons + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::SwitchStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.discriminant))) + .chain( + node.cases + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::SwitchCase(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TaggedTpl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.tag))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })) + .chain({ + let item = &*node.tpl; + ::std::iter::once(NodeRef::Tpl(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::ThisExpr(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::ThrowStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.arg))); + std::boxed::Box::new(iterator) + } + NodeRef::Tpl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.exprs + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ) + .chain( + node.quasis + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TplElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TplElement(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::TruePlusMinus(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TryStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BlockStmt(&node.block))) + .chain( + node.handler + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CatchClause(&item))), + ) + .chain( + node.finalizer + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsArrayType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.elem_type))); + std::boxed::Box::new(iterator) + } + NodeRef::TsAsExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))) + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsCallSignatureDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsConditionalType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.check_type))) + .chain(::std::iter::once(NodeRef::TsType(&node.extends_type))) + .chain(::std::iter::once(NodeRef::TsType(&node.true_type))) + .chain(::std::iter::once(NodeRef::TsType(&node.false_type))); + std::boxed::Box::new(iterator) + } + NodeRef::TsConstAssertion(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::TsConstructSignatureDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsConstructorType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::TsEntityName(node) => match node { + TsEntityName::TsQualifiedName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsQualifiedName(v0))) + } + TsEntityName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsEnumDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain( + node.members + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsEnumMember(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsEnumMember(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEnumMemberId(&node.id))) + .chain( + node.init + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsEnumMemberId(node) => match node { + TsEnumMemberId::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + TsEnumMemberId::Str(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsExportAssignment(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::TsExprWithTypeArgs(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsExternalModuleRef(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Str(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::TsFnOrConstructorType(node) => match node { + TsFnOrConstructorType::TsFnType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsFnType(v0))) + } + TsFnOrConstructorType::TsConstructorType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsConstructorType(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsFnParam(node) => match node { + TsFnParam::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + TsFnParam::Array(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ArrayPat(v0))) + } + TsFnParam::Rest(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::RestPat(v0))) + } + TsFnParam::Object(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::ObjectPat(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsFnType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::TsGetterSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.key))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsImportEqualsDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(::std::iter::once(NodeRef::TsModuleRef(&node.module_ref))); + std::boxed::Box::new(iterator) + } + NodeRef::TsImportType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Str(&node.arg))) + .chain( + node.qualifier + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsEntityName(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsIndexSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsIndexedAccessType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.obj_type))) + .chain(::std::iter::once(NodeRef::TsType(&node.index_type))); + std::boxed::Box::new(iterator) + } + NodeRef::TsInferType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeParam(&node.type_param))); + std::boxed::Box::new(iterator) + } + NodeRef::TsInstantiation(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))) + .chain({ + let item = &*node.type_args; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::TsInterfaceBody(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsInterfaceDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain( + node.extends + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsExprWithTypeArgs(&item))), + ) + .chain(::std::iter::once(NodeRef::TsInterfaceBody(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::TsIntersectionType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.types + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsKeywordType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsKeywordTypeKind(&node.kind))); + std::boxed::Box::new(iterator) + } + NodeRef::TsKeywordTypeKind(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsLit(node) => match node { + TsLit::Number(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Number(v0))), + TsLit::Str(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))), + TsLit::Bool(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Bool(v0))), + TsLit::BigInt(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::BigInt(v0))), + TsLit::Tpl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTplLitType(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsLitType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsLit(&node.lit))); + std::boxed::Box::new(iterator) + } + NodeRef::TsMappedType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.readonly + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TruePlusMinus(&item))), + ) + .chain(::std::iter::once(NodeRef::TsTypeParam(&node.type_param))) + .chain( + node.name_type + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ) + .chain( + node.optional + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TruePlusMinus(&item))), + ) + .chain( + node.type_ann + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsMethodSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.key))) + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsModuleBlock(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleItem(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsModuleDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsModuleName(&node.id))) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsNamespaceBody(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsModuleName(node) => match node { + TsModuleName::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + TsModuleName::Str(v0) => std::boxed::Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsModuleRef(node) => match node { + TsModuleRef::TsEntityName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsEntityName(v0))) + } + TsModuleRef::TsExternalModuleRef(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsExternalModuleRef(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsNamespaceBody(node) => match node { + TsNamespaceBody::TsModuleBlock(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsModuleBlock(v0))) + } + TsNamespaceBody::TsNamespaceDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsNamespaceDecl(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsNamespaceDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::TsNamespaceBody(&item)) + }); + std::boxed::Box::new(iterator) + } + NodeRef::TsNamespaceExportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))); + std::boxed::Box::new(iterator) + } + NodeRef::TsNonNullExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))); + std::boxed::Box::new(iterator) + } + NodeRef::TsOptionalType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsParamProp(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ) + .chain(::std::iter::once(NodeRef::TsParamPropParam(&node.param))); + std::boxed::Box::new(iterator) + } + NodeRef::TsParamPropParam(node) => match node { + TsParamPropParam::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + TsParamPropParam::Assign(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::AssignPat(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsParenthesizedType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsPropertySignature(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.key))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsQualifiedName(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEntityName(&node.left))) + .chain(::std::iter::once(NodeRef::IdentName(&node.right))); + std::boxed::Box::new(iterator) + } + NodeRef::TsRestType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsSatisfiesExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))) + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsSetterSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.key))) + .chain(::std::iter::once(NodeRef::TsFnParam(&node.param))); + std::boxed::Box::new(iterator) + } + NodeRef::TsThisType(node) => { + let iterator = ::std::iter::empty::>(); + std::boxed::Box::new(iterator) + } + NodeRef::TsThisTypeOrIdent(node) => match node { + TsThisTypeOrIdent::TsThisType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsThisType(v0))) + } + TsThisTypeOrIdent::Ident(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTplLitType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.types + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ) + .chain( + node.quasis + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TplElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsTupleElement(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain(::std::iter::once(NodeRef::TsType(&node.ty))); + std::boxed::Box::new(iterator) + } + NodeRef::TsTupleType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.elem_types + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTupleElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsType(node) => match node { + TsType::TsKeywordType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsKeywordType(v0))) + } + TsType::TsThisType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsThisType(v0))) + } + TsType::TsFnOrConstructorType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsFnOrConstructorType(v0))) + } + TsType::TsTypeRef(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeRef(v0))) + } + TsType::TsTypeQuery(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeQuery(v0))) + } + TsType::TsTypeLit(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeLit(v0))) + } + TsType::TsArrayType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsArrayType(v0))) + } + TsType::TsTupleType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTupleType(v0))) + } + TsType::TsOptionalType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsOptionalType(v0))) + } + TsType::TsRestType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsRestType(v0))) + } + TsType::TsUnionOrIntersectionType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsUnionOrIntersectionType(v0))) + } + TsType::TsConditionalType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsConditionalType(v0))) + } + TsType::TsInferType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsInferType(v0))) + } + TsType::TsParenthesizedType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsParenthesizedType(v0))) + } + TsType::TsTypeOperator(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypeOperator(v0))) + } + TsType::TsIndexedAccessType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsIndexedAccessType(v0))) + } + TsType::TsMappedType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsMappedType(v0))) + } + TsType::TsLitType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsLitType(v0))) + } + TsType::TsTypePredicate(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsTypePredicate(v0))) + } + TsType::TsImportType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsImportType(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeAliasDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeAnn(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeAssertion(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.expr))) + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeElement(node) => match node { + TsTypeElement::TsCallSignatureDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsCallSignatureDecl(v0))) + } + TsTypeElement::TsConstructSignatureDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsConstructSignatureDecl(v0))) + } + TsTypeElement::TsPropertySignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsPropertySignature(v0))) + } + TsTypeElement::TsGetterSignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsGetterSignature(v0))) + } + TsTypeElement::TsSetterSignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsSetterSignature(v0))) + } + TsTypeElement::TsMethodSignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsMethodSignature(v0))) + } + TsTypeElement::TsIndexSignature(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsIndexSignature(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.members + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeElement(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeOperator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeOperatorOp(&node.op))) + .chain(::std::iter::once(NodeRef::TsType(&node.type_ann))); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeOperatorOp(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeParam(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))) + .chain( + node.constraint + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ) + .chain( + node.default + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeParamDecl(node) => { + let iterator = ::std::iter::empty::>().chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeParam(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeParamInstantiation(node) => { + let iterator = ::std::iter::empty::>().chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypePredicate(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsThisTypeOrIdent( + &node.param_name, + ))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeQuery(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeQueryExpr(&node.expr_name))) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsTypeQueryExpr(node) => match node { + TsTypeQueryExpr::TsEntityName(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsEntityName(v0))) + } + TsTypeQueryExpr::Import(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsImportType(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeRef(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEntityName(&node.type_name))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + std::boxed::Box::new(iterator) + } + NodeRef::TsUnionOrIntersectionType(node) => match node { + TsUnionOrIntersectionType::TsUnionType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsUnionType(v0))) + } + TsUnionOrIntersectionType::TsIntersectionType(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::TsIntersectionType(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::TsUnionType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.types + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsType(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::UnaryExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.arg))); + std::boxed::Box::new(iterator) + } + NodeRef::UpdateExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.arg))); + std::boxed::Box::new(iterator) + } + NodeRef::UsingDecl(node) => { + let iterator = ::std::iter::empty::>().chain( + node.decls + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclarator(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::VarDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::VarDeclKind(&node.kind))) + .chain( + node.decls + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclarator(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::VarDeclKind(node) => match node { + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::VarDeclOrExpr(node) => match node { + VarDeclOrExpr::VarDecl(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::VarDecl(v0))) + } + VarDeclOrExpr::Expr(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::Expr(v0))) + } + _ => std::boxed::Box::new(::std::iter::empty::>()), + }, + NodeRef::VarDeclarator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Pat(&node.name))) + .chain( + node.init + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + NodeRef::WhileStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.test))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::WithStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Expr(&node.obj))) + .chain(::std::iter::once(NodeRef::Stmt(&node.body))); + std::boxed::Box::new(iterator) + } + NodeRef::YieldExpr(node) => { + let iterator = ::std::iter::empty::>().chain( + node.arg + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Expr(&item))), + ); + std::boxed::Box::new(iterator) + } + } + } +} +impl<'ast> NodeRef<'ast> { + #[doc = r" Visit all nodes in self in preorder."] + #[doc = r""] + #[doc = r" This is not a part of semver-stable API. It is"] + #[doc = r" experimental and subject to change."] + pub fn experimental_traverse( + &'ast self, + ) -> std::boxed::Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + std::boxed::Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } +} +#[cfg(any(docsrs, feature = "path"))] +pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_ecma_visit/src/arena/mod.rs b/crates/swc_ecma_visit/src/arena/mod.rs new file mode 100644 index 000000000000..36abe7111255 --- /dev/null +++ b/crates/swc_ecma_visit/src/arena/mod.rs @@ -0,0 +1,842 @@ +// This is not a public api. +#![cfg_attr(docsrs, feature(doc_cfg))] +#![deny(clippy::all)] +#![allow(clippy::ptr_arg)] + +#[doc(hidden)] +pub extern crate swc_ecma_ast; + +use std::{borrow::Cow, fmt::Debug}; + +use swc_allocator::arena::{Allocator, Vec}; +use swc_common::{arena::Take, pass::CompilerPass, Span, DUMMY_SP}; +use swc_ecma_ast::arena::*; +use swc_visit::{Repeat, Repeated}; + +pub use self::generated::*; +mod generated; + +pub fn fold_pass<'a, V>(allocator: &'a Allocator, pass: V) -> FoldPass<'a, V> +where + V: Fold<'a>, +{ + FoldPass { allocator, pass } +} + +pub struct FoldPass<'a, V> { + allocator: &'a Allocator, + pass: V, +} + +impl<'a, V> Pass<'a> for FoldPass<'a, V> +where + V: Fold<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + program.map_with_mut(self.allocator, |p| p.fold_with(&mut self.pass)); + } +} + +impl<'a, V> Fold<'a> for FoldPass<'a, V> +where + V: Fold<'a>, +{ + #[inline(always)] + fn fold_program(&mut self, node: Program<'a>) -> Program<'a> { + self.pass.fold_program(node) + } + + #[inline(always)] + fn fold_module(&mut self, node: Module<'a>) -> Module<'a> { + self.pass.fold_module(node) + } + + #[inline(always)] + fn fold_script(&mut self, node: Script<'a>) -> Script<'a> { + self.pass.fold_script(node) + } + + #[inline(always)] + fn fold_stmt(&mut self, node: Stmt<'a>) -> Stmt<'a> { + self.pass.fold_stmt(node) + } + + #[inline(always)] + fn fold_module_item(&mut self, item: ModuleItem<'a>) -> ModuleItem<'a> { + self.pass.fold_module_item(item) + } + + #[inline(always)] + fn fold_expr(&mut self, expr: Expr<'a>) -> Expr<'a> { + self.pass.fold_expr(expr) + } + + #[inline(always)] + fn fold_pat(&mut self, pat: Pat<'a>) -> Pat<'a> { + self.pass.fold_pat(pat) + } + + #[inline(always)] + fn fold_assign_target(&mut self, target: AssignTarget<'a>) -> AssignTarget<'a> { + self.pass.fold_assign_target(target) + } + + #[inline(always)] + fn fold_ident(&mut self, ident: Ident) -> Ident { + self.pass.fold_ident(ident) + } +} + +impl<'a, V> Repeated for FoldPass<'a, V> +where + V: Fold<'a> + Repeated, +{ + fn changed(&self) -> bool { + self.pass.changed() + } + + fn reset(&mut self) { + self.pass.reset(); + } +} + +impl<'a, V> CompilerPass for FoldPass<'a, V> +where + V: Fold<'a> + CompilerPass, +{ + fn name(&self) -> Cow<'static, str> { + self.pass.name() + } +} + +pub fn visit_mut_pass<'a, V>(pass: V) -> VisitMutPass +where + V: VisitMut<'a>, +{ + VisitMutPass { pass } +} + +pub struct VisitMutPass { + pass: V, +} + +impl<'a, V> Pass<'a> for VisitMutPass +where + V: VisitMut<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + program.visit_mut_with(&mut self.pass); + } +} + +impl<'a, V> VisitMut<'a> for VisitMutPass +where + V: VisitMut<'a>, +{ + #[inline(always)] + fn visit_mut_program(&mut self, program: &mut Program<'a>) { + self.pass.visit_mut_program(program); + } + + #[inline(always)] + fn visit_mut_module(&mut self, module: &mut Module<'a>) { + self.pass.visit_mut_module(module); + } + + #[inline(always)] + fn visit_mut_script(&mut self, script: &mut Script<'a>) { + self.pass.visit_mut_script(script); + } + + #[inline(always)] + fn visit_mut_module_item(&mut self, item: &mut ModuleItem<'a>) { + self.pass.visit_mut_module_item(item); + } + + #[inline(always)] + fn visit_mut_stmt(&mut self, stmt: &mut Stmt<'a>) { + self.pass.visit_mut_stmt(stmt); + } + + #[inline(always)] + fn visit_mut_expr(&mut self, expr: &mut Expr<'a>) { + self.pass.visit_mut_expr(expr); + } + + #[inline(always)] + fn visit_mut_pat(&mut self, pat: &mut Pat<'a>) { + self.pass.visit_mut_pat(pat); + } + + #[inline(always)] + fn visit_mut_assign_target(&mut self, target: &mut AssignTarget<'a>) { + self.pass.visit_mut_assign_target(target); + } + + #[inline(always)] + fn visit_mut_ident(&mut self, ident: &mut Ident) { + self.pass.visit_mut_ident(ident); + } +} + +impl<'a, V> Repeated for VisitMutPass +where + V: VisitMut<'a> + Repeated, +{ + fn changed(&self) -> bool { + self.pass.changed() + } + + fn reset(&mut self) { + self.pass.reset(); + } +} + +impl<'a, V> CompilerPass for VisitMutPass +where + V: VisitMut<'a> + CompilerPass, +{ + fn name(&self) -> Cow<'static, str> { + self.pass.name() + } +} + +pub fn visit_pass<'a, V>(pass: V) -> VisitPass +where + V: Visit<'a>, +{ + VisitPass { pass } +} + +pub struct VisitPass { + pass: V, +} + +impl<'a, V> Pass<'a> for VisitPass +where + V: Visit<'a>, +{ + #[inline(always)] + fn process(&mut self, program: &mut Program<'a>) { + program.visit_with(&mut self.pass); + } +} + +impl<'a, V> Repeated for VisitPass +where + V: Visit<'a> + Repeated, +{ + fn changed(&self) -> bool { + self.pass.changed() + } + + fn reset(&mut self) { + self.pass.reset(); + } +} + +impl<'a, V> CompilerPass for VisitPass +where + V: Visit<'a> + CompilerPass, +{ + fn name(&self) -> Cow<'static, str> { + self.pass.name() + } +} + +impl<'a, V> Fold<'a> for Repeat +where + V: Fold<'a> + Repeated, +{ + fn fold_program(&mut self, mut node: Program<'a>) -> Program<'a> { + loop { + self.pass.reset(); + node = node.fold_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + + node + } + + fn fold_module(&mut self, mut node: Module<'a>) -> Module<'a> { + loop { + self.pass.reset(); + node = node.fold_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + + node + } + + fn fold_script(&mut self, mut node: Script<'a>) -> Script<'a> { + loop { + self.pass.reset(); + node = node.fold_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + + node + } +} + +impl<'a, V> VisitMut<'a> for Repeat +where + V: VisitMut<'a> + Repeated, +{ + fn visit_mut_program(&mut self, node: &mut Program<'a>) { + loop { + self.pass.reset(); + node.visit_mut_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + } + + fn visit_mut_module(&mut self, node: &mut Module<'a>) { + loop { + self.pass.reset(); + node.visit_mut_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + } + + fn visit_mut_script(&mut self, node: &mut Script<'a>) { + loop { + self.pass.reset(); + node.visit_mut_with(&mut self.pass); + + if !self.pass.changed() { + break; + } + } + } +} + +/// Not a public api. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +struct SpanRemover; + +/// Returns a `Fold` which changes all span into `DUMMY_SP`. +pub fn span_remover<'a>() -> impl Debug + Fold<'a> + Copy + Eq + Default + 'static { + SpanRemover +} + +impl Fold<'_> for SpanRemover { + fn fold_span(&mut self, _: Span) -> Span { + DUMMY_SP + } +} + +#[macro_export] +macro_rules! assert_eq_ignore_span_arena { + ($l:expr, $r:expr) => {{ + use swc_ecma_visit::arena::FoldWith; + let l = $l.fold_with(&mut swc_ecma_visit::arena::span_remover()); + let r = $r.fold_with(&mut swc_ecma_visit::arena::span_remover()); + + assert_eq!(l, r); + }}; + + ($l:expr, $r:expr, $($tts:tt)*) => {{ + use swc_ecma_visit::arena::FoldWith; + let l = $l.fold_with(&mut swc_ecma_visit::arena::span_remover()); + let r = $r.fold_with(&mut swc_ecma_visit::arena::span_remover()); + + assert_eq!(l, r, $($tts)*); + }}; +} + +#[macro_export] +macro_rules! noop_visit_type_arena { + (fail) => { + noop_visit_type_arena!(visit_accessibility, Accessibility, fail); + noop_visit_type_arena!(visit_true_plus_minus, TruePlusMinus, fail); + noop_visit_type_arena!(visit_ts_array_type, TsArrayType, fail); + noop_visit_type_arena!(visit_ts_call_signature_decl, TsCallSignatureDecl, fail); + noop_visit_type_arena!(visit_ts_conditional_type, TsConditionalType, fail); + noop_visit_type_arena!( + visit_ts_construct_signature_decl, + TsConstructSignatureDecl, + fail + ); + noop_visit_type_arena!(visit_ts_constructor_type, TsConstructorType, fail); + noop_visit_type_arena!(visit_ts_entity_name, TsEntityName, fail); + noop_visit_type_arena!(visit_ts_expr_with_type_args, TsExprWithTypeArgs, fail); + noop_visit_type_arena!(visit_ts_fn_or_constructor_type, TsFnOrConstructorType, fail); + noop_visit_type_arena!(visit_ts_fn_param, TsFnParam, fail); + noop_visit_type_arena!(visit_ts_fn_type, TsFnType, fail); + noop_visit_type_arena!(visit_ts_import_type, TsImportType, fail); + noop_visit_type_arena!(visit_ts_index_signature, TsIndexSignature, fail); + noop_visit_type_arena!(visit_ts_indexed_access_type, TsIndexedAccessType, fail); + noop_visit_type_arena!(visit_ts_infer_type, TsInferType, fail); + noop_visit_type_arena!(visit_ts_interface_body, TsInterfaceBody, fail); + noop_visit_type_arena!(visit_ts_interface_decl, TsInterfaceDecl, fail); + noop_visit_type_arena!(visit_ts_intersection_type, TsIntersectionType, fail); + noop_visit_type_arena!(visit_ts_keyword_type, TsKeywordType, fail); + noop_visit_type_arena!(visit_ts_keyword_type_kind, TsKeywordTypeKind, fail); + noop_visit_type_arena!(visit_ts_mapped_type, TsMappedType, fail); + noop_visit_type_arena!(visit_ts_method_signature, TsMethodSignature, fail); + noop_visit_type_arena!(visit_ts_optional_type, TsOptionalType, fail); + noop_visit_type_arena!(visit_ts_parenthesized_type, TsParenthesizedType, fail); + noop_visit_type_arena!(visit_ts_property_signature, TsPropertySignature, fail); + noop_visit_type_arena!(visit_ts_qualified_name, TsQualifiedName, fail); + noop_visit_type_arena!(visit_ts_rest_type, TsRestType, fail); + noop_visit_type_arena!(visit_ts_this_type, TsThisType, fail); + noop_visit_type_arena!(visit_ts_this_type_or_ident, TsThisTypeOrIdent, fail); + noop_visit_type_arena!(visit_ts_tuple_type, TsTupleType, fail); + noop_visit_type_arena!(visit_ts_type, TsType, fail); + noop_visit_type_arena!(visit_ts_type_alias_decl, TsTypeAliasDecl, fail); + noop_visit_type_arena!(visit_ts_type_ann, TsTypeAnn, fail); + noop_visit_type_arena!(visit_ts_type_element, TsTypeElement, fail); + noop_visit_type_arena!(visit_ts_type_lit, TsTypeLit, fail); + noop_visit_type_arena!(visit_ts_type_operator, TsTypeOperator, fail); + noop_visit_type_arena!(visit_ts_type_operator_op, TsTypeOperatorOp, fail); + noop_visit_type_arena!(visit_ts_type_param, TsTypeParam, fail); + noop_visit_type_arena!(visit_ts_type_param_decl, TsTypeParamDecl, fail); + noop_visit_type_arena!( + visit_ts_type_param_instantiation, + TsTypeParamInstantiation, + fail + ); + noop_visit_type_arena!(visit_ts_type_predicate, TsTypePredicate, fail); + noop_visit_type_arena!(visit_ts_type_query, TsTypeQuery, fail); + noop_visit_type_arena!(visit_ts_type_query_expr, TsTypeQueryExpr, fail); + noop_visit_type_arena!(visit_ts_type_ref, TsTypeRef, fail); + noop_visit_type_arena!( + visit_ts_union_or_intersection_type, + TsUnionOrIntersectionType, + fail + ); + noop_visit_type_arena!(visit_ts_union_type, TsUnionType, fail); + }; + () => { + noop_visit_type_arena!(visit_accessibility, Accessibility); + noop_visit_type_arena!(visit_true_plus_minus, TruePlusMinus); + noop_visit_type_arena!(visit_ts_array_type, TsArrayType); + noop_visit_type_arena!(visit_ts_call_signature_decl, TsCallSignatureDecl); + noop_visit_type_arena!(visit_ts_conditional_type, TsConditionalType); + noop_visit_type_arena!(visit_ts_construct_signature_decl, TsConstructSignatureDecl); + noop_visit_type_arena!(visit_ts_constructor_type, TsConstructorType); + noop_visit_type_arena!(visit_ts_entity_name, TsEntityName); + noop_visit_type_arena!(visit_ts_expr_with_type_args, TsExprWithTypeArgs); + noop_visit_type_arena!(visit_ts_fn_or_constructor_type, TsFnOrConstructorType); + noop_visit_type_arena!(visit_ts_fn_param, TsFnParam); + noop_visit_type_arena!(visit_ts_fn_type, TsFnType); + noop_visit_type_arena!(visit_ts_import_type, TsImportType); + noop_visit_type_arena!(visit_ts_index_signature, TsIndexSignature); + noop_visit_type_arena!(visit_ts_indexed_access_type, TsIndexedAccessType); + noop_visit_type_arena!(visit_ts_infer_type, TsInferType); + noop_visit_type_arena!(visit_ts_interface_body, TsInterfaceBody); + noop_visit_type_arena!(visit_ts_interface_decl, TsInterfaceDecl); + noop_visit_type_arena!(visit_ts_intersection_type, TsIntersectionType); + noop_visit_type_arena!(visit_ts_keyword_type, TsKeywordType); + noop_visit_type_arena!(visit_ts_keyword_type_kind, TsKeywordTypeKind); + noop_visit_type_arena!(visit_ts_mapped_type, TsMappedType); + noop_visit_type_arena!(visit_ts_method_signature, TsMethodSignature); + noop_visit_type_arena!(visit_ts_optional_type, TsOptionalType); + noop_visit_type_arena!(visit_ts_parenthesized_type, TsParenthesizedType); + noop_visit_type_arena!(visit_ts_property_signature, TsPropertySignature); + noop_visit_type_arena!(visit_ts_qualified_name, TsQualifiedName); + noop_visit_type_arena!(visit_ts_rest_type, TsRestType); + noop_visit_type_arena!(visit_ts_this_type, TsThisType); + noop_visit_type_arena!(visit_ts_this_type_or_ident, TsThisTypeOrIdent); + noop_visit_type_arena!(visit_ts_tuple_type, TsTupleType); + noop_visit_type_arena!(visit_ts_type, TsType); + noop_visit_type_arena!(visit_ts_type_alias_decl, TsTypeAliasDecl); + noop_visit_type_arena!(visit_ts_type_ann, TsTypeAnn); + noop_visit_type_arena!(visit_ts_type_element, TsTypeElement); + noop_visit_type_arena!(visit_ts_type_lit, TsTypeLit); + noop_visit_type_arena!(visit_ts_type_operator, TsTypeOperator); + noop_visit_type_arena!(visit_ts_type_operator_op, TsTypeOperatorOp); + noop_visit_type_arena!(visit_ts_type_param, TsTypeParam); + noop_visit_type_arena!(visit_ts_type_param_decl, TsTypeParamDecl); + noop_visit_type_arena!(visit_ts_type_param_instantiation, TsTypeParamInstantiation); + noop_visit_type_arena!(visit_ts_type_predicate, TsTypePredicate); + noop_visit_type_arena!(visit_ts_type_query, TsTypeQuery); + noop_visit_type_arena!(visit_ts_type_query_expr, TsTypeQueryExpr); + noop_visit_type_arena!(visit_ts_type_ref, TsTypeRef); + noop_visit_type_arena!( + visit_ts_union_or_intersection_type, + TsUnionOrIntersectionType + ); + noop_visit_type_arena!(visit_ts_union_type, TsUnionType); + }; + + ($name:ident, $N:tt, fail) => { + #[cfg_attr(not(debug_assertions), inline(always))] + fn $name(&mut self, _: &swc_ecma_ast::arena::$N) { + $crate::fail_no_typescript(stringify!($name)); + } + }; + ($name:ident, $N:tt) => { + fn $name(&mut self, _: &swc_ecma_ast::arena::$N) {} + }; +} + +#[macro_export] +macro_rules! noop_visit_mut_type_arena { + (fail) => { + noop_visit_mut_type_arena!(visit_mut_accessibility, Accessibility, fail); + noop_visit_mut_type_arena!(visit_mut_true_plus_minus, TruePlusMinus, fail); + noop_visit_mut_type_arena!(visit_mut_ts_array_type, TsArrayType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_call_signature_decl, TsCallSignatureDecl, fail); + noop_visit_mut_type_arena!(visit_mut_ts_conditional_type, TsConditionalType, fail); + noop_visit_mut_type_arena!( + visit_mut_ts_construct_signature_decl, + TsConstructSignatureDecl, + fail + ); + noop_visit_mut_type_arena!(visit_mut_ts_constructor_type, TsConstructorType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_entity_name, TsEntityName, fail); + noop_visit_mut_type_arena!(visit_mut_ts_expr_with_type_args, TsExprWithTypeArgs, fail); + noop_visit_mut_type_arena!( + visit_mut_ts_fn_or_constructor_type, + TsFnOrConstructorType, + fail + ); + noop_visit_mut_type_arena!(visit_mut_ts_fn_param, TsFnParam, fail); + noop_visit_mut_type_arena!(visit_mut_ts_fn_type, TsFnType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_import_type, TsImportType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_index_signature, TsIndexSignature, fail); + noop_visit_mut_type_arena!(visit_mut_ts_indexed_access_type, TsIndexedAccessType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_infer_type, TsInferType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_interface_body, TsInterfaceBody, fail); + noop_visit_mut_type_arena!(visit_mut_ts_interface_decl, TsInterfaceDecl, fail); + noop_visit_mut_type_arena!(visit_mut_ts_intersection_type, TsIntersectionType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_keyword_type, TsKeywordType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_keyword_type_kind, TsKeywordTypeKind, fail); + noop_visit_mut_type_arena!(visit_mut_ts_mapped_type, TsMappedType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_method_signature, TsMethodSignature, fail); + noop_visit_mut_type_arena!(visit_mut_ts_optional_type, TsOptionalType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_parenthesized_type, TsParenthesizedType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_property_signature, TsPropertySignature, fail); + noop_visit_mut_type_arena!(visit_mut_ts_qualified_name, TsQualifiedName, fail); + noop_visit_mut_type_arena!(visit_mut_ts_rest_type, TsRestType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_this_type, TsThisType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_this_type_or_ident, TsThisTypeOrIdent, fail); + noop_visit_mut_type_arena!(visit_mut_ts_tuple_type, TsTupleType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type, TsType, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_alias_decl, TsTypeAliasDecl, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_ann, TsTypeAnn, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_element, TsTypeElement, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_lit, TsTypeLit, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_operator, TsTypeOperator, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_operator_op, TsTypeOperatorOp, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_param, TsTypeParam, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_param_decl, TsTypeParamDecl, fail); + noop_visit_mut_type_arena!( + visit_mut_ts_type_param_instantiation, + TsTypeParamInstantiation, + fail + ); + noop_visit_mut_type_arena!(visit_mut_ts_type_predicate, TsTypePredicate, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_query, TsTypeQuery, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_query_expr, TsTypeQueryExpr, fail); + noop_visit_mut_type_arena!(visit_mut_ts_type_ref, TsTypeRef, fail); + noop_visit_mut_type_arena!( + visit_mut_ts_union_or_intersection_type, + TsUnionOrIntersectionType, + fail + ); + noop_visit_mut_type_arena!(visit_mut_ts_union_type, TsUnionType, fail); + }; + () => { + noop_visit_mut_type_arena!(visit_mut_accessibility, Accessibility); + noop_visit_mut_type_arena!(visit_mut_true_plus_minus, TruePlusMinus); + noop_visit_mut_type_arena!(visit_mut_ts_array_type, TsArrayType); + noop_visit_mut_type_arena!(visit_mut_ts_call_signature_decl, TsCallSignatureDecl); + noop_visit_mut_type_arena!(visit_mut_ts_conditional_type, TsConditionalType); + noop_visit_mut_type_arena!( + visit_mut_ts_construct_signature_decl, + TsConstructSignatureDecl + ); + noop_visit_mut_type_arena!(visit_mut_ts_constructor_type, TsConstructorType); + noop_visit_mut_type_arena!(visit_mut_ts_entity_name, TsEntityName); + noop_visit_mut_type_arena!(visit_mut_ts_expr_with_type_args, TsExprWithTypeArgs); + noop_visit_mut_type_arena!(visit_mut_ts_fn_or_constructor_type, TsFnOrConstructorType); + noop_visit_mut_type_arena!(visit_mut_ts_fn_param, TsFnParam); + noop_visit_mut_type_arena!(visit_mut_ts_fn_type, TsFnType); + noop_visit_mut_type_arena!(visit_mut_ts_import_type, TsImportType); + noop_visit_mut_type_arena!(visit_mut_ts_index_signature, TsIndexSignature); + noop_visit_mut_type_arena!(visit_mut_ts_indexed_access_type, TsIndexedAccessType); + noop_visit_mut_type_arena!(visit_mut_ts_infer_type, TsInferType); + noop_visit_mut_type_arena!(visit_mut_ts_interface_body, TsInterfaceBody); + noop_visit_mut_type_arena!(visit_mut_ts_interface_decl, TsInterfaceDecl); + noop_visit_mut_type_arena!(visit_mut_ts_intersection_type, TsIntersectionType); + noop_visit_mut_type_arena!(visit_mut_ts_keyword_type, TsKeywordType); + noop_visit_mut_type_arena!(visit_mut_ts_keyword_type_kind, TsKeywordTypeKind); + noop_visit_mut_type_arena!(visit_mut_ts_mapped_type, TsMappedType); + noop_visit_mut_type_arena!(visit_mut_ts_method_signature, TsMethodSignature); + noop_visit_mut_type_arena!(visit_mut_ts_optional_type, TsOptionalType); + noop_visit_mut_type_arena!(visit_mut_ts_parenthesized_type, TsParenthesizedType); + noop_visit_mut_type_arena!(visit_mut_ts_property_signature, TsPropertySignature); + noop_visit_mut_type_arena!(visit_mut_ts_qualified_name, TsQualifiedName); + noop_visit_mut_type_arena!(visit_mut_ts_rest_type, TsRestType); + noop_visit_mut_type_arena!(visit_mut_ts_this_type, TsThisType); + noop_visit_mut_type_arena!(visit_mut_ts_this_type_or_ident, TsThisTypeOrIdent); + noop_visit_mut_type_arena!(visit_mut_ts_tuple_type, TsTupleType); + noop_visit_mut_type_arena!(visit_mut_ts_type, TsType); + noop_visit_mut_type_arena!(visit_mut_ts_type_alias_decl, TsTypeAliasDecl); + noop_visit_mut_type_arena!(visit_mut_ts_type_ann, TsTypeAnn); + noop_visit_mut_type_arena!(visit_mut_ts_type_element, TsTypeElement); + noop_visit_mut_type_arena!(visit_mut_ts_type_lit, TsTypeLit); + noop_visit_mut_type_arena!(visit_mut_ts_type_operator, TsTypeOperator); + noop_visit_mut_type_arena!(visit_mut_ts_type_operator_op, TsTypeOperatorOp); + noop_visit_mut_type_arena!(visit_mut_ts_type_param, TsTypeParam); + noop_visit_mut_type_arena!(visit_mut_ts_type_param_decl, TsTypeParamDecl); + noop_visit_mut_type_arena!( + visit_mut_ts_type_param_instantiation, + TsTypeParamInstantiation + ); + noop_visit_mut_type_arena!(visit_mut_ts_type_predicate, TsTypePredicate); + noop_visit_mut_type_arena!(visit_mut_ts_type_query, TsTypeQuery); + noop_visit_mut_type_arena!(visit_mut_ts_type_query_expr, TsTypeQueryExpr); + noop_visit_mut_type_arena!(visit_mut_ts_type_ref, TsTypeRef); + noop_visit_mut_type_arena!( + visit_mut_ts_union_or_intersection_type, + TsUnionOrIntersectionType + ); + noop_visit_mut_type_arena!(visit_mut_ts_union_type, TsUnionType); + }; + + ($name:ident, $N:ident, fail) => { + #[cfg_attr(not(debug_assertions), inline(always))] + fn $name(&mut self, _: &mut swc_ecma_ast::arena::$N) { + $crate::fail_no_typescript(stringify!($name)); + } + }; + ($name:ident, $N:ident) => { + fn $name(&mut self, _: &mut swc_ecma_ast::arena::$N) {} + }; +} + +#[macro_export] +macro_rules! visit_obj_and_computed_arena { + () => { + fn visit_member_prop(&mut self, n: &swc_ecma_ast::arena::MemberProp) { + if let swc_ecma_ast::arena::MemberProp::Computed(c) = n { + c.visit_with(self); + } + } + + fn visit_jsx_member_expr(&mut self, n: &swc_ecma_ast::arena::JSXMemberExpr) { + n.obj.visit_with(self); + } + + fn visit_super_prop(&mut self, n: &swc_ecma_ast::arena::SuperProp) { + if let swc_ecma_ast::arena::SuperProp::Computed(c) = n { + c.visit_with(self); + } + } + }; +} + +/// Implemented for passes which inject variables. +/// +/// If a pass depends on other pass which injects variables, this trait can be +/// used to keep the variables. +pub trait InjectVars { + fn take_vars(&mut self) -> Vec; +} + +impl<'a, V> InjectVars for FoldPass<'a, V> +where + V: Fold<'a> + InjectVars, +{ + fn take_vars(&mut self) -> Vec { + self.pass.take_vars() + } +} + +impl<'a, V> InjectVars for VisitMutPass +where + V: VisitMut<'a> + InjectVars, +{ + fn take_vars(&mut self) -> Vec { + self.pass.take_vars() + } +} + +impl<'a, V> InjectVars for VisitPass +where + V: Visit<'a> + InjectVars, +{ + fn take_vars(&mut self) -> Vec { + self.pass.take_vars() + } +} + +macro_rules! impl_traits_for_tuple { + ( + [$idx:tt, $name:ident], $([$idx_rest:tt, $name_rest:ident]),* + ) => { + impl<'a, $name, $($name_rest),*> VisitMut<'a> for ($name, $($name_rest),*) + where + $name: VisitMut<'a>, + $($name_rest: VisitMut<'a>),* + { + + fn visit_mut_program(&mut self, program: &mut Program<'a>) { + self.$idx.visit_mut_program(program); + + $( + self.$idx_rest.visit_mut_program(program); + )* + } + + fn visit_mut_module(&mut self, module: &mut Module<'a>) { + self.$idx.visit_mut_module(module); + + $( + self.$idx_rest.visit_mut_module(module); + )* + } + + fn visit_mut_script(&mut self, script: &mut Script<'a>) { + self.$idx.visit_mut_script(script); + + $( + self.$idx_rest.visit_mut_script(script); + )* + } + + fn visit_mut_stmt(&mut self, stmt: &mut Stmt<'a>) { + self.$idx.visit_mut_stmt(stmt); + + $( + self.$idx_rest.visit_mut_stmt(stmt); + )* + } + + fn visit_mut_expr(&mut self, expr: &mut Expr<'a>) { + self.$idx.visit_mut_expr(expr); + + $( + self.$idx_rest.visit_mut_expr(expr); + )* + } + + fn visit_mut_pat(&mut self, pat: &mut Pat<'a>) { + self.$idx.visit_mut_pat(pat); + + $( + self.$idx_rest.visit_mut_pat(pat); + )* + } + + fn visit_mut_assign_target(&mut self, target: &mut AssignTarget<'a>) { + self.$idx.visit_mut_assign_target(target); + + $( + self.$idx_rest.visit_mut_assign_target(target); + )* + } + + fn visit_mut_ident(&mut self, ident: &mut Ident) { + self.$idx.visit_mut_ident(ident); + + $( + self.$idx_rest.visit_mut_ident(ident); + )* + } + } + }; +} + +impl_traits_for_tuple!([0, A], [1, B]); +impl_traits_for_tuple!([0, A], [1, B], [2, C]); +impl_traits_for_tuple!([0, A], [1, B], [2, C], [3, D]); +impl_traits_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E]); +impl_traits_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E], [5, F]); +impl_traits_for_tuple!([0, A], [1, B], [2, C], [3, D], [4, E], [5, F], [6, G]); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H] +); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I] +); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J] +); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K] +); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K], + [11, L] +); +impl_traits_for_tuple!( + [0, A], + [1, B], + [2, C], + [3, D], + [4, E], + [5, F], + [6, G], + [7, H], + [8, I], + [9, J], + [10, K], + [11, L], + [12, M] +); diff --git a/crates/swc_ecma_visit/src/lib.rs b/crates/swc_ecma_visit/src/lib.rs index 87d9d463dea7..f06ccf73f7a3 100644 --- a/crates/swc_ecma_visit/src/lib.rs +++ b/crates/swc_ecma_visit/src/lib.rs @@ -13,6 +13,7 @@ use swc_ecma_ast::*; use swc_visit::{Repeat, Repeated}; pub use crate::generated::*; +pub mod arena; mod generated; pub fn fold_pass(pass: V) -> FoldPass diff --git a/crates/swc_eq_ignore_macros/src/lib.rs b/crates/swc_eq_ignore_macros/src/lib.rs index cc8d13319a36..7a40e21512d7 100644 --- a/crates/swc_eq_ignore_macros/src/lib.rs +++ b/crates/swc_eq_ignore_macros/src/lib.rs @@ -62,15 +62,28 @@ impl Deriver { let trait_name = &self.trait_name; let ty = &input.ident; let method_name = &self.method_name; - quote!( - #[automatically_derived] - impl ::swc_common::#trait_name for #ty { - #[allow(non_snake_case)] - fn #method_name(&self, other: &Self) -> bool { - #body + let has_lifetime = input.generics.lifetimes().count() > 0; + if has_lifetime { + quote!( + #[automatically_derived] + impl ::swc_common::#trait_name for #ty<'_> { + #[allow(non_snake_case)] + fn #method_name(&self, other: &Self) -> bool { + #body + } } - } - ) + ) + } else { + quote!( + #[automatically_derived] + impl ::swc_common::#trait_name for #ty { + #[allow(non_snake_case)] + fn #method_name(&self, other: &Self) -> bool { + #body + } + } + ) + } .into() } diff --git a/crates/swc_visit/Cargo.toml b/crates/swc_visit/Cargo.toml index 321303e48b16..54b852da55a3 100644 --- a/crates/swc_visit/Cargo.toml +++ b/crates/swc_visit/Cargo.toml @@ -16,3 +16,4 @@ path = [] [dependencies] either = { workspace = true } new_debug_unreachable = { workspace = true } +swc_allocator = { version = "2.0.0", path = "../swc_allocator" } diff --git a/crates/swc_visit/src/arena.rs b/crates/swc_visit/src/arena.rs new file mode 100644 index 000000000000..b6890f20599e --- /dev/null +++ b/crates/swc_visit/src/arena.rs @@ -0,0 +1,98 @@ +use std::ptr; + +use swc_allocator::arena::{Box, Vec}; + +use crate::util::{map::Map, move_map::MoveMap}; + +impl Map for Box<'_, T> { + fn map(self, f: F) -> Self + where + F: FnOnce(T) -> T, + { + // Leak self in case of panic. + // FIXME(eddyb) Use some sort of "free guard" that + // only deallocates, without dropping the pointee, + // in case the call the `f` below ends in a panic. + let p = Box::into_raw(self); + + unsafe { + ptr::write(p, f(ptr::read(p))); + + // Recreate self from the raw pointer. + Box::from_raw(p) + } + } +} + +impl MoveMap for Vec<'_, T> { + /// This reduces binary size. + fn move_map(mut self, mut f: F) -> Self + where + F: FnMut(T) -> T, + { + unsafe { + let old_len = self.len(); + self.set_len(0); // make sure we just leak elements in case of panic + + for index in 0..old_len { + let item_ptr = self.as_mut_ptr().add(index); + // move the item out of the vector and map it + let item = ptr::read(item_ptr); + let item = f(item); + + ptr::write(item_ptr, item); + } + + // restore the original length + self.set_len(old_len); + } + + self + } + + fn move_flat_map(mut self, mut f: F) -> Self + where + F: FnMut(T) -> I, + I: IntoIterator, + { + let mut read_i = 0; + let mut write_i = 0; + unsafe { + let mut old_len = self.len(); + self.set_len(0); // make sure we just leak elements in case of panic + + while read_i < old_len { + // move the read_i'th item out of the vector and map it + // to an iterator + let e = ptr::read(self.as_ptr().add(read_i)); + let iter = f(e).into_iter(); + read_i += 1; + + for e in iter { + if write_i < read_i { + ptr::write(self.as_mut_ptr().add(write_i), e); + write_i += 1; + } else { + // If this is reached we ran out of space + // in the middle of the vector. + // However, the vector is in a valid state here, + // so we just do a somewhat inefficient insert. + self.set_len(old_len); + self.insert(write_i, e); + + old_len = self.len(); + self.set_len(0); + + read_i += 1; + write_i += 1; + } + } + } + + // write_i tracks the number of actually written new items. + self.set_len(write_i); + } + + self + } +} diff --git a/crates/swc_visit/src/lib.rs b/crates/swc_visit/src/lib.rs index 07d1d7893474..150123cd1948 100644 --- a/crates/swc_visit/src/lib.rs +++ b/crates/swc_visit/src/lib.rs @@ -96,6 +96,7 @@ use std::ops::{Deref, DerefMut}; pub use either::Either; +pub mod arena; pub mod util; /// Visit all children nodes. This converts `VisitAll` to `Visit`. The type diff --git a/tools/generate-code/src/arena/mod.rs b/tools/generate-code/src/arena/mod.rs new file mode 100644 index 000000000000..070eeca45c3c --- /dev/null +++ b/tools/generate-code/src/arena/mod.rs @@ -0,0 +1,1711 @@ +use std::collections::HashSet; + +use inflector::Inflector; +use proc_macro2::{Span, TokenStream}; +use quote::{quote, ToTokens}; +use syn::{ + parse_quote, Arm, Attribute, Expr, Field, Fields, File, GenericArgument, Ident, Item, Lit, + LitInt, Path, PathArguments, Stmt, TraitItem, Type, +}; + +pub fn generate(crate_root: &Path, node_types: &[&Item]) -> File { + let mut output = File { + shebang: None, + attrs: Vec::new(), + items: Vec::new(), + }; + let mut all_types = all_field_types(node_types).into_iter().collect::>(); + all_types.sort_by_cached_key(|v| v.method_name()); + + let mut typedefs = HashSet::new(); + + for node_type in node_types { + match node_type { + Item::Enum(data) => { + typedefs.insert(FieldType { + name: data.ident.to_string(), + lifetime: data.generics.lifetimes().count() > 0, + generic: None, + }); + } + Item::Struct(data) => { + typedefs.insert(FieldType { + name: data.ident.to_string(), + lifetime: data.generics.lifetimes().count() > 0, + generic: None, + }); + } + _ => {} + } + } + + let field_only_types = { + let mut all = all_types.clone(); + + all.retain(|ty| !typedefs.contains(ty)); + + all + }; + + output.attrs.push(parse_quote!( + //! This file is generated by `tools/generate-code`. DO NOT MODIFY. + )); + output.attrs.push(parse_quote!( + #![allow(unused_variables)] + )); + output.attrs.push(parse_quote!( + #![allow(clippy::all)] + )); + + output.items.push(parse_quote!( + use #crate_root::*; + )); + + output.items.push(parse_quote!( + use swc_allocator::arena::{Box, Vec}; + )); + + output.items.push(parse_quote!( + pub use ::swc_visit::All; + )); + + for &kind in [TraitKind::Visit, TraitKind::VisitMut, TraitKind::Fold].iter() { + for &variant in [Variant::Normal, Variant::AstPath].iter() { + let g = Generator { kind, variant }; + + output.items.extend(g.declare_visit_trait(&all_types)); + + output.items.extend(g.declare_visit_with_trait()); + + output + .items + .extend(g.implement_visit_with_for_node_types(node_types)); + + output + .items + .extend(g.implement_visit_with_for_non_node_types(&field_only_types)); + + output + .items + .extend(g.implement_visit_with_for_generic_types()); + } + } + + output.items.push(parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + pub type AstKindPath = swc_visit::AstKindPath; + )); + output.items.push(parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + pub type AstNodePath<'ast> = swc_visit::AstNodePath>; + )); + output.items.extend(define_fields(crate_root, node_types)); + + output +} + +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] +struct FieldType { + name: String, + lifetime: bool, + generic: Option>, +} + +impl ToTokens for FieldType { + fn to_tokens(&self, tokens: &mut TokenStream) { + let name: Path = syn::parse_str(&self.name).expect("failed to parse path"); + match (self.lifetime, self.generic.as_ref()) { + (true, Some(gen)) => { + quote!(#name<'a, #gen>) + } + (true, None) => { + quote!(#name<'a>) + } + (false, Some(gen)) => { + quote!(#name<#gen>) + } + (false, None) => { + quote!(#name) + } + } + .to_tokens(tokens); + } +} + +impl FieldType { + pub fn method_name(&self) -> String { + if let Some(ty) = self.generic.as_ref() { + match self.name.as_str() { + "Option" => format!("opt_{}", ty.method_name()), + "Vec" => { + // Vec> => opt_vec_foo + if ty.name == "Option" { + if let Some(ty) = ty.generic.as_ref() { + return format!("opt_vec_{}s", ty.method_name()); + } + } + format!("{}s", ty.method_name()) + } + "Box" => ty.method_name(), + _ => todo!("method_name for generic type: {}", self.name), + } + } else { + self.name.split("::").last().unwrap().to_snake_case() + } + } +} + +fn all_field_types(node_types: &[&Item]) -> HashSet { + let mut all_types = HashSet::new(); + + for ty in node_types { + let (type_name, lifetime) = match ty { + Item::Enum(data) => ( + data.ident.to_string(), + data.generics.lifetimes().count() > 0, + ), + Item::Struct(data) => ( + data.ident.to_string(), + data.generics.lifetimes().count() > 0, + ), + _ => continue, + }; + all_types.insert(FieldType { + name: type_name, + lifetime, + generic: None, + }); + + match ty { + Item::Enum(data) => { + for variant in &data.variants { + for field in &variant.fields { + let ty = &field.ty; + all_types.extend(all_types_in_ty(ty)); + } + } + } + Item::Struct(data) => { + for field in &data.fields { + let ty = &field.ty; + all_types.extend(all_types_in_ty(ty)); + } + } + _ => continue, + } + } + + all_types +} + +fn to_field_ty(ty: &Type) -> Option { + for ty_name in ["Vec", "Box", "Option"] { + if let (lifetime, Some(ty)) = extract_generic(ty_name, ty) { + return to_field_ty(ty).map(|ty| FieldType { + name: ty_name.to_owned(), + generic: Some(Box::new(ty)), + lifetime, + }); + } + } + + match ty { + Type::Path(p) => { + let last = p.path.segments.last().unwrap(); + let i = &last.ident; + if i == "bool" + || i == "char" + || i == "f32" + || i == "f64" + || i == "i8" + || i == "i16" + || i == "i32" + || i == "i64" + || i == "i128" + || i == "isize" + || i == "str" + || i == "u8" + || i == "u16" + || i == "u32" + || i == "u64" + || i == "u128" + || i == "usize" + { + return None; + } + + match &last.arguments { + PathArguments::AngleBracketed(tps) => { + let lifetime = tps + .args + .first() + .map_or(false, |arg| matches!(arg, GenericArgument::Lifetime(_))); + let ident = &last.ident; + Some(FieldType { + name: quote!(#ident).to_string(), + lifetime, + generic: None, + }) + } + _ => Some(FieldType { + name: quote!(#p).to_string(), + lifetime: false, + generic: None, + }), + } + } + _ => todo!("to_field_ty"), + } +} + +fn all_types_in_ty(ty: &Type) -> Vec { + for ty_name in ["Vec", "Box", "Option"] { + if let (lifetime, Some(ty)) = extract_generic(ty_name, ty) { + let mut types = all_types_in_ty(ty); + types.extend(to_field_ty(ty).map(|ty| FieldType { + name: ty_name.to_owned(), + lifetime, + generic: Some(Box::new(ty)), + })); + return types; + } + } + + to_field_ty(ty).into_iter().collect() +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum TraitKind { + Visit, + VisitMut, + Fold, +} + +impl TraitKind { + pub fn method_prefix(self) -> &'static str { + match self { + TraitKind::Visit => "visit", + TraitKind::VisitMut => "visit_mut", + TraitKind::Fold => "fold", + } + } + + pub fn trait_prefix(self) -> &'static str { + match self { + TraitKind::Visit => "Visit", + TraitKind::VisitMut => "VisitMut", + TraitKind::Fold => "Fold", + } + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum Variant { + Normal, + AstPath, +} + +impl Variant { + pub fn method_suffix(self, is_visitor_method: bool) -> &'static str { + if self == Variant::Normal || is_visitor_method { + "" + } else { + "_ast_path" + } + } +} + +struct Generator { + kind: TraitKind, + variant: Variant, +} + +impl Generator { + fn should_skip(&self, ty: &Type) -> bool { + for ty_name in ["Vec", "Box", "Option"] { + if let (_, Some(ty)) = extract_generic(ty_name, ty) { + return self.should_skip(ty); + } + } + + let ty = to_field_ty(ty); + match ty { + Some(..) => {} + None => return true, + } + false + } + + fn method_lifetime(&self) -> TokenStream { + match self.kind { + TraitKind::Visit => match self.variant { + Variant::Normal => quote!(), + Variant::AstPath => quote!(<'ast: 'r, 'r>), + }, + TraitKind::VisitMut => quote!(), + TraitKind::Fold => quote!(), + } + } + + fn parameter_type_token(&self, ty: TokenStream) -> TokenStream { + match self.kind { + TraitKind::Visit => match self.variant { + Variant::Normal => quote!(&#ty), + Variant::AstPath => quote!(&'ast #ty), + }, + TraitKind::VisitMut => quote!(&mut #ty), + TraitKind::Fold => ty, + } + } + + /// This includes `->` + fn return_type_token(&self, ty: TokenStream) -> TokenStream { + match self.kind { + TraitKind::Visit => quote!(), + TraitKind::VisitMut => quote!(), + TraitKind::Fold => quote!(-> #ty), + } + } + + fn arg_extra_token(&self) -> TokenStream { + match self.variant { + Variant::Normal => quote!(), + Variant::AstPath => quote!(, __ast_path), + } + } + + fn param_extra_token(&self) -> TokenStream { + match self.variant { + Variant::Normal => quote!(), + Variant::AstPath => match self.kind { + TraitKind::Visit => { + quote!(, __ast_path: &mut AstNodePath<'r>) + } + TraitKind::VisitMut | TraitKind::Fold => quote!(, __ast_path: &mut AstKindPath), + }, + } + } + + fn trait_name(&self, with: bool) -> Ident { + let name = self.kind.trait_prefix(); + + let name = if with { + format!("{}With", name) + } else { + name.to_string() + }; + + match self.variant { + Variant::Normal => Ident::new(&name, Span::call_site()), + Variant::AstPath => Ident::new(&format!("{}AstPath", name), Span::call_site()), + } + } + + fn base_trait_attrs(&self) -> Vec { + let mut attrs = Vec::new(); + + if self.variant == Variant::AstPath { + attrs.push(parse_quote!(#[cfg(any(docsrs, feature = "path"))])); + attrs.push(parse_quote!(#[cfg_attr(docsrs, doc(cfg(feature = "path")))])); + } + + attrs + } + + fn declare_visit_trait(&self, all_types: &[FieldType]) -> Vec { + let mut items = Vec::::new(); + let lifetime = self.method_lifetime(); + let ast_path_arg = self.arg_extra_token(); + let ast_path_params = self.param_extra_token(); + let with_trait_name = self.trait_name(true); + let trait_name = self.trait_name(false); + let attrs = self.base_trait_attrs(); + let mut trait_methods = Vec::::new(); + let mut either_impl_methods = Vec::::new(); + let mut optional_impl_methods = Vec::::new(); + let mut ptr_impl_methods = Vec::::new(); + + for ty in all_types { + if ty.name == "Box" && ty.generic.is_some() { + continue; + } + let type_name = quote!(#ty); + let return_type = self.return_type_token(quote!(#type_name)); + let node_type = self.node_type_for_visitor_method(ty); + let type_param = self.parameter_type_token(quote!(#node_type)); + + let visit_method_name = Ident::new( + &format!( + "{}_{}{}", + self.kind.method_prefix(), + ty.method_name(), + self.variant.method_suffix(true) + ), + Span::call_site(), + ); + let visit_with_children_name = Ident::new( + &format!( + "{}_children_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + let recurse_doc = "If you want to recurse, you need to call it manually."; + + let method_doc = doc(&format!( + "Visit a node of type `{}`.\n\nBy default, this method calls \ + [`{type_name}::{visit_with_children_name}`]. {recurse_doc}", + type_name + )); + + trait_methods.push(parse_quote!( + #method_doc + #[inline] + fn #visit_method_name #lifetime (&mut self, node: #type_param #ast_path_params) #return_type { + <#node_type as #with_trait_name>::#visit_with_children_name(node, self #ast_path_arg) + } + )); + + either_impl_methods.push(parse_quote!( + #[inline] + fn #visit_method_name #lifetime (&mut self, node: #type_param #ast_path_params) #return_type { + match self { + swc_visit::Either::Left(visitor) => { + #trait_name::#visit_method_name(visitor, node #ast_path_arg) + } + swc_visit::Either::Right(visitor) => { + #trait_name::#visit_method_name(visitor, node #ast_path_arg) + } + } + } + )); + + let else_block = if self.kind == TraitKind::Fold { + quote!(node) + } else { + quote!() + }; + optional_impl_methods.push(parse_quote!( + #[inline] + fn #visit_method_name #lifetime (&mut self, node: #type_param #ast_path_params) #return_type { + if self.enabled { + ::#visit_method_name(&mut self.visitor, node #ast_path_arg) + } else { + #else_block + } + } + )); + + ptr_impl_methods.push(parse_quote!( + #[inline] + fn #visit_method_name #lifetime (&mut self, node: #type_param #ast_path_params) #return_type { + ::#visit_method_name(&mut **self, node #ast_path_arg) + } + )); + } + + items.push(parse_quote! { + /// A visitor trait for traversing the AST. + #(#attrs)* + pub trait #trait_name<'a> { + #(#trait_methods)* + } + }); + + // &mut V + items.push(parse_quote! { + #(#attrs)* + impl<'a, V> #trait_name<'a> for &mut V where V: ?Sized + #trait_name<'a> { + #(#ptr_impl_methods)* + } + }); + + // Box + items.push(parse_quote! { + #(#attrs)* + impl<'a, V> #trait_name<'a> for Box<'a, V> where V: ?Sized + #trait_name<'a> { + #(#ptr_impl_methods)* + } + }); + + // ::swc_visit::Either + + items.push(parse_quote! { + #(#attrs)* + impl<'a, A, B> #trait_name<'a> for ::swc_visit::Either + where + A: #trait_name<'a>, + B: #trait_name<'a>, + { + #(#either_impl_methods)* + } + }); + + // ::swc_visit::Optional + + items.push(parse_quote! { + #(#attrs)* + impl<'a, V> #trait_name<'a> for ::swc_visit::Optional + where + V: #trait_name<'a>, + { + #(#optional_impl_methods)* + } + }); + + items + } + + fn declare_visit_with_trait(&self) -> Vec { + let visitor_trait_name = self.trait_name(false); + let trait_name = self.trait_name(true); + let attrs = self.base_trait_attrs(); + let mut visit_with_trait_methods: Vec = Vec::new(); + + { + let lifetime = self.method_lifetime(); + let ast_path_extra = self.param_extra_token(); + let return_type = self.return_type_token(quote!(Self)); + let receiver = self.parameter_type_token(quote!(self)); + + let visit_with_name = Ident::new( + &format!( + "{}_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + let visit_with_children_name = Ident::new( + &format!( + "{}_children_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + visit_with_trait_methods.push(parse_quote!( + /// Calls a visitor method (visitor.fold_xxx) with self. + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_extra) #return_type; + )); + + visit_with_trait_methods.push(parse_quote!( + /// Visit children nodes of `self`` with `visitor`. + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_extra) #return_type; + )); + } + + let mut items: Vec = Vec::new(); + items.push(parse_quote!( + /// A trait implemented for types that can be visited using a visitor. + #(#attrs)* + pub trait #trait_name<'a, V: ?Sized + #visitor_trait_name<'a>> { + #(#visit_with_trait_methods)* + } + )); + + items + } + + fn implement_visit_with_for_node_types(&self, node_types: &[&Item]) -> Vec { + let visitor_trait_name = self.trait_name(false); + let trait_name = self.trait_name(true); + let attrs = self.base_trait_attrs(); + + let mut items: Vec = Vec::new(); + + for node_type in node_types { + let type_name = match node_type { + Item::Enum(data) => data.ident.clone(), + Item::Struct(data) => data.ident.clone(), + _ => continue, + }; + + let lifetime = self.method_lifetime(); + let ast_path_arg = self.arg_extra_token(); + let ast_path_param = self.param_extra_token(); + let return_type = self.return_type_token(quote!(Self)); + + let receiver = self.parameter_type_token(quote!(self)); + let visit_with_name = Ident::new( + &format!( + "{}_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + let visit_with_children_name = Ident::new( + &format!( + "{}_children_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + let visit_method_name = Ident::new( + &format!( + "{}_{}{}", + self.kind.method_prefix(), + type_name.to_string().to_snake_case(), + self.variant.method_suffix(true) + ), + Span::call_site(), + ); + + let visit_with_doc = doc(&format!( + "Calls [{visitor_trait_name}`::{}`] with `self`.", + visit_method_name + )); + + let default_body: Expr = match node_type { + Item::Enum(data) => { + let name = &data.ident; + let mut match_arms = Vec::new(); + + for v in &data.variants { + let variant_name = &v.ident; + + match_arms.push(self.default_visit_body( + quote!(#name::#variant_name), + name, + Some(variant_name), + &v.fields, + )); + } + + parse_quote!(match self { #(#match_arms)* }) + } + Item::Struct(data) => { + let name = &data.ident; + + let arm = self.default_visit_body(quote!(#name), name, None, &data.fields); + + parse_quote!(match self { #arm }) + } + _ => continue, + }; + + let type_name = if match node_type { + Item::Enum(data) => data.generics.lifetimes().count() > 0, + Item::Struct(data) => data.generics.lifetimes().count() > 0, + _ => false, + } { + quote!(#type_name<'a>) + } else { + quote!(#type_name) + }; + + items.push(parse_quote!( + #(#attrs)* + impl<'a, V: ?Sized + #visitor_trait_name<'a>> #trait_name<'a, V> for #type_name { + #visit_with_doc + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + ::#visit_method_name(visitor, self #ast_path_arg) + } + + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + #default_body + } + } + )); + } + + items + } + + fn default_visit_body( + &self, + path: TokenStream, + type_name: &Ident, + enum_variant_name: Option<&Ident>, + fields: &Fields, + ) -> Arm { + let ast_path_arg = match self.variant { + Variant::Normal => quote!(), + Variant::AstPath => quote!(, &mut *__ast_path), + }; + + let with_visitor_trait_name = self.trait_name(true); + let visit_with_name = Ident::new( + &format!( + "{}_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + let fields_enum_name = Ident::new(&format!("{type_name}Field"), Span::call_site()); + + let enum_ast_path = match enum_variant_name { + Some(variant_name) if self.variant == Variant::AstPath => { + let field_variant = Ident::new( + &variant_name.to_string().to_pascal_case(), + Span::call_site(), + ); + + match self.kind { + TraitKind::Visit => Some(quote!( + let mut __ast_path = __ast_path + .with_guard( + AstParentNodeRef::#type_name(self, self::fields::#fields_enum_name::#field_variant), + ); + )), + _ => Some(quote!( + let mut __ast_path = __ast_path + .with_guard( + AstParentKind::#type_name(self::fields::#fields_enum_name::#field_variant), + ); + )), + } + } + _ => None, + }; + + match fields { + Fields::Named(n) => { + let mut stmts: Vec = Vec::new(); + let mut bindings = Vec::new(); + let mut reconstruct = match self.kind { + TraitKind::Visit | TraitKind::VisitMut => None, + TraitKind::Fold => Some(Vec::::new()), + }; + + for field in &n.named { + let field_name = field.ident.as_ref().unwrap(); + let ty = &field.ty; + + bindings.push(field_name.clone()); + + let field_variant = + Ident::new(&field_name.to_string().to_pascal_case(), Span::call_site()); + + let mut ast_path_guard_expr: Option = None; + + if self.variant == Variant::AstPath && !self.should_skip(ty) { + let mut kind = quote!(self::fields::#fields_enum_name::#field_variant); + + if extract_vec(extract_generic("Option", ty).1.unwrap_or(ty)) + .1 + .is_some() + { + kind = quote!(#kind(usize::MAX)); + } + + match self.kind { + TraitKind::Visit => { + ast_path_guard_expr = Some(parse_quote!( + let mut __ast_path = __ast_path + .with_guard( + AstParentNodeRef::#type_name(self, #kind), + ); + )); + } + _ => { + ast_path_guard_expr = Some(parse_quote!( + let mut __ast_path = __ast_path + .with_guard( + AstParentKind::#type_name(#kind), + ); + )); + } + } + } + + if let Some(reconstructor) = &mut reconstruct { + if !self.should_skip(ty) { + stmts.push(parse_quote!( + let #field_name = { + #ast_path_guard_expr + <#ty as #with_visitor_trait_name>::#visit_with_name(#field_name, visitor #ast_path_arg) + }; + )); + } + + reconstructor.push(parse_quote!(#field_name)); + } else if !self.should_skip(ty) { + stmts.push(parse_quote!( + { + #ast_path_guard_expr + <#ty as #with_visitor_trait_name>::#visit_with_name(#field_name, visitor #ast_path_arg) + }; + )); + } + } + + match self.kind { + TraitKind::Visit | TraitKind::VisitMut => { + parse_quote!(#path { #(#bindings),* } => { + #enum_ast_path; + + #(#stmts)* + }) + } + TraitKind::Fold => { + let reconstruct = reconstruct.unwrap(); + + parse_quote!(#path { #(#bindings),* } => { + #enum_ast_path; + + + #(#stmts)* + + #path { + #(#reconstruct),* + } + }) + } + } + } + Fields::Unnamed(u) => { + let mut stmts: Vec = Vec::new(); + let mut bindings = Vec::::new(); + let mut reconstruct = match self.kind { + TraitKind::Visit | TraitKind::VisitMut => None, + TraitKind::Fold => Some(Vec::::new()), + }; + + for (idx, field) in u.unnamed.iter().enumerate() { + let field_name = Ident::new(&format!("_field_{}", idx), Span::call_site()); + let ty = &field.ty; + let binding_idx = Lit::Int(LitInt::new(&idx.to_string(), Span::call_site())); + bindings.push(parse_quote!(#binding_idx: #field_name)); + + if let Some(reconstructor) = &mut reconstruct { + if !self.should_skip(ty) { + stmts.push(parse_quote!( + let #field_name = <#ty as #with_visitor_trait_name>::#visit_with_name(#field_name, visitor #ast_path_arg); + )); + } + + reconstructor.push(parse_quote!(#binding_idx: #field_name)); + } else if !self.should_skip(ty) { + stmts.push(parse_quote!( + <#ty as #with_visitor_trait_name>::#visit_with_name(#field_name, visitor #ast_path_arg); + )); + } + } + + match self.kind { + TraitKind::Visit | TraitKind::VisitMut => { + parse_quote!(#path { #(#bindings),* }=> { + #enum_ast_path; + + #(#stmts)* + }) + } + TraitKind::Fold => { + let reconstruct = reconstruct.unwrap(); + + parse_quote!(#path { #(#bindings),* } => { + #enum_ast_path; + + #(#stmts)* + + #path{#(#reconstruct),*} + }) + } + } + } + Fields::Unit => match self.kind { + TraitKind::Visit | TraitKind::VisitMut => { + parse_quote!(#path => {}) + } + TraitKind::Fold => parse_quote!(#path => #path,), + }, + } + } + + fn implement_visit_with_for_non_node_types(&self, non_leaf_types: &[FieldType]) -> Vec { + let visitor_trait_name = self.trait_name(false); + let visit_with_trait_name = self.trait_name(true); + let attrs = self.base_trait_attrs(); + let lifetime = self.method_lifetime(); + let ast_path_arg = self.arg_extra_token(); + let ast_path_param = self.param_extra_token(); + let return_type = self.return_type_token(quote!(Self)); + + let receiver = self.parameter_type_token(quote!(self)); + + let mut items: Vec = Vec::new(); + + for node_type in non_leaf_types { + let visit_with_name = Ident::new( + &format!( + "{}_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + let visit_with_children_name = Ident::new( + &format!( + "{}_children_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + let visit_method_name = Ident::new( + &format!( + "{}_{}{}", + self.kind.method_prefix(), + node_type.method_name(), + self.variant.method_suffix(true) + ), + Span::call_site(), + ); + + let visit_with_doc = doc(&format!( + "Calls [{visitor_trait_name}`::{}`] with `self`. (Extra impl)", + visit_method_name + )); + + let default_body: Expr = match node_type.generic.as_ref() { + None => match self.kind { + TraitKind::Visit => { + parse_quote!({}) + } + TraitKind::VisitMut => { + parse_quote!({}) + } + TraitKind::Fold => { + parse_quote!(self) + } + }, + + Some(inner) => match node_type.name.as_str() { + "Vec" => { + let inner_ty = quote!(#inner); + + match (self.kind, self.variant) { + (TraitKind::Visit, Variant::Normal) => { + parse_quote!(self.iter().for_each(|item| { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor #ast_path_arg) + })) + } + (TraitKind::Visit, Variant::AstPath) => { + parse_quote!(self.iter().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor, &mut *__ast_path) + })) + } + (TraitKind::VisitMut, Variant::Normal) => { + parse_quote!( + self.iter_mut().for_each(|item| { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor #ast_path_arg) + }) + ) + } + (TraitKind::VisitMut, Variant::AstPath) => { + parse_quote!( + self.iter_mut().enumerate().for_each(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor, &mut *__ast_path) + }) + ) + } + (TraitKind::Fold, Variant::Normal) => { + parse_quote!( + swc_visit::util::move_map::MoveMap::move_map(self, |item| { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor #ast_path_arg) + }) + ) + } + (TraitKind::Fold, Variant::AstPath) => { + parse_quote!( + self.into_iter().enumerate().map(|(__idx, item)| { + let mut __ast_path = __ast_path.with_index_guard(__idx); + <#inner_ty as #visit_with_trait_name>::#visit_with_name(item, visitor, &mut *__ast_path) + }).collect() + ) + } + } + } + "Option" => { + let inner_ty = quote!(#inner); + + match self.kind { + TraitKind::Visit => { + parse_quote!( + match self { + Some(inner) => { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(inner, visitor #ast_path_arg) + } + None => {} + } + ) + } + TraitKind::VisitMut => { + parse_quote!( + match self { + Some(inner) => { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(inner, visitor #ast_path_arg) + } + None => {} + } + ) + } + TraitKind::Fold => { + parse_quote!( + self.map(|inner| { + <#inner_ty as #visit_with_trait_name>::#visit_with_name(inner, visitor #ast_path_arg) + }) + ) + } + } + } + "Box" => continue, + _ => unreachable!("unexpected generic type: {}", node_type.name.as_str()), + }, + }; + + let target_type = self.node_type_for_visitor_method(node_type); + items.push(parse_quote!( + #(#attrs)* + impl<'a, V: ?Sized + #visitor_trait_name<'a>> #visit_with_trait_name<'a, V> for #target_type { + #visit_with_doc + #[inline] + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + ::#visit_method_name(visitor, self #ast_path_arg) + } + + #[inline] + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + #default_body + } + } + )); + } + + items + } + + fn implement_visit_with_for_generic_types(&self) -> Vec { + let visit_trait_name = self.trait_name(false); + let visit_with_trait_name = self.trait_name(true); + let lifetime = self.method_lifetime(); + let ast_path_arg = self.arg_extra_token(); + let ast_path_param = self.param_extra_token(); + let return_type = self.return_type_token(quote!(Self)); + let attrs = self.base_trait_attrs(); + let receiver = self.parameter_type_token(quote!(self)); + + let visit_with_name = Ident::new( + &format!( + "{}_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + let visit_with_children_name = Ident::new( + &format!( + "{}_children_with{}", + self.kind.method_prefix(), + self.variant.method_suffix(false) + ), + Span::call_site(), + ); + + let mut items = Vec::::new(); + + { + // Box => T + match self.kind { + TraitKind::Fold => { + items.push(parse_quote!( + #(#attrs)* + impl<'a, V, T> #visit_with_trait_name<'a, V> for Box<'a, T> + where V: ?Sized + #visit_trait_name<'a>, + T: #visit_with_trait_name<'a, V> { + #[inline] + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + swc_visit::util::map::Map::map(self, |inner| { + >::#visit_with_name(inner, visitor #ast_path_arg) + }) + } + #[inline] + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + swc_visit::util::map::Map::map(self, |inner| { + >::#visit_with_children_name(inner, visitor #ast_path_arg) + }) + } + } + )); + } + + _ => { + let deref_expr = match self.kind { + TraitKind::Visit => { + quote!(&**self) + } + TraitKind::VisitMut => { + quote!(&mut **self) + } + TraitKind::Fold => { + unreachable!() + } + }; + + let restore_expr = match self.kind { + TraitKind::Visit => { + quote!() + } + TraitKind::VisitMut => { + quote!() + } + TraitKind::Fold => { + unreachable!() + } + }; + + items.push(parse_quote!( + #(#attrs)* + impl<'a, V, T> #visit_with_trait_name<'a, V> for Box<'a, T> + where V: ?Sized + #visit_trait_name<'a>, + T: #visit_with_trait_name<'a, V> { + #[inline] + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + let v = >::#visit_with_name(#deref_expr, visitor #ast_path_arg); + #restore_expr + v + } + #[inline] + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + let v = >::#visit_with_children_name(#deref_expr, visitor #ast_path_arg); + #restore_expr + v + } + } + )); + } + } + } + + if self.kind == TraitKind::Visit { + // Vec => [T] + items.push(parse_quote!( + #(#attrs)* + impl<'a, V, T> #visit_with_trait_name<'a, V> for Vec<'a, T> + where V: ?Sized + #visit_trait_name<'a>, + [T]: #visit_with_trait_name<'a, V> { + #[inline] + fn #visit_with_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + let v = <[T] as #visit_with_trait_name>::#visit_with_name(self, visitor #ast_path_arg); + v + } + + #[inline] + fn #visit_with_children_name #lifetime (#receiver, visitor: &mut V #ast_path_param) #return_type { + let v = <[T] as #visit_with_trait_name>::#visit_with_children_name(self, visitor #ast_path_arg); + v + } + } + )); + } + + items + } + + fn node_type_for_visitor_method(&self, node_type: &FieldType) -> TokenStream { + if self.kind == TraitKind::Visit && node_type.name == "Vec" { + if let Some(inner) = node_type.generic.as_ref() { + let inner_ty = quote!(#inner); + return quote!([#inner_ty]); + } + } + quote!(#node_type) + } +} + +fn doc(s: &str) -> Attribute { + parse_quote!(#[doc = #s]) +} + +fn field_variant(type_name: &Ident, field: &Field) -> Option<(TokenStream, Option)> { + if let Some(field_name) = &field.ident { + let variant_name = Ident::new(&field_name.to_string().to_pascal_case(), Span::call_site()); + let variant_doc = doc(&format!("Represents [`{type_name}::{field_name}`]")); + + if extract_vec(extract_generic("Option", &field.ty).1.unwrap_or(&field.ty)) + .1 + .is_some() + { + let v = quote!( + #variant_doc + #variant_name(usize) + ); + let arg = parse_quote!( + Self::#variant_name(idx) => { + assert_initial_index(*idx, index); + + *idx = index; + }, + ); + return Some((v, Some(arg))); + } + + return Some(( + quote!( + #variant_doc + #variant_name + ), + None, + )); + } + + None +} + +fn extract_vec(ty: &Type) -> (bool, Option<&Type>) { + extract_generic("Vec", ty) +} + +fn extract_generic<'a>(name: &str, ty: &'a Type) -> (bool, Option<&'a Type>) { + if let Type::Path(p) = ty { + let last = p.path.segments.last().unwrap(); + + if !last.arguments.is_empty() && last.ident == name { + return match &last.arguments { + PathArguments::AngleBracketed(tps) => { + let lifetime = tps + .args + .first() + .map_or(false, |arg| matches!(arg, GenericArgument::Lifetime(_))); + let first_ty = tps.args.iter().find_map(|arg| { + if let GenericArgument::Type(ty) = arg { + Some(ty) + } else { + None + } + }); + (lifetime, first_ty) + } + _ => unimplemented!("Box() -> T or Box without a type parameter"), + }; + } + } + + if let Type::Reference(r) = ty { + return extract_generic(name, &r.elem); + } + + (false, None) +} + +fn to_iter(e: TokenStream, ty: &Type, node_names: &[Ident]) -> Option { + if let (_, Some(ty)) = extract_vec(ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!(#e.iter().flat_map(|item| #inner_expr))); + } + + if let (_, Some(ty)) = extract_generic("Option", ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!(#e.iter().flat_map(|item| #inner_expr))); + } + + if let (_, Some(ty)) = extract_generic("Box", ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!({ + let item = &*#e; + #inner_expr + })); + } + + if let Type::Path(p) = ty { + let ty = &p.path.segments.last().unwrap().ident; + + if node_names.contains(ty) { + return Some(parse_quote!(::std::iter::once(NodeRef::#ty(&#e)))); + } + + None + } else { + todo!("to_iter for {:?}", ty); + } +} + +fn define_fields(crate_root: &Path, node_types: &[&Item]) -> Vec { + let mut items = Vec::::new(); + let mut kind_enum_members = Vec::new(); + let mut parent_enum_members = Vec::new(); + let mut node_ref_enum_members = Vec::new(); + + let mut kind_set_index_arms = Vec::::new(); + let mut node_ref_set_index_arms = Vec::::new(); + let mut node_ref_kind_arms = Vec::::new(); + let mut node_ref_iter_next_arms = Vec::::new(); + + let node_names = node_types + .iter() + .filter_map(|ty| match ty { + Item::Enum(data) => Some(data.ident.clone()), + Item::Struct(data) => Some(data.ident.clone()), + _ => None, + }) + .collect::>(); + + let is_node_ref_raw = |ty: &Type| match ty { + Type::Path(p) => node_names.contains(&p.path.segments.last().unwrap().ident), + _ => false, + }; + + let is_node_ref = |ty: &Type| { + if let (_, Some(ty)) = extract_generic("Box", ty) { + return is_node_ref_raw(ty); + } + + is_node_ref_raw(ty) + }; + + { + let mut defs = Vec::::new(); + + defs.push(parse_quote!( + use #crate_root::*; + )); + + defs.push(parse_quote!( + #[inline(always)] + fn assert_initial_index(idx: usize, index: usize) { + #[cfg(debug_assertions)] + if !(idx == usize::MAX || index == usize::MAX) { + { + panic!("Should be usize::MAX"); + } + } + } + )); + + for ty in node_types { + let type_name = match ty { + Item::Enum(data) => data.ident.clone(), + Item::Struct(data) => data.ident.clone(), + _ => continue, + }; + + let type_name_with_lifetime = if match ty { + Item::Enum(data) => data.generics.lifetimes().count() > 0, + Item::Struct(data) => data.generics.lifetimes().count() > 0, + _ => false, + } { + quote!(#type_name<'ast>) + } else { + quote!(#type_name) + }; + + let fields_enum_name = Ident::new(&format!("{type_name}Field"), Span::call_site()); + + let mut variants = Vec::new(); + + kind_set_index_arms.push(parse_quote!( + Self::#type_name(v) => v.set_index(index), + )); + node_ref_kind_arms.push(parse_quote!( + Self::#type_name(_, __field_kind) => AstParentKind::#type_name(*__field_kind), + )); + node_ref_set_index_arms.push(parse_quote!( + Self::#type_name(_, __field_kind) => __field_kind.set_index(index), + )); + + match ty { + Item::Enum(data) => { + for variant in &data.variants { + let orig_ident = &variant.ident; + let variant_name = Ident::new( + &variant.ident.to_string().to_pascal_case(), + Span::call_site(), + ); + + let variant_doc = doc(&format!("Represents [`{type_name}::{orig_ident}`]")); + variants.push(quote!( + #variant_doc + #variant_name + )); + } + + kind_enum_members.push(quote!( + #type_name(#fields_enum_name) + )); + + parent_enum_members.push(quote!( + #type_name(&'ast #type_name_with_lifetime, #fields_enum_name) + )); + + node_ref_enum_members.push(quote!( + #type_name(&'ast #type_name_with_lifetime) + )); + + items.push(parse_quote!( + impl<'ast> From<&'ast #type_name_with_lifetime> for NodeRef<'ast> { + fn from(node: &'ast #type_name_with_lifetime) -> Self { + NodeRef::#type_name(node) + } + } + )); + + { + let mut arms = Vec::::new(); + + for variant in &data.variants { + let variant_name = &variant.ident; + + // TODO: Support all kinds of fields + if variant.fields.len() != 1 { + continue; + } + + for f in variant.fields.iter().filter(|f| is_node_ref(&f.ty)) { + let mut ty = &f.ty; + if let (_, Some(inner)) = extract_generic("Box", ty) { + ty = inner; + } + + let ty = match ty { + Type::Path(ty) => { + ty.path.segments.last().unwrap().ident.to_token_stream() + } + _ => ty.to_token_stream(), + }; + arms.push(parse_quote!( + #type_name::#variant_name(v0) => { + std::boxed::Box::new(::std::iter::once(NodeRef::#ty(v0))) + }, + )); + } + } + + node_ref_iter_next_arms.push(parse_quote!( + NodeRef::#type_name(node) => { + match node { + #(#arms)* + + _ => std::boxed::Box::new(::std::iter::empty::>()) + } + } + )); + } + + defs.push(parse_quote!( + impl #fields_enum_name { + #[inline(always)] + pub(crate) fn set_index(&mut self, _: usize) { + swc_visit::wrong_ast_path(); + } + } + )); + } + Item::Struct(data) => { + let mut set_index_arms = Vec::::new(); + + for field in &data.fields { + let opt = field_variant(&type_name, field); + let opt = match opt { + Some(v) => v, + None => continue, + }; + variants.push(opt.0); + + set_index_arms.extend(opt.1); + } + + kind_enum_members.push(quote!( + #type_name(#fields_enum_name) + )); + + parent_enum_members.push(quote!( + #type_name(&'ast #type_name_with_lifetime, #fields_enum_name) + )); + + node_ref_enum_members.push(quote!( + #type_name(&'ast #type_name_with_lifetime) + )); + + items.push(parse_quote!( + impl<'ast> From<&'ast #type_name_with_lifetime> for NodeRef<'ast> { + fn from(node: &'ast #type_name_with_lifetime) -> Self { + NodeRef::#type_name(node) + } + } + )); + + { + let mut iter: Expr = parse_quote!(::std::iter::empty::>()); + + match &data.fields { + Fields::Named(fields) => { + for f in fields.named.iter() { + let ident = &f.ident; + let iter_expr = + to_iter(quote!(node.#ident), &f.ty, &node_names); + if let Some(iter_expr) = iter_expr { + iter = parse_quote!(#iter.chain(#iter_expr)); + } + } + } + + Fields::Unnamed(_fields) => { + // TODO: Support unnamed fields + } + Fields::Unit => {} + } + + node_ref_iter_next_arms.push(parse_quote!( + NodeRef::#type_name(node) => { + let iterator = #iter; + std::boxed::Box::new(iterator) + } + )); + } + + defs.push(parse_quote!( + impl #fields_enum_name { + pub(crate) fn set_index(&mut self, index: usize) { + match self { + #(#set_index_arms)* + + _ => { + swc_visit::wrong_ast_path() + } + } + } + } + )); + } + _ => continue, + } + + defs.push(parse_quote!( + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum #fields_enum_name { + #(#variants),* + } + )) + } + + { + defs.push(parse_quote!( + #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))] + pub enum AstParentKind { + #(#kind_enum_members),* + } + )); + + defs.push(parse_quote!( + impl ::swc_visit::ParentKind for AstParentKind { + #[inline] + fn set_index(&mut self, index: usize) { + match self { + #(#kind_set_index_arms)* + } + } + } + )); + } + + { + defs.push(parse_quote!( + #[derive(Debug, Clone, Copy)] + pub enum AstParentNodeRef<'ast> { + #(#parent_enum_members),* + } + )); + items.push(parse_quote!( + #[derive(Debug, Clone, Copy)] + pub enum NodeRef<'ast> { + #(#node_ref_enum_members),* + } + )); + + defs.push(parse_quote!( + impl<'ast> ::swc_visit::NodeRef for AstParentNodeRef<'ast> { + type ParentKind = AstParentKind; + + #[inline(always)] + fn kind(&self) -> AstParentKind { + self.kind() + } + + fn set_index(&mut self, index: usize) { + match self { + #(#node_ref_set_index_arms)* + } + } + } + )); + defs.push(parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + impl<'ast> AstParentNodeRef<'ast> { + #[inline] + pub fn kind(&self) -> AstParentKind { + match self { + #(#node_ref_kind_arms)* + } + } + } + )); + items.push(parse_quote!( + impl<'ast> NodeRef<'ast> { + /// This is not a part of semver-stable API. It is experimental and subject to change. + #[allow(unreachable_patterns)] + pub fn experimental_raw_children<'a>(&'a self) -> std::boxed::Box>> { + match self { + #(#node_ref_iter_next_arms)* + } + } + } + )); + + items.push(parse_quote!( + impl<'ast> NodeRef<'ast> { + /// Visit all nodes in self in preorder. + /// + /// This is not a part of semver-stable API. It is + /// experimental and subject to change. + pub fn experimental_traverse( + &'ast self, + ) -> std::boxed::Box>> + { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + + std::boxed::Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } + } + )); + } + + items.insert( + 0, + parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + pub mod fields { + #(#defs)* + } + ), + ); + + items.push(parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + pub use self::fields::{AstParentKind, AstParentNodeRef}; + )); + } + + items +} diff --git a/tools/generate-code/src/generators/visitor.rs b/tools/generate-code/src/generators/visitor.rs index cb25f2aabcb1..8cf1dce5e417 100644 --- a/tools/generate-code/src/generators/visitor.rs +++ b/tools/generate-code/src/generators/visitor.rs @@ -8,7 +8,7 @@ use syn::{ LitInt, Path, PathArguments, Stmt, TraitItem, Type, }; -pub fn generate(crate_name: &Ident, node_types: &[&Item]) -> File { +pub fn generate(crate_root: &Path, node_types: &[&Item]) -> File { let mut output = File { shebang: None, attrs: Vec::new(), @@ -50,7 +50,7 @@ pub fn generate(crate_name: &Ident, node_types: &[&Item]) -> File { )); output.items.push(parse_quote!( - use #crate_name::*; + use #crate_root::*; )); output.items.push(parse_quote!( @@ -87,7 +87,7 @@ pub fn generate(crate_name: &Ident, node_types: &[&Item]) -> File { #[cfg(any(docsrs, feature = "path"))] pub type AstNodePath<'ast> = swc_visit::AstNodePath>; )); - output.items.extend(define_fields(crate_name, node_types)); + output.items.extend(define_fields(crate_root, node_types)); output } @@ -1294,7 +1294,7 @@ fn to_iter(e: TokenStream, ty: &Type, node_names: &[Ident]) -> Option { } } -fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { +fn define_fields(crate_root: &Path, node_types: &[&Item]) -> Vec { let mut items = Vec::::new(); let mut kind_enum_members = Vec::new(); let mut parent_enum_members = Vec::new(); @@ -1331,7 +1331,7 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { let mut defs = Vec::::new(); defs.push(parse_quote!( - use #crate_name::*; + use #crate_root::*; )); defs.push(parse_quote!( diff --git a/tools/generate-code/src/main.rs b/tools/generate-code/src/main.rs index 2289359e1631..0a7f91b29398 100644 --- a/tools/generate-code/src/main.rs +++ b/tools/generate-code/src/main.rs @@ -4,16 +4,19 @@ use std::path::{Path, PathBuf}; use anyhow::{bail, Context, Result}; use clap::Parser; -use proc_macro2::Span; -use syn::{Ident, Item}; +use syn::{File, Item}; use crate::types::qualify_types; +mod arena; mod generators; mod types; #[derive(Debug, Parser)] struct CliArgs { + #[clap(short, long)] + crate_root: String, + /// The directory containing the crate to generate the visitor for. #[clap(short = 'i', long)] input_dir: PathBuf, @@ -29,26 +32,35 @@ struct CliArgs { fn main() -> Result<()> { let CliArgs { + crate_root, input_dir, output, exclude, } = CliArgs::parse(); - run_visitor_codegen(&input_dir, &output, &exclude)?; + run_visitor_codegen( + &crate_root, + &input_dir, + &output, + &exclude, + generators::visitor::generate, + )?; Ok(()) } -fn run_visitor_codegen(input_dir: &Path, output: &Path, excludes: &[String]) -> Result<()> { - let crate_name = Ident::new( - input_dir.file_name().unwrap().to_str().unwrap(), - Span::call_site(), - ); +fn run_visitor_codegen File>( + crate_root: &str, + input_dir: &Path, + output: &Path, + excludes: &[String], + gen: G, +) -> Result<()> { + let crate_root = syn::parse_str(crate_root)?; let input_dir = input_dir .canonicalize() - .context("faield to canonicalize input directory")? - .join("src"); + .context("faield to canonicalize input directory")?; eprintln!("Generating visitor for crate in directory: {:?}", input_dir); let input_files = collect_input_files(&input_dir)?; @@ -81,7 +93,7 @@ fn run_visitor_codegen(input_dir: &Path, output: &Path, excludes: &[String]) -> _ => None, }); - let file = generators::visitor::generate(&crate_name, &all_type_defs); + let file = gen(&crate_root, &all_type_defs); let output_content = quote::quote!(#file).to_string(); @@ -113,7 +125,8 @@ fn run_visitor_codegen(input_dir: &Path, output: &Path, excludes: &[String]) -> #[test] fn test_ecmascript() { run_visitor_codegen( - Path::new("../../crates/swc_ecma_ast"), + "swc_ecma_ast", + Path::new("../../crates/swc_ecma_ast/src"), Path::new("../../crates/swc_ecma_visit/src/generated.rs"), &[ "Align64".into(), @@ -121,6 +134,24 @@ fn test_ecmascript() { "EsVersion".into(), "FnPass".into(), ], + generators::visitor::generate, + ) + .unwrap(); +} + +#[test] +fn test_ecmascript_arena() { + run_visitor_codegen( + "swc_ecma_ast::arena", + Path::new("../../crates/swc_ecma_ast/src/arena"), + Path::new("../../crates/swc_ecma_visit/src/arena/generated.rs"), + &[ + "Align64".into(), + "EncodeBigInt".into(), + "EsVersion".into(), + "FnPass".into(), + ], + arena::generate, ) .unwrap(); } @@ -128,9 +159,11 @@ fn test_ecmascript() { #[test] fn test_css() { run_visitor_codegen( - Path::new("../../crates/swc_css_ast"), + "swc_css_ast", + Path::new("../../crates/swc_css_ast/src"), Path::new("../../crates/swc_css_visit/src/generated.rs"), &[], + generators::visitor::generate, ) .unwrap(); } @@ -138,9 +171,11 @@ fn test_css() { #[test] fn test_html() { run_visitor_codegen( - Path::new("../../crates/swc_html_ast"), + "swc_html_ast", + Path::new("../../crates/swc_html_ast/src"), Path::new("../../crates/swc_html_visit/src/generated.rs"), &[], + generators::visitor::generate, ) .unwrap(); } @@ -148,9 +183,11 @@ fn test_html() { #[test] fn test_xml() { run_visitor_codegen( - Path::new("../../crates/swc_xml_ast"), + "swc_xml_ast", + Path::new("../../crates/swc_xml_ast/src"), Path::new("../../crates/swc_xml_visit/src/generated.rs"), &[], + generators::visitor::generate, ) .unwrap(); } @@ -176,10 +213,13 @@ fn parse_rust_file(file: &Path) -> Result { } fn collect_input_files(input_dir: &Path) -> Result> { - Ok(walkdir::WalkDir::new(input_dir) - .into_iter() + Ok(std::fs::read_dir(input_dir)? .filter_map(|entry| entry.ok()) - .filter(|entry| entry.file_type().is_file()) + .filter(|entry| { + entry + .file_type() + .map_or(false, |file_type| file_type.is_file()) + }) .map(|entry| entry.path().to_path_buf()) .collect()) }