JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsExpressionStatement { expression: JsConditionalExpression { test: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@0..4 "foo" [] [Whitespace(" ")], }, }, question_mark_token: QUESTION@4..6 "?" [] [Whitespace(" ")], consequent: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@6..10 "bar" [] [Whitespace(" ")], }, }, colon_token: missing (required), alternate: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@10..13 "baz" [] [], }, }, }, semicolon_token: missing (optional), }, JsExpressionStatement { expression: JsConditionalExpression { test: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@13..18 "foo" [Newline("\n")] [Whitespace(" ")], }, }, question_mark_token: QUESTION@18..20 "?" [] [Whitespace(" ")], consequent: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@20..24 "bar" [] [Whitespace(" ")], }, }, colon_token: missing (required), alternate: JsConditionalExpression { test: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@24..28 "baz" [] [Whitespace(" ")], }, }, question_mark_token: QUESTION@28..30 "?" [] [Whitespace(" ")], consequent: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@30..34 "foo" [] [Whitespace(" ")], }, }, colon_token: COLON@34..36 ":" [] [Whitespace(" ")], alternate: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@36..39 "bar" [] [], }, }, }, }, semicolon_token: missing (optional), }, JsExpressionStatement { expression: JsConditionalExpression { test: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@39..44 "foo" [Newline("\n")] [Whitespace(" ")], }, }, question_mark_token: QUESTION@44..46 "?" [] [Whitespace(" ")], consequent: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@46..50 "bar" [] [Whitespace(" ")], }, }, colon_token: COLON@50..51 ":" [] [], alternate: missing (required), }, semicolon_token: missing (optional), }, ], eof_token: EOF@51..52 "" [Newline("\n")] [], } 0: JS_MODULE@0..52 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..51 0: JS_EXPRESSION_STATEMENT@0..13 0: JS_CONDITIONAL_EXPRESSION@0..13 0: JS_IDENTIFIER_EXPRESSION@0..4 0: JS_REFERENCE_IDENTIFIER@0..4 0: IDENT@0..4 "foo" [] [Whitespace(" ")] 1: QUESTION@4..6 "?" [] [Whitespace(" ")] 2: JS_IDENTIFIER_EXPRESSION@6..10 0: JS_REFERENCE_IDENTIFIER@6..10 0: IDENT@6..10 "bar" [] [Whitespace(" ")] 3: (empty) 4: JS_IDENTIFIER_EXPRESSION@10..13 0: JS_REFERENCE_IDENTIFIER@10..13 0: IDENT@10..13 "baz" [] [] 1: (empty) 1: JS_EXPRESSION_STATEMENT@13..39 0: JS_CONDITIONAL_EXPRESSION@13..39 0: JS_IDENTIFIER_EXPRESSION@13..18 0: JS_REFERENCE_IDENTIFIER@13..18 0: IDENT@13..18 "foo" [Newline("\n")] [Whitespace(" ")] 1: QUESTION@18..20 "?" [] [Whitespace(" ")] 2: JS_IDENTIFIER_EXPRESSION@20..24 0: JS_REFERENCE_IDENTIFIER@20..24 0: IDENT@20..24 "bar" [] [Whitespace(" ")] 3: (empty) 4: JS_CONDITIONAL_EXPRESSION@24..39 0: JS_IDENTIFIER_EXPRESSION@24..28 0: JS_REFERENCE_IDENTIFIER@24..28 0: IDENT@24..28 "baz" [] [Whitespace(" ")] 1: QUESTION@28..30 "?" [] [Whitespace(" ")] 2: JS_IDENTIFIER_EXPRESSION@30..34 0: JS_REFERENCE_IDENTIFIER@30..34 0: IDENT@30..34 "foo" [] [Whitespace(" ")] 3: COLON@34..36 ":" [] [Whitespace(" ")] 4: JS_IDENTIFIER_EXPRESSION@36..39 0: JS_REFERENCE_IDENTIFIER@36..39 0: IDENT@36..39 "bar" [] [] 1: (empty) 2: JS_EXPRESSION_STATEMENT@39..51 0: JS_CONDITIONAL_EXPRESSION@39..51 0: JS_IDENTIFIER_EXPRESSION@39..44 0: JS_REFERENCE_IDENTIFIER@39..44 0: IDENT@39..44 "foo" [Newline("\n")] [Whitespace(" ")] 1: QUESTION@44..46 "?" [] [Whitespace(" ")] 2: JS_IDENTIFIER_EXPRESSION@46..50 0: JS_REFERENCE_IDENTIFIER@46..50 0: IDENT@46..50 "bar" [] [Whitespace(" ")] 3: COLON@50..51 ":" [] [] 4: (empty) 1: (empty) 4: EOF@51..52 "" [Newline("\n")] [] -- conditional_expr_err.js:1:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `:` but instead found `baz` > 1 │ foo ? bar baz │ ^^^ 2 │ foo ? bar baz ? foo : bar 3 │ foo ? bar : i Remove baz -- conditional_expr_err.js:2:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `:` but instead found `baz` 1 │ foo ? bar baz > 2 │ foo ? bar baz ? foo : bar │ ^^^ 3 │ foo ? bar : 4 │ i Remove baz -- conditional_expr_err.js:4:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression, or an assignment but instead found the end of the file. 2 │ foo ? bar baz ? foo : bar 3 │ foo ? bar : > 4 │ │ i Expected an expression, or an assignment here. 2 │ foo ? bar baz ? foo : bar 3 │ foo ? bar : > 4 │ │ -- foo ? bar baz foo ? bar baz ? foo : bar foo ? bar :