biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
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: JsIdentifierBinding {
                            name_token: IDENT@4..6 "b" [] [Whitespace(" ")],
                        },
                        variable_annotation: missing (optional),
                        initializer: JsInitializerClause {
                            eq_token: EQ@6..8 "=" [] [Whitespace(" ")],
                            expression: JsObjectExpression {
                                l_curly_token: L_CURLY@8..10 "{" [] [Whitespace(" ")],
                                members: JsObjectMemberList [
                                    JsShorthandPropertyObjectMember {
                                        name: JsReferenceIdentifier {
                                            value_token: IDENT@10..13 "foo" [] [],
                                        },
                                    },
                                    missing separator,
                                    JsBogusMember {
                                        items: [
                                            R_PAREN@13..15 ")" [] [Whitespace(" ")],
                                        ],
                                    },
                                ],
                                r_curly_token: R_CURLY@15..16 "}" [] [],
                            },
                        },
                    },
                ],
            },
            semicolon_token: missing (optional),
        },
    ],
    eof_token: EOF@16..17 "" [Newline("\n")] [],
}

0: JS_MODULE@0..17
  0: (empty)
  1: (empty)
  2: JS_DIRECTIVE_LIST@0..0
  3: JS_MODULE_ITEM_LIST@0..16
    0: JS_VARIABLE_STATEMENT@0..16
      0: JS_VARIABLE_DECLARATION@0..16
        0: (empty)
        1: LET_KW@0..4 "let" [] [Whitespace(" ")]
        2: JS_VARIABLE_DECLARATOR_LIST@4..16
          0: JS_VARIABLE_DECLARATOR@4..16
            0: JS_IDENTIFIER_BINDING@4..6
              0: IDENT@4..6 "b" [] [Whitespace(" ")]
            1: (empty)
            2: JS_INITIALIZER_CLAUSE@6..16
              0: EQ@6..8 "=" [] [Whitespace(" ")]
              1: JS_OBJECT_EXPRESSION@8..16
                0: L_CURLY@8..10 "{" [] [Whitespace(" ")]
                1: JS_OBJECT_MEMBER_LIST@10..15
                  0: JS_SHORTHAND_PROPERTY_OBJECT_MEMBER@10..13
                    0: JS_REFERENCE_IDENTIFIER@10..13
                      0: IDENT@10..13 "foo" [] []
                  1: (empty)
                  2: JS_BOGUS_MEMBER@13..15
                    0: R_PAREN@13..15 ")" [] [Whitespace(" ")]
                2: R_CURLY@15..16 "}" [] []
      1: (empty)
  4: EOF@16..17 "" [Newline("\n")] []
--
object_expr_method.js:1:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × expected `,` but instead found `)`
  
  > 1 │ let b = { foo) }
      │              ^
    2 │ 
  
  i Remove )
  
--
let b = { foo) }