diff --git a/crates/swc_ecma_quote_macros/src/ast/enums.rs b/crates/swc_ecma_quote_macros/src/ast/enums.rs index 42e9e8a9a69c..a04ce8421802 100644 --- a/crates/swc_ecma_quote_macros/src/ast/enums.rs +++ b/crates/swc_ecma_quote_macros/src/ast/enums.rs @@ -75,3 +75,4 @@ impl_simple_enum!( impl_simple_enum!(Accessibility, [Public, Protected, Private]); impl_simple_enum!(MethodKind, [Method, Getter, Setter]); impl_simple_enum!(MetaPropKind, [NewTarget, ImportMeta]); +impl_simple_enum!(ImportPhase, [Defer, Source, Evaluation]); diff --git a/crates/swc_ecma_quote_macros/src/ast/expr.rs b/crates/swc_ecma_quote_macros/src/ast/expr.rs index 282aa40f63c6..71ff45115fba 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 17b2ebcfa1e8..2559fa1089ae 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]);