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: missing (required), else_clause: JsElseClause { else_token: ELSE_KW@10..15 "else" [] [Whitespace(" ")], alternate: JsBlockStatement { l_curly_token: L_CURLY@15..16 "{" [] [], statements: JsStatementList [], r_curly_token: R_CURLY@16..17 "}" [] [], }, }, }, JsIfStatement { if_token: IF_KW@17..21 "if" [Newline("\n")] [Whitespace(" ")], l_paren_token: L_PAREN@21..22 "(" [] [], test: JsBooleanLiteralExpression { value_token: TRUE_KW@22..26 "true" [] [], }, r_paren_token: R_PAREN@26..28 ")" [] [Whitespace(" ")], consequent: missing (required), else_clause: JsElseClause { else_token: ELSE_KW@28..32 "else" [] [], alternate: JsIfStatement { if_token: IF_KW@32..36 "if" [Newline("\n")] [Whitespace(" ")], l_paren_token: missing (required), test: missing (required), r_paren_token: missing (required), consequent: missing (required), else_clause: JsElseClause { else_token: ELSE_KW@36..41 "else" [] [Whitespace(" ")], alternate: JsBlockStatement { l_curly_token: L_CURLY@41..42 "{" [] [], statements: JsStatementList [], r_curly_token: R_CURLY@42..43 "}" [] [], }, }, }, }, }, JsIfStatement { if_token: IF_KW@43..47 "if" [Newline("\n")] [Whitespace(" ")], l_paren_token: L_PAREN@47..48 "(" [] [], test: missing (required), r_paren_token: R_PAREN@48..50 ")" [] [Whitespace(" ")], consequent: JsBlockStatement { l_curly_token: L_CURLY@50..51 "{" [] [], statements: JsStatementList [], r_curly_token: R_CURLY@51..53 "}" [] [Whitespace(" ")], }, else_clause: JsElseClause { else_token: ELSE_KW@53..58 "else" [] [Whitespace(" ")], alternate: JsBlockStatement { l_curly_token: L_CURLY@58..59 "{" [] [], statements: JsStatementList [], r_curly_token: R_CURLY@59..60 "}" [] [], }, }, }, JsIfStatement { if_token: IF_KW@60..64 "if" [Newline("\n")] [Whitespace(" ")], l_paren_token: L_PAREN@64..65 "(" [] [], test: JsBooleanLiteralExpression { value_token: TRUE_KW@65..69 "true" [] [], }, r_paren_token: R_PAREN@69..70 ")" [] [], consequent: missing (required), else_clause: missing (optional), }, JsBogusStatement { items: [ R_CURLY@70..71 "}" [] [], R_CURLY@71..72 "}" [] [], R_CURLY@72..73 "}" [] [], R_CURLY@73..75 "}" [] [Whitespace(" ")], ], }, JsBlockStatement { l_curly_token: L_CURLY@75..76 "{" [] [], statements: JsStatementList [], r_curly_token: R_CURLY@76..77 "}" [] [], }, ], eof_token: EOF@77..78 "" [Newline("\n")] [], } 0: JS_MODULE@0..78 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..77 0: JS_IF_STATEMENT@0..17 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: (empty) 5: JS_ELSE_CLAUSE@10..17 0: ELSE_KW@10..15 "else" [] [Whitespace(" ")] 1: JS_BLOCK_STATEMENT@15..17 0: L_CURLY@15..16 "{" [] [] 1: JS_STATEMENT_LIST@16..16 2: R_CURLY@16..17 "}" [] [] 1: JS_IF_STATEMENT@17..43 0: IF_KW@17..21 "if" [Newline("\n")] [Whitespace(" ")] 1: L_PAREN@21..22 "(" [] [] 2: JS_BOOLEAN_LITERAL_EXPRESSION@22..26 0: TRUE_KW@22..26 "true" [] [] 3: R_PAREN@26..28 ")" [] [Whitespace(" ")] 4: (empty) 5: JS_ELSE_CLAUSE@28..43 0: ELSE_KW@28..32 "else" [] [] 1: JS_IF_STATEMENT@32..43 0: IF_KW@32..36 "if" [Newline("\n")] [Whitespace(" ")] 1: (empty) 2: (empty) 3: (empty) 4: (empty) 5: JS_ELSE_CLAUSE@36..43 0: ELSE_KW@36..41 "else" [] [Whitespace(" ")] 1: JS_BLOCK_STATEMENT@41..43 0: L_CURLY@41..42 "{" [] [] 1: JS_STATEMENT_LIST@42..42 2: R_CURLY@42..43 "}" [] [] 2: JS_IF_STATEMENT@43..60 0: IF_KW@43..47 "if" [Newline("\n")] [Whitespace(" ")] 1: L_PAREN@47..48 "(" [] [] 2: (empty) 3: R_PAREN@48..50 ")" [] [Whitespace(" ")] 4: JS_BLOCK_STATEMENT@50..53 0: L_CURLY@50..51 "{" [] [] 1: JS_STATEMENT_LIST@51..51 2: R_CURLY@51..53 "}" [] [Whitespace(" ")] 5: JS_ELSE_CLAUSE@53..60 0: ELSE_KW@53..58 "else" [] [Whitespace(" ")] 1: JS_BLOCK_STATEMENT@58..60 0: L_CURLY@58..59 "{" [] [] 1: JS_STATEMENT_LIST@59..59 2: R_CURLY@59..60 "}" [] [] 3: JS_IF_STATEMENT@60..70 0: IF_KW@60..64 "if" [Newline("\n")] [Whitespace(" ")] 1: L_PAREN@64..65 "(" [] [] 2: JS_BOOLEAN_LITERAL_EXPRESSION@65..69 0: TRUE_KW@65..69 "true" [] [] 3: R_PAREN@69..70 ")" [] [] 4: (empty) 5: (empty) 4: JS_BOGUS_STATEMENT@70..75 0: R_CURLY@70..71 "}" [] [] 1: R_CURLY@71..72 "}" [] [] 2: R_CURLY@72..73 "}" [] [] 3: R_CURLY@73..75 "}" [] [Whitespace(" ")] 5: JS_BLOCK_STATEMENT@75..77 0: L_CURLY@75..76 "{" [] [] 1: JS_STATEMENT_LIST@76..76 2: R_CURLY@76..77 "}" [] [] 4: EOF@77..78 "" [Newline("\n")] [] -- if_stmt_err.js:1:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a statement but instead found 'else'. > 1 │ if (true) else {} │ ^^^^ 2 │ if (true) else 3 │ if else {} i Expected a statement here. > 1 │ if (true) else {} │ ^^^^ 2 │ if (true) else 3 │ if else {} -- if_stmt_err.js:2:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a statement but instead found 'else'. 1 │ if (true) else {} > 2 │ if (true) else │ ^^^^ 3 │ if else {} 4 │ if () {} else {} i Expected a statement here. 1 │ if (true) else {} > 2 │ if (true) else │ ^^^^ 3 │ if else {} 4 │ if () {} else {} -- if_stmt_err.js:3:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `(` but instead found `else` 1 │ if (true) else {} 2 │ if (true) else > 3 │ if else {} │ ^^^^ 4 │ if () {} else {} 5 │ if (true)}}}} {} i Remove else -- if_stmt_err.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression but instead found ')'. 2 │ if (true) else 3 │ if else {} > 4 │ if () {} else {} │ ^ 5 │ if (true)}}}} {} 6 │ i Expected an expression here. 2 │ if (true) else 3 │ if else {} > 4 │ if () {} else {} │ ^ 5 │ if (true)}}}} {} 6 │ -- if_stmt_err.js:5:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a statement but instead found '}'. 3 │ if else {} 4 │ if () {} else {} > 5 │ if (true)}}}} {} │ ^ 6 │ i Expected a statement here. 3 │ if else {} 4 │ if () {} else {} > 5 │ if (true)}}}} {} │ ^ 6 │ -- if (true) else {} if (true) else if else {} if () {} else {} if (true)}}}} {}