biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
JsScript {
    bom_token: missing (optional),
    interpreter_token: missing (optional),
    directives: JsDirectiveList [],
    statements: JsStatementList [
        JsFunctionDeclaration {
            async_token: missing (optional),
            function_token: FUNCTION_KW@0..19 "function" [Comments("// SCRIPT"), Newline("\n")] [Whitespace(" ")],
            star_token: missing (optional),
            id: JsIdentifierBinding {
                name_token: IDENT@19..23 "test" [] [],
            },
            type_parameters: missing (optional),
            parameters: JsParameters {
                l_paren_token: L_PAREN@23..24 "(" [] [],
                items: JsParameterList [
                    JsFormalParameter {
                        decorators: JsDecoratorList [],
                        binding: JsIdentifierBinding {
                            name_token: IDENT@24..29 "await" [] [],
                        },
                        question_mark_token: missing (optional),
                        type_annotation: missing (optional),
                        initializer: missing (optional),
                    },
                ],
                r_paren_token: R_PAREN@29..31 ")" [] [Whitespace(" ")],
            },
            return_type_annotation: missing (optional),
            body: JsFunctionBody {
                l_curly_token: L_CURLY@31..32 "{" [] [],
                directives: JsDirectiveList [],
                statements: JsStatementList [],
                r_curly_token: R_CURLY@32..33 "}" [] [],
            },
        },
    ],
    eof_token: EOF@33..34 "" [Newline("\n")] [],
}

0: JS_SCRIPT@0..34
  0: (empty)
  1: (empty)
  2: JS_DIRECTIVE_LIST@0..0
  3: JS_STATEMENT_LIST@0..33
    0: JS_FUNCTION_DECLARATION@0..33
      0: (empty)
      1: FUNCTION_KW@0..19 "function" [Comments("// SCRIPT"), Newline("\n")] [Whitespace(" ")]
      2: (empty)
      3: JS_IDENTIFIER_BINDING@19..23
        0: IDENT@19..23 "test" [] []
      4: (empty)
      5: JS_PARAMETERS@23..31
        0: L_PAREN@23..24 "(" [] []
        1: JS_PARAMETER_LIST@24..29
          0: JS_FORMAL_PARAMETER@24..29
            0: JS_DECORATOR_LIST@24..24
            1: JS_IDENTIFIER_BINDING@24..29
              0: IDENT@24..29 "await" [] []
            2: (empty)
            3: (empty)
            4: (empty)
        2: R_PAREN@29..31 ")" [] [Whitespace(" ")]
      6: (empty)
      7: JS_FUNCTION_BODY@31..33
        0: L_CURLY@31..32 "{" [] []
        1: JS_DIRECTIVE_LIST@32..32
        2: JS_STATEMENT_LIST@32..32
        3: R_CURLY@32..33 "}" [] []
  4: EOF@33..34 "" [Newline("\n")] []