swc_estree_compat/swcify/
jsx.rs

1use swc_ecma_ast::Ident;
2
3use crate::swcify::{Context, Swcify};
4
5impl Swcify for swc_estree_ast::JSXNamespacedName {
6    type Output = swc_ecma_ast::JSXNamespacedName;
7
8    fn swcify(self, ctx: &Context) -> Self::Output {
9        swc_ecma_ast::JSXNamespacedName {
10            span: ctx.span(&self.base),
11            ns: self.namespace.swcify(ctx).into(),
12            name: self.name.swcify(ctx).into(),
13        }
14    }
15}
16
17impl Swcify for swc_estree_ast::JSXIdentifier {
18    type Output = Ident;
19
20    fn swcify(self, ctx: &Context) -> Self::Output {
21        Ident {
22            span: ctx.span(&self.base),
23            sym: self.name,
24            ..Default::default()
25        }
26    }
27}