swc_ecma_quote_macros/ast/
prop.rs

1use swc_ecma_ast::*;
2
3impl_enum!(Prop, [Shorthand, KeyValue, Assign, Getter, Setter, Method]);
4
5impl_struct!(
6    PrivateProp,
7    [
8        span,
9        ctxt,
10        definite,
11        key,
12        value,
13        type_ann,
14        is_static,
15        decorators,
16        accessibility,
17        is_optional,
18        is_override,
19        readonly
20    ]
21);
22
23impl_struct!(KeyValueProp, [key, value]);
24
25impl_struct!(AssignProp, [span, key, value]);
26
27impl_struct!(GetterProp, [span, key, type_ann, body]);
28impl_struct!(SetterProp, [span, key, param, this_param, body]);
29
30impl_struct!(MethodProp, [key, function]);
31
32impl_struct!(KeyValuePatProp, [key, value]);
33
34impl_struct!(AssignPatProp, [span, key, value]);
35
36impl_struct!(ComputedPropName, [span, expr]);
37
38impl_enum!(Key, [Private, Public]);