From 121ddac2287a71c4252918e6e42a7efc5aace0fd Mon Sep 17 00:00:00 2001 From: jserfeng <1114550440@qq.com> Date: Mon, 22 Jan 2024 16:24:22 +0800 Subject: [PATCH] fix: quote macro support import phase --- crates/swc_ecma_quote_macros/src/ast/expr.rs | 2 +- crates/swc_ecma_quote_macros/src/ast/module_decl.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/swc_ecma_quote_macros/src/ast/expr.rs b/crates/swc_ecma_quote_macros/src/ast/expr.rs index 282aa40f63c60..71ff45115fba8 100644 --- a/crates/swc_ecma_quote_macros/src/ast/expr.rs +++ b/crates/swc_ecma_quote_macros/src/ast/expr.rs @@ -75,7 +75,7 @@ impl_struct!(CondExpr, [span, test, cons, alt]); impl_struct!(CallExpr, [span, callee, args, type_args]); impl_struct!(ExprOrSpread, [spread, expr]); impl_struct!(Super, [span]); -impl_struct!(Import, [span]); +impl_struct!(Import, [span, phase]); impl_struct!(NewExpr, [span, callee, args, type_args]); impl_struct!(SeqExpr, [span, exprs]); diff --git a/crates/swc_ecma_quote_macros/src/ast/module_decl.rs b/crates/swc_ecma_quote_macros/src/ast/module_decl.rs index 17b2ebcfa1e8b..2559fa1089ae5 100644 --- a/crates/swc_ecma_quote_macros/src/ast/module_decl.rs +++ b/crates/swc_ecma_quote_macros/src/ast/module_decl.rs @@ -15,7 +15,7 @@ impl_enum!( ] ); -impl_struct!(ImportDecl, [span, specifiers, src, type_only, with]); +impl_struct!(ImportDecl, [span, specifiers, src, type_only, with, phase]); impl_struct!(ExportDecl, [span, decl]); impl_struct!(ExportDefaultDecl, [span, decl]); impl_struct!(ExportDefaultExpr, [span, expr]);