biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
JsModule {
    bom_token: missing (optional),
    interpreter_token: missing (optional),
    directives: JsDirectiveList [],
    items: JsModuleItemList [
        JsExpressionStatement {
            expression: JsBinaryExpression {
                left: JsBinaryExpression {
                    left: JsNumberLiteralExpression {
                        value_token: JS_NUMBER_LITERAL@0..2 "1" [] [Whitespace(" ")],
                    },
                    operator_token: SHR@2..21 ">>" [] [Whitespace(" "), Comments("/* a comment */"), Whitespace(" ")],
                    right: missing (required),
                },
                operator_token: R_ANGLE@21..23 ">" [] [Whitespace(" ")],
                right: JsNumberLiteralExpression {
                    value_token: JS_NUMBER_LITERAL@23..24 "2" [] [],
                },
            },
            semicolon_token: SEMICOLON@24..25 ";" [] [],
        },
    ],
    eof_token: EOF@25..26 "" [Newline("\n")] [],
}

0: JS_MODULE@0..26
  0: (empty)
  1: (empty)
  2: JS_DIRECTIVE_LIST@0..0
  3: JS_MODULE_ITEM_LIST@0..25
    0: JS_EXPRESSION_STATEMENT@0..25
      0: JS_BINARY_EXPRESSION@0..24
        0: JS_BINARY_EXPRESSION@0..21
          0: JS_NUMBER_LITERAL_EXPRESSION@0..2
            0: JS_NUMBER_LITERAL@0..2 "1" [] [Whitespace(" ")]
          1: SHR@2..21 ">>" [] [Whitespace(" "), Comments("/* a comment */"), Whitespace(" ")]
          2: (empty)
        1: R_ANGLE@21..23 ">" [] [Whitespace(" ")]
        2: JS_NUMBER_LITERAL_EXPRESSION@23..24
          0: JS_NUMBER_LITERAL@23..24 "2" [] []
      1: SEMICOLON@24..25 ";" [] []
  4: EOF@25..26 "" [Newline("\n")] []
--
js_right_shift_comments.js:1:22 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Expected an expression but instead found '>'.
  
  > 1 │ 1 >> /* a comment */ > 2;
      │                      ^
    2 │ 
  
  i Expected an expression here.
  
  > 1 │ 1 >> /* a comment */ > 2;
      │                      ^
    2 │ 
  
--
1 >> /* a comment */ > 2;