JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsLabeledStatement { label: JsLabel { value_token: IDENT@0..6 "label1" [] [], }, colon_token: COLON@6..8 ":" [] [Whitespace(" ")], body: JsBogusStatement { items: [ FUNCTION_KW@8..17 "function" [] [Whitespace(" ")], JsIdentifierBinding { name_token: IDENT@17..18 "a" [] [], }, JsParameters { l_paren_token: L_PAREN@18..19 "(" [] [], items: JsParameterList [], r_paren_token: R_PAREN@19..21 ")" [] [Whitespace(" ")], }, JsFunctionBody { l_curly_token: L_CURLY@21..22 "{" [] [], directives: JsDirectiveList [], statements: JsStatementList [], r_curly_token: R_CURLY@22..23 "}" [] [], }, ], }, }, ], eof_token: EOF@23..24 "" [Newline("\n")] [], } 0: JS_MODULE@0..24 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..23 0: JS_LABELED_STATEMENT@0..23 0: JS_LABEL@0..6 0: IDENT@0..6 "label1" [] [] 1: COLON@6..8 ":" [] [Whitespace(" ")] 2: JS_BOGUS_STATEMENT@8..23 0: FUNCTION_KW@8..17 "function" [] [Whitespace(" ")] 1: JS_IDENTIFIER_BINDING@17..18 0: IDENT@17..18 "a" [] [] 2: JS_PARAMETERS@18..21 0: L_PAREN@18..19 "(" [] [] 1: JS_PARAMETER_LIST@19..19 2: R_PAREN@19..21 ")" [] [Whitespace(" ")] 3: JS_FUNCTION_BODY@21..23 0: L_CURLY@21..22 "{" [] [] 1: JS_DIRECTIVE_LIST@22..22 2: JS_STATEMENT_LIST@22..22 3: R_CURLY@22..23 "}" [] [] 4: EOF@23..24 "" [Newline("\n")] [] -- labelled_function_declaration_strict_mode.js:1:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × In strict mode code, functions can only be declared at top level or inside a block > 1 │ label1: function a() {} │ ^^^^^^^^^^^^^^^ 2 │ i wrap the function in a block statement -- label1: function a() {}