biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
JsModule {
    bom_token: missing (optional),
    interpreter_token: missing (optional),
    directives: JsDirectiveList [],
    items: JsModuleItemList [
        JsIfStatement {
            if_token: IF_KW@0..3 "if" [] [Whitespace(" ")],
            l_paren_token: L_PAREN@3..4 "(" [] [],
            test: JsBooleanLiteralExpression {
                value_token: TRUE_KW@4..8 "true" [] [],
            },
            r_paren_token: R_PAREN@8..10 ")" [] [Whitespace(" ")],
            consequent: JsBlockStatement {
                l_curly_token: L_CURLY@10..11 "{" [] [],
                statements: JsStatementList [],
                r_curly_token: R_CURLY@11..13 "}" [] [Whitespace(" ")],
            },
            else_clause: JsElseClause {
                else_token: ELSE_KW@13..18 "else" [] [Whitespace(" ")],
                alternate: JsBlockStatement {
                    l_curly_token: L_CURLY@18..19 "{" [] [],
                    statements: JsStatementList [],
                    r_curly_token: R_CURLY@19..20 "}" [] [],
                },
            },
        },
        JsIfStatement {
            if_token: IF_KW@20..24 "if" [Newline("\n")] [Whitespace(" ")],
            l_paren_token: L_PAREN@24..25 "(" [] [],
            test: JsBooleanLiteralExpression {
                value_token: TRUE_KW@25..29 "true" [] [],
            },
            r_paren_token: R_PAREN@29..31 ")" [] [Whitespace(" ")],
            consequent: JsBlockStatement {
                l_curly_token: L_CURLY@31..32 "{" [] [],
                statements: JsStatementList [],
                r_curly_token: R_CURLY@32..33 "}" [] [],
            },
            else_clause: missing (optional),
        },
        JsIfStatement {
            if_token: IF_KW@33..37 "if" [Newline("\n")] [Whitespace(" ")],
            l_paren_token: L_PAREN@37..38 "(" [] [],
            test: JsBooleanLiteralExpression {
                value_token: TRUE_KW@38..42 "true" [] [],
            },
            r_paren_token: R_PAREN@42..44 ")" [] [Whitespace(" ")],
            consequent: JsExpressionStatement {
                expression: JsBooleanLiteralExpression {
                    value_token: FALSE_KW@44..49 "false" [] [],
                },
                semicolon_token: missing (optional),
            },
            else_clause: missing (optional),
        },
        JsIfStatement {
            if_token: IF_KW@49..53 "if" [Newline("\n")] [Whitespace(" ")],
            l_paren_token: L_PAREN@53..54 "(" [] [],
            test: JsIdentifierExpression {
                name: JsReferenceIdentifier {
                    value_token: IDENT@54..57 "bar" [] [],
                },
            },
            r_paren_token: R_PAREN@57..59 ")" [] [Whitespace(" ")],
            consequent: JsBlockStatement {
                l_curly_token: L_CURLY@59..60 "{" [] [],
                statements: JsStatementList [],
                r_curly_token: R_CURLY@60..62 "}" [] [Whitespace(" ")],
            },
            else_clause: JsElseClause {
                else_token: ELSE_KW@62..67 "else" [] [Whitespace(" ")],
                alternate: JsIfStatement {
                    if_token: IF_KW@67..70 "if" [] [Whitespace(" ")],
                    l_paren_token: L_PAREN@70..71 "(" [] [],
                    test: JsBooleanLiteralExpression {
                        value_token: TRUE_KW@71..75 "true" [] [],
                    },
                    r_paren_token: R_PAREN@75..77 ")" [] [Whitespace(" ")],
                    consequent: JsBlockStatement {
                        l_curly_token: L_CURLY@77..78 "{" [] [],
                        statements: JsStatementList [],
                        r_curly_token: R_CURLY@78..80 "}" [] [Whitespace(" ")],
                    },
                    else_clause: JsElseClause {
                        else_token: ELSE_KW@80..85 "else" [] [Whitespace(" ")],
                        alternate: JsBlockStatement {
                            l_curly_token: L_CURLY@85..86 "{" [] [],
                            statements: JsStatementList [],
                            r_curly_token: R_CURLY@86..87 "}" [] [],
                        },
                    },
                },
            },
        },
    ],
    eof_token: EOF@87..88 "" [Newline("\n")] [],
}

