swc_ecma_quote_macros/ast/
module_decl.rs1use swc_ecma_ast::*;
2
3impl_enum!(
4 ModuleDecl,
5 [
6 Import,
7 ExportDecl,
8 ExportNamed,
9 ExportDefaultDecl,
10 ExportDefaultExpr,
11 ExportAll,
12 TsImportEquals,
13 TsExportAssignment,
14 TsNamespaceExport
15 ]
16);
17
18impl_struct!(ImportDecl, [span, specifiers, src, type_only, with, phase]);
19impl_struct!(ExportDecl, [span, decl]);
20impl_struct!(ExportDefaultDecl, [span, decl]);
21impl_struct!(ExportDefaultExpr, [span, expr]);
22impl_struct!(ExportAll, [span, type_only, src, with]);
23impl_struct!(NamedExport, [span, specifiers, src, type_only, with]);
24
25impl_enum!(ImportSpecifier, [Named, Default, Namespace]);
26
27impl_struct!(ImportNamedSpecifier, [span, local, imported, is_type_only]);
28impl_struct!(ImportDefaultSpecifier, [span, local]);
29impl_struct!(ImportStarAsSpecifier, [span, local]);
30
31impl_enum!(ExportSpecifier, [Named, Default, Namespace]);
32
33impl_enum!(DefaultDecl, [Class, Fn, TsInterfaceDecl]);
34
35impl_enum!(ModuleExportName, [Ident, Str]);
36
37impl_struct!(ExportNamedSpecifier, [span, orig, exported, is_type_only]);
38impl_struct!(ExportDefaultSpecifier, [exported]);
39impl_struct!(ExportNamespaceSpecifier, [span, name]);