JsModule {
bom_token: missing (optional),
interpreter_token: missing (optional),
directives: JsDirectiveList [],
items: JsModuleItemList [
JsVariableStatement {
declaration: JsVariableDeclaration {
await_token: missing (optional),
kind: LET_KW@0..4 "let" [] [Whitespace(" ")],
declarators: JsVariableDeclaratorList [
JsVariableDeclarator {
id: JsObjectBindingPattern {
l_curly_token: L_CURLY@4..6 "{" [] [Whitespace(" ")],
properties: JsObjectBindingPatternPropertyList [
JsObjectBindingPatternProperty {
member: JsLiteralMemberName {
value: IDENT@6..9 "foo" [] [],
},
colon_token: COLON@9..11 ":" [] [Whitespace(" ")],
pattern: missing (required),
init: missing (optional),
},
COMMA@11..13 "," [] [Whitespace(" ")],
JsObjectBindingPatternShorthandProperty {
identifier: JsIdentifierBinding {
name_token: IDENT@13..17 "bar" [] [Whitespace(" ")],
},
init: missing (optional),
},
],
r_curly_token: R_CURLY@17..19 "}" [] [Whitespace(" ")],
},
variable_annotation: missing (optional),
initializer: JsInitializerClause {
eq_token: EQ@19..21 "=" [] [Whitespace(" ")],
expression: JsObjectExpression {
l_curly_token: L_CURLY@21..22 "{" [] [],
members: JsObjectMemberList [],
r_curly_token: R_CURLY@22..23 "}" [] [],
},
},
},
],
},
semicolon_token: missing (optional),
},
JsVariableStatement {
declaration: JsVariableDeclaration {
await_token: missing (optional),
kind: LET_KW@23..28 "let" [Newline("\n")] [Whitespace(" ")],
declarators: JsVariableDeclaratorList [
JsVariableDeclarator {
id: JsObjectBindingPattern {
l_curly_token: L_CURLY@28..30 "{" [] [Whitespace(" ")],
properties: JsObjectBindingPatternPropertyList [
JsObjectBindingPatternProperty {
member: missing (required),
colon_token: COLON@30..32 ":" [] [Whitespace(" ")],
pattern: JsIdentifierBinding {
name_token: IDENT@32..38 "lorem" [] [Whitespace(" ")],
},
init: JsInitializerClause {
eq_token: EQ@38..40 "=" [] [Whitespace(" ")],
expression: JsStringLiteralExpression {
value_token: JS_STRING_LITERAL@40..47 "\"test\"" [] [Whitespace(" ")],
},
},
},
],
r_curly_token: R_CURLY@47..49 "}" [] [Whitespace(" ")],
},
variable_annotation: missing (optional),
initializer: JsInitializerClause {
eq_token: EQ@49..51 "=" [] [Whitespace(" ")],
expression: JsObjectExpression {
l_curly_token: L_CURLY@51..52 "{" [] [],
members: JsObjectMemberList [],
r_curly_token: R_CURLY@52..53 "}" [] [],
},
},
},
],
},
semicolon_token: missing (optional),
},
JsVariableStatement {
declaration: JsVariableDeclaration {
await_token: missing (optional),
kind: LET_KW@53..58 "let" [Newline("\n")] [Whitespace(" ")],
declarators: JsVariableDeclaratorList [
JsVariableDeclarator {
id: JsObjectBindingPattern {
l_curly_token: L_CURLY@58..60 "{" [] [Whitespace(" ")],
properties: JsObjectBindingPatternPropertyList [
missing element,
COMMA@60..62 "," [] [Whitespace(" ")],
JsObjectBindingPatternProperty {
member: JsLiteralMemberName {
value: IDENT@62..67 "ipsum" [] [],
},
colon_token: COLON@67..69 ":" [] [Whitespace(" ")],
pattern: JsIdentifierBinding {
name_token: IDENT@69..74 "bazz" [] [Whitespace(" ")],
},
init: missing (optional),
},
],
r_curly_token: R_CURLY@74..76 "}" [] [Whitespace(" ")],
},
variable_annotation: missing (optional),
initializer: JsInitializerClause {
eq_token: EQ@76..78 "=" [] [Whitespace(" ")],
expression: JsObjectExpression {
l_curly_token: L_CURLY@78..79 "{" [] [],
members: JsObjectMemberList [],
r_curly_token: R_CURLY@79..80 "}" [] [],
},
},
},
],
},
semicolon_token: missing (optional),
},
],
eof_token: EOF@80..81 "" [Newline("\n")] [],
}
0: JS_MODULE@0..81
0: (empty)
1: (empty)
2: JS_DIRECTIVE_LIST@0..0
3: JS_MODULE_ITEM_LIST@0..80
0: JS_VARIABLE_STATEMENT@0..23
0: JS_VARIABLE_DECLARATION@0..23
0: (empty)
1: LET_KW@0..4 "let" [] [Whitespace(" ")]
2: JS_VARIABLE_DECLARATOR_LIST@4..23
0: JS_VARIABLE_DECLARATOR@4..23
0: JS_OBJECT_BINDING_PATTERN@4..19
0: L_CURLY@4..6 "{" [] [Whitespace(" ")]
1: JS_OBJECT_BINDING_PATTERN_PROPERTY_LIST@6..17
0: JS_OBJECT_BINDING_PATTERN_PROPERTY@6..11
0: JS_LITERAL_MEMBER_NAME@6..9
0: IDENT@6..9 "foo" [] []
1: COLON@9..11 ":" [] [Whitespace(" ")]
2: (empty)
3: (empty)
1: COMMA@11..13 "," [] [Whitespace(" ")]
2: JS_OBJECT_BINDING_PATTERN_SHORTHAND_PROPERTY@13..17
0: JS_IDENTIFIER_BINDING@13..17
0: IDENT@13..17 "bar" [] [Whitespace(" ")]
1: (empty)
2: R_CURLY@17..19 "}" [] [Whitespace(" ")]
1: (empty)
2: JS_INITIALIZER_CLAUSE@19..23
0: EQ@19..21 "=" [] [Whitespace(" ")]
1: JS_OBJECT_EXPRESSION@21..23
0: L_CURLY@21..22 "{" [] []
1: JS_OBJECT_MEMBER_LIST@22..22
2: R_CURLY@22..23 "}" [] []
1: (empty)
1: JS_VARIABLE_STATEMENT@23..53
0: JS_VARIABLE_DECLARATION@23..53
0: (empty)
1: LET_KW@23..28 "let" [Newline("\n")] [Whitespace(" ")]
2: JS_VARIABLE_DECLARATOR_LIST@28..53
0: JS_VARIABLE_DECLARATOR@28..53
0: JS_OBJECT_BINDING_PATTERN@28..49
0: L_CURLY@28..30 "{" [] [Whitespace(" ")]
1: JS_OBJECT_BINDING_PATTERN_PROPERTY_LIST@30..47
0: JS_OBJECT_BINDING_PATTERN_PROPERTY@30..47
0: (empty)
1: COLON@30..32 ":" [] [Whitespace(" ")]
2: JS_IDENTIFIER_BINDING@32..38
0: IDENT@32..38 "lorem" [] [Whitespace(" ")]
3: JS_INITIALIZER_CLAUSE@38..47
0: EQ@38..40 "=" [] [Whitespace(" ")]
1: JS_STRING_LITERAL_EXPRESSION@40..47
0: JS_STRING_LITERAL@40..47 "\"test\"" [] [Whitespace(" ")]
2: R_CURLY@47..49 "}" [] [Whitespace(" ")]
1: (empty)
2: JS_INITIALIZER_CLAUSE@49..53
0: EQ@49..51 "=" [] [Whitespace(" ")]
1: JS_OBJECT_EXPRESSION@51..53
0: L_CURLY@51..52 "{" [] []
1: JS_OBJECT_MEMBER_LIST@52..52
2: R_CURLY@52..53 "}" [] []
1: (empty)
2: JS_VARIABLE_STATEMENT@53..80
0: JS_VARIABLE_DECLARATION@53..80
0: (empty)
1: LET_KW@53..58 "let" [Newline("\n")] [Whitespace(" ")]
2: JS_VARIABLE_DECLARATOR_LIST@58..80
0: JS_VARIABLE_DECLARATOR@58..80
0: JS_OBJECT_BINDING_PATTERN@58..76
0: L_CURLY@58..60 "{" [] [Whitespace(" ")]
1: JS_OBJECT_BINDING_PATTERN_PROPERTY_LIST@60..74
0: (empty)
1: COMMA@60..62 "," [] [Whitespace(" ")]
2: JS_OBJECT_BINDING_PATTERN_PROPERTY@62..74
0: JS_LITERAL_MEMBER_NAME@62..67
0: IDENT@62..67 "ipsum" [] []
1: COLON@67..69 ":" [] [Whitespace(" ")]
2: JS_IDENTIFIER_BINDING@69..74
0: IDENT@69..74 "bazz" [] [Whitespace(" ")]
3: (empty)
2: R_CURLY@74..76 "}" [] [Whitespace(" ")]
1: (empty)
2: JS_INITIALIZER_CLAUSE@76..80
0: EQ@76..78 "=" [] [Whitespace(" ")]
1: JS_OBJECT_EXPRESSION@78..80
0: L_CURLY@78..79 "{" [] []
1: JS_OBJECT_MEMBER_LIST@79..79
2: R_CURLY@79..80 "}" [] []
1: (empty)
4: EOF@80..81 "" [Newline("\n")] []
--
object_property_binding_err.js:1:12 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Expected an identifier, an array pattern, or an object pattern but instead found ','.
> 1 │ let { foo: , bar } = {}
│ ^
2 │ let { : lorem = "test" } = {}
3 │ let { , ipsum: bazz } = {}
i Expected an identifier, an array pattern, or an object pattern here.
> 1 │ let { foo: , bar } = {}
│ ^
2 │ let { : lorem = "test" } = {}
3 │ let { , ipsum: bazz } = {}
--
object_property_binding_err.js:2:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Expected an identifier, a string literal, a number literal, or a computed property but instead found ':'.
1 │ let { foo: , bar } = {}
> 2 │ let { : lorem = "test" } = {}
│ ^
3 │ let { , ipsum: bazz } = {}
4 │
i Expected an identifier, a string literal, a number literal, or a computed property here.
1 │ let { foo: , bar } = {}
> 2 │ let { : lorem = "test" } = {}
│ ^
3 │ let { , ipsum: bazz } = {}
4 │
--
object_property_binding_err.js:3:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Expected an identifier, a member name, or a rest pattern but instead found ','.
1 │ let { foo: , bar } = {}
2 │ let { : lorem = "test" } = {}
> 3 │ let { , ipsum: bazz } = {}
│ ^
4 │
i Expected an identifier, a member name, or a rest pattern here.
1 │ let { foo: , bar } = {}
2 │ let { : lorem = "test" } = {}
> 3 │ let { , ipsum: bazz } = {}
│ ^
4 │
--
let { foo: , bar } = {}
let { : lorem = "test" } = {}
let { , ipsum: bazz } = {}