biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
JsModule {
    bom_token: missing (optional),
    interpreter_token: missing (optional),
    directives: JsDirectiveList [],
    items: JsModuleItemList [
        JsBogusStatement {
            items: [
                DECLARE_KW@0..8 "declare" [] [Whitespace(" ")],
                JsBogusStatement {
                    items: [
                        ASYNC_KW@8..14 "async" [] [Whitespace(" ")],
                        FUNCTION_KW@14..23 "function" [] [Whitespace(" ")],
                        JsIdentifierBinding {
                            name_token: IDENT@23..27 "test" [] [],
                        },
                        JsParameters {
                            l_paren_token: L_PAREN@27..28 "(" [] [],
                            items: JsParameterList [],
                            r_paren_token: R_PAREN@28..29 ")" [] [],
                        },
                        SEMICOLON@29..30 ";" [] [],
                    ],
                },
            ],
        },
    ],
    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_BOGUS_STATEMENT@0..30
      0: DECLARE_KW@0..8 "declare" [] [Whitespace(" ")]
      1: JS_BOGUS_STATEMENT@8..30
        0: ASYNC_KW@8..14 "async" [] [Whitespace(" ")]
        1: FUNCTION_KW@14..23 "function" [] [Whitespace(" ")]
        2: JS_IDENTIFIER_BINDING@23..27
          0: IDENT@23..27 "test" [] []
        3: JS_PARAMETERS@27..29
          0: L_PAREN@27..28 "(" [] []
          1: JS_PARAMETER_LIST@28..28
          2: R_PAREN@28..29 ")" [] []
        4: SEMICOLON@29..30 ";" [] []
  4: EOF@30..31 "" [Newline("\n")] []
--
ts_declare_async_function.ts:1:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × 'async' modifier cannot be used in an ambient context.
  
  > 1 │ declare async function test();
      │         ^^^^^
    2 │ 
  
--
declare async function test();