JsModule {
bom_token: missing (optional),
interpreter_token: missing (optional),
directives: JsDirectiveList [],
items: JsModuleItemList [
JsClassDeclaration {
decorators: JsDecoratorList [],
abstract_token: missing (optional),
class_token: CLASS_KW@0..6 "class" [] [Whitespace(" ")],
id: JsIdentifierBinding {
name_token: IDENT@6..14 "Setters" [] [Whitespace(" ")],
},
type_parameters: missing (optional),
extends_clause: missing (optional),
implements_clause: missing (optional),
l_curly_token: L_CURLY@14..15 "{" [] [],
members: JsClassMemberList [
JsSetterClassMember {
modifiers: JsMethodModifierList [],
set_token: SET_KW@15..22 "set" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")],
name: JsLiteralMemberName {
value: IDENT@22..25 "foo" [] [],
},
l_paren_token: L_PAREN@25..26 "(" [] [],
parameter: JsFormalParameter {
decorators: JsDecoratorList [],
binding: JsIdentifierBinding {
name_token: IDENT@26..27 "a" [] [],
},
question_mark_token: missing (optional),
type_annotation: missing (optional),
initializer: missing (optional),
},
r_paren_token: R_PAREN@27..28 ")" [] [],
body: missing (required),
},
],
r_curly_token: R_CURLY@28..30 "}" [Newline("\n")] [],
},
],
eof_token: EOF@30..31 "" [Newline("\n")] [],
}
0: JS_MODULE@0..31
0: (empty)
1: (empty)
2: JS_DIRECTIVE_LIST@0..0
3: JS_MODULE_ITEM_LIST@0..30
0: JS_CLASS_DECLARATION@0..30
0: JS_DECORATOR_LIST@0..0
1: (empty)
2: CLASS_KW@0..6 "class" [] [Whitespace(" ")]
3: JS_IDENTIFIER_BINDING@6..14
0: IDENT@6..14 "Setters" [] [Whitespace(" ")]
4: (empty)
5: (empty)
6: (empty)
7: L_CURLY@14..15 "{" [] []
8: JS_CLASS_MEMBER_LIST@15..28
0: JS_SETTER_CLASS_MEMBER@15..28
0: JS_METHOD_MODIFIER_LIST@15..15
1: SET_KW@15..22 "set" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")]
2: JS_LITERAL_MEMBER_NAME@22..25
0: IDENT@22..25 "foo" [] []
3: L_PAREN@25..26 "(" [] []
4: JS_FORMAL_PARAMETER@26..27
0: JS_DECORATOR_LIST@26..26
1: JS_IDENTIFIER_BINDING@26..27
0: IDENT@26..27 "a" [] []
2: (empty)
3: (empty)
4: (empty)
5: R_PAREN@27..28 ")" [] []
6: (empty)
9: R_CURLY@28..30 "}" [Newline("\n")] []
4: EOF@30..31 "" [Newline("\n")] []
--
setter_class_no_body.js:3:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Expected a class method body but instead found '}'.
1 │ class Setters {
2 │ set foo(a)
> 3 │ }
│ ^
4 │
i Expected a class method body here.
1 │ class Setters {
2 │ set foo(a)
> 3 │ }
│ ^
4 │
--
class Setters {
set foo(a)
}