0: JS_MODULE@0..88
  0: (empty)
  1: (empty)
  2: JS_DIRECTIVE_LIST@0..0
  3: JS_MODULE_ITEM_LIST@0..87
    0: JS_IF_STATEMENT@0..20
      0: IF_KW@0..3 "if" [] [Whitespace(" ")]
      1: L_PAREN@3..4 "(" [] []
      2: JS_BOOLEAN_LITERAL_EXPRESSION@4..8
        0: TRUE_KW@4..8 "true" [] []
      3: R_PAREN@8..10 ")" [] [Whitespace(" ")]
      4: JS_BLOCK_STATEMENT@10..13
        0: L_CURLY@10..11 "{" [] []
        1: JS_STATEMENT_LIST@11..11
        2: R_CURLY@11..13 "}" [] [Whitespace(" ")]
      5: JS_ELSE_CLAUSE@13..20
        0: ELSE_KW@13..18 "else" [] [Whitespace(" ")]
        1: JS_BLOCK_STATEMENT@18..20
          0: L_CURLY@18..19 "{" [] []
          1: JS_STATEMENT_LIST@19..19
          2: R_CURLY@19..20 "}" [] []
    1: JS_IF_STATEMENT@20..33
      0: IF_KW@20..24 "if" [Newline("\n")] [Whitespace(" ")]
      1: L_PAREN@24..25 "(" [] []
      2: JS_BOOLEAN_LITERAL_EXPRESSION@25..29
        0: TRUE_KW@25..29 "true" [] []
      3: R_PAREN@29..31 ")" [] [Whitespace(" ")]
      4: JS_BLOCK_STATEMENT@31..33
        0: L_CURLY@31..32 "{" [] []
        1: JS_STATEMENT_LIST@32..32
        2: R_CURLY@32..33 "}" [] []
      5: (empty)
    2: JS_IF_STATEMENT@33..49
      0: IF_KW@33..37 "if" [Newline("\n")] [Whitespace(" ")]
      1: L_PAREN@37..38 "(" [] []
      2: JS_BOOLEAN_LITERAL_EXPRESSION@38..42
        0: TRUE_KW@38..42 "true" [] []
      3: R_PAREN@42..44 ")" [] [Whitespace(" ")]
      4: JS_EXPRESSION_STATEMENT@44..49
        0: JS_BOOLEAN_LITERAL_EXPRESSION@44..49
          0: FALSE_KW@44..49 "false" [] []
        1: (empty)
      5: (empty)
    3: JS_IF_STATEMENT@49..87
      0: IF_KW@49..53 "if" [Newline("\n")] [Whitespace(" ")]
      1: L_PAREN@53..54 "(" [] []
      2: JS_IDENTIFIER_EXPRESSION@54..57
        0: JS_REFERENCE_IDENTIFIER@54..57
          0: IDENT@54..57 "bar" [] []
      3: R_PAREN@57..59 ")" [] [Whitespace(" ")]
      4: JS_BLOCK_STATEMENT@59..62
        0: L_CURLY@59..60 "{" [] []
        1: JS_STATEMENT_LIST@60..60
        2: R_CURLY@60..62 "}" [] [Whitespace(" ")]
      5: JS_ELSE_CLAUSE@62..87
        0: ELSE_KW@62..67 "else" [] [Whitespace(" ")]
        1: JS_IF_STATEMENT@67..87
          0: IF_KW@67..70 "if" [] [Whitespace(" ")]
          1: L_PAREN@70..71 "(" [] []
          2: JS_BOOLEAN_LITERAL_EXPRESSION@71..75
            0: TRUE_KW@71..75 "true" [] []
          3: R_PAREN@75..77 ")" [] [Whitespace(" ")]
          4: JS_BLOCK_STATEMENT@77..80
            0: L_CURLY@77..78 "{" [] []
            1: JS_STATEMENT_LIST@78..78
            2: R_CURLY@78..80 "}" [] [Whitespace(" ")]
          5: JS_ELSE_CLAUSE@80..87
            0: ELSE_KW@80..85 "else" [] [Whitespace(" ")]
            1: JS_BLOCK_STATEMENT@85..87
              0: L_CURLY@85..86 "{" [] []
              1: JS_STATEMENT_LIST@86..86
              2: R_CURLY@86..87 "}" [] []
  4: EOF@87..88 "" [Newline("\n")] []