From e2bb19830b7577832462e729916a98edef2dd881 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Wed, 22 Jan 2025 22:18:21 +0800 Subject: [PATCH] feat(ast): derive Clone and Copy for TemplateElement and TemplateElementValue --- crates/oxc_ast/src/ast/js.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index cdb06e507d41bc..523df13c48a369 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -432,7 +432,7 @@ pub struct TaggedTemplateExpression<'a> { /// /// Represents a quasi element in a template literal. #[ast(visit)] -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] #[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ESTree)] pub struct TemplateElement<'a> { pub span: Span, @@ -442,7 +442,7 @@ pub struct TemplateElement<'a> { /// See [template-strings-cooked-vs-raw](https://exploringjs.com/js/book/ch_template-literals.html#template-strings-cooked-vs-raw) #[ast] -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] #[generate_derive(CloneIn, ContentEq, ESTree)] #[estree(no_type)] pub struct TemplateElementValue<'a> {