swc_ecma_quote_macros/ast/
decl.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use swc_ecma_ast::*;

impl_enum!(
    Decl,
    [
        Class,
        Fn,
        Var,
        TsInterface,
        TsTypeAlias,
        TsEnum,
        TsModule,
        Using
    ]
);

impl_struct!(ClassDecl, [ident, declare, class]);
impl_struct!(FnDecl, [ident, declare, function]);
impl_struct!(VarDecl, [span, ctxt, kind, declare, decls]);
impl_struct!(VarDeclarator, [span, name, init, definite]);
impl_struct!(UsingDecl, [span, is_await, decls]);