From 4f34348761531ca03cfa620b13ea255eb052f363 Mon Sep 17 00:00:00 2001 From: HicaroD Date: Mon, 15 Jan 2024 15:49:20 -0300 Subject: [PATCH 1/6] feat(diagnostic): unexpected await keyword on function declaration --- po/messages.pot | 4 ++++ .../diag/diagnostic-metadata-generated.cpp | 14 ++++++++++++++ .../diag/diagnostic-metadata-generated.h | 3 ++- src/quick-lint-js/diag/diagnostic-types-2.h | 9 +++++++++ src/quick-lint-js/fe/parse-statement.cpp | 15 +++++++++++++++ .../i18n/translation-table-generated.cpp | 4 +++- .../i18n/translation-table-generated.h | 5 +++-- .../i18n/translation-table-test-generated.h | 13 ++++++++++++- test/test-parse-function.cpp | 15 +++++++++++++++ 9 files changed, 77 insertions(+), 5 deletions(-) diff --git a/po/messages.pot b/po/messages.pot index cfca0327e2..aa3a605e92 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -2417,6 +2417,10 @@ msgstr "" msgid "using a '.' after a '?.' might fail, since '?.' might return 'undefined'." msgstr "" +#: src/quick-lint-js/diag/diagnostic-metadata-generated.cpp +msgid "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?" +msgstr "" + #: test/test-diagnostic-formatter.cpp #: test/test-vim-qflist-json-diag-reporter.cpp msgid "something happened" diff --git a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp index f29b70bfbd..ba6e14fb1c 100644 --- a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp +++ b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp @@ -6927,6 +6927,20 @@ const QLJS_CONSTINIT Diagnostic_Info all_diagnostic_infos[] = { }, }, }, + + // Diag_Unexpected_Await_On_Function_Declaration + { + .code = 719, + .severity = Diagnostic_Severity::error, + .message_formats = { + QLJS_TRANSLATABLE("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"), + }, + .message_args = { + { + Diagnostic_Message_Arg_Info(offsetof(Diag_Unexpected_Await_On_Function_Declaration, await_keyword), Diagnostic_Arg_Type::source_code_span), + }, + }, + }, }; } diff --git a/src/quick-lint-js/diag/diagnostic-metadata-generated.h b/src/quick-lint-js/diag/diagnostic-metadata-generated.h index bbd9239b0e..2887aed883 100644 --- a/src/quick-lint-js/diag/diagnostic-metadata-generated.h +++ b/src/quick-lint-js/diag/diagnostic-metadata-generated.h @@ -473,10 +473,11 @@ namespace quick_lint_js { QLJS_DIAG_TYPE_NAME(Diag_Unintuitive_Bitshift_Precedence) \ QLJS_DIAG_TYPE_NAME(Diag_TypeScript_Namespace_Alias_Cannot_Use_Import_Type) \ QLJS_DIAG_TYPE_NAME(Diag_Using_Dot_After_Optional_Chaining) \ + QLJS_DIAG_TYPE_NAME(Diag_Unexpected_Await_On_Function_Declaration) \ /* END */ // clang-format on -inline constexpr int Diag_Type_Count = 462; +inline constexpr int Diag_Type_Count = 463; extern const Diagnostic_Info all_diagnostic_infos[Diag_Type_Count]; } diff --git a/src/quick-lint-js/diag/diagnostic-types-2.h b/src/quick-lint-js/diag/diagnostic-types-2.h index b858eae431..0f41f19294 100644 --- a/src/quick-lint-js/diag/diagnostic-types-2.h +++ b/src/quick-lint-js/diag/diagnostic-types-2.h @@ -3599,6 +3599,15 @@ struct Diag_Using_Dot_After_Optional_Chaining { Source_Code_Span dot_op; Source_Code_Span optional_chain_op; }; + +struct Diag_Unexpected_Await_On_Function_Declaration { + [[qljs::diag("E0719", Diagnostic_Severity::error)]] // + // clang-format off + [[qljs::message("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + ARG(await_keyword))]] // + // clang-format on + Source_Code_Span await_keyword; +}; } QLJS_WARNING_POP diff --git a/src/quick-lint-js/fe/parse-statement.cpp b/src/quick-lint-js/fe/parse-statement.cpp index df3c959349..b171096d26 100644 --- a/src/quick-lint-js/fe/parse-statement.cpp +++ b/src/quick-lint-js/fe/parse-statement.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2020 Matthew "strager" Glazar // See end of file for extended copyright information. +#include #include #include #include @@ -417,6 +418,20 @@ bool Parser::parse_and_visit_statement(Parse_Visitor_Base &v, this->skip(); this->check_body_after_label(); goto parse_statement; + } else if (this->peek().type == Token_Type::kw_function) { + this->parse_and_visit_function_declaration( + v, Function_Declaration_Options{ + .attributes = Function_Attributes::normal, + .begin = this->peek().begin, + .require_name = Name_Requirement::required_for_statement, + .async_keyword = std::nullopt, + .declare_keyword = std::nullopt, + }); + if (this->peek().type != Token_Type::left_paren) { + this->diag_reporter_->report( + Diag_Unexpected_Await_On_Function_Declaration{ + .await_keyword = await_token.span()}); + } } else { Expression *ast = this->parse_await_expression(v, await_token, Precedence{}); diff --git a/src/quick-lint-js/i18n/translation-table-generated.cpp b/src/quick-lint-js/i18n/translation-table-generated.cpp index 5c8c06916d..04fca41deb 100644 --- a/src/quick-lint-js/i18n/translation-table-generated.cpp +++ b/src/quick-lint-js/i18n/translation-table-generated.cpp @@ -164,7 +164,8 @@ const Translation_Table translation_data = { {0, 0, 0, 55, 0, 47}, // {0, 36, 0, 53, 0, 57}, // {0, 0, 0, 66, 0, 67}, // - {56, 22, 0, 65, 0, 66}, // + {0, 0, 0, 0, 0, 66}, // + {56, 22, 0, 65, 0, 77}, // {23, 15, 0, 19, 0, 18}, // {0, 0, 0, 0, 0, 13}, // {18, 18, 0, 14, 0, 16}, // @@ -2036,6 +2037,7 @@ const Translation_Table translation_data = { u8"TypeScript's 'enum' feature is not allowed in JavaScript\0" u8"TypeScript's 'interface' feature is not allowed in JavaScript code\0" u8"TypeScript's 'readonly' feature is not allowed in JavaScript code\0" + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?\0" u8"a 'do-while' loop\0" u8"a 'for' loop\0" u8"a 'typeof' type\0" diff --git a/src/quick-lint-js/i18n/translation-table-generated.h b/src/quick-lint-js/i18n/translation-table-generated.h index 02355e8fb5..36de77395e 100644 --- a/src/quick-lint-js/i18n/translation-table-generated.h +++ b/src/quick-lint-js/i18n/translation-table-generated.h @@ -18,8 +18,8 @@ namespace quick_lint_js { using namespace std::literals::string_view_literals; constexpr std::uint32_t translation_table_locale_count = 5; -constexpr std::uint16_t translation_table_mapping_table_size = 606; -constexpr std::size_t translation_table_string_table_size = 82482; +constexpr std::uint16_t translation_table_mapping_table_size = 607; +constexpr std::size_t translation_table_string_table_size = 82559; constexpr std::size_t translation_table_locale_table_size = 35; QLJS_CONSTEVAL std::uint16_t translation_table_const_look_up( @@ -179,6 +179,7 @@ QLJS_CONSTEVAL std::uint16_t translation_table_const_look_up( "TypeScript's 'enum' feature is not allowed in JavaScript"sv, "TypeScript's 'interface' feature is not allowed in JavaScript code"sv, "TypeScript's 'readonly' feature is not allowed in JavaScript code"sv, + "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"sv, "a 'do-while' loop"sv, "a 'for' loop"sv, "a 'typeof' type"sv, diff --git a/src/quick-lint-js/i18n/translation-table-test-generated.h b/src/quick-lint-js/i18n/translation-table-test-generated.h index db9a0443c5..3fc5a32352 100644 --- a/src/quick-lint-js/i18n/translation-table-test-generated.h +++ b/src/quick-lint-js/i18n/translation-table-test-generated.h @@ -27,7 +27,7 @@ struct Translated_String { }; // clang-format off -inline const Translated_String test_translation_table[605] = { +inline const Translated_String test_translation_table[606] = { { "\"global-groups\" entries must be strings"_translatable, u8"\"global-groups\" entries must be strings", @@ -1711,6 +1711,17 @@ inline const Translated_String test_translation_table[605] = { u8"TypeScript's 'readonly' feature is not allowed in JavaScript code", }, }, + { + "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"_translatable, + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + { + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + }, + }, { "a 'do-while' loop"_translatable, u8"a 'do-while' loop", diff --git a/test/test-parse-function.cpp b/test/test-parse-function.cpp index 79e9ca668c..1d12ccbc31 100644 --- a/test/test-parse-function.cpp +++ b/test/test-parse-function.cpp @@ -1799,6 +1799,21 @@ TEST_F(Test_Parse_Function, return_with_comma_operator_missing_arguments) { u8" ^ Diag_Missing_Operand_For_Operator"_diag); } } + +TEST_F(Test_Parse_Function, await_instead_of_async_on_function_declaration) { + test_parse_and_visit_statement( + u8"await function f() { }"_sv, // + u8"^^^^^ Diag_Unexpected_Await_On_Function_Declaration"_diag); + + test_parse_and_visit_statement(u8"async function f() { }"_sv, // + no_diags); + + test_parse_and_visit_statement(u8"await function foo() {}();"_sv, // + no_diags); + + test_parse_and_visit_statement(u8"await (function foo() {});"_sv, // + no_diags); +} } // quick-lint-js finds bugs in JavaScript programs. From a9e22ca311d273e887cc36975e931cc3e98f069f Mon Sep 17 00:00:00 2001 From: HicaroD Date: Mon, 15 Jan 2024 16:13:30 -0300 Subject: [PATCH 2/6] fix(diagnostic): making E0719 diagnostic a warning instead of error --- src/quick-lint-js/diag/diagnostic-metadata-generated.cpp | 2 +- src/quick-lint-js/diag/diagnostic-types-2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp index ba6e14fb1c..d36b110b0b 100644 --- a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp +++ b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp @@ -6931,7 +6931,7 @@ const QLJS_CONSTINIT Diagnostic_Info all_diagnostic_infos[] = { // Diag_Unexpected_Await_On_Function_Declaration { .code = 719, - .severity = Diagnostic_Severity::error, + .severity = Diagnostic_Severity::warning, .message_formats = { QLJS_TRANSLATABLE("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"), }, diff --git a/src/quick-lint-js/diag/diagnostic-types-2.h b/src/quick-lint-js/diag/diagnostic-types-2.h index 0f41f19294..735e28bf38 100644 --- a/src/quick-lint-js/diag/diagnostic-types-2.h +++ b/src/quick-lint-js/diag/diagnostic-types-2.h @@ -3601,7 +3601,7 @@ struct Diag_Using_Dot_After_Optional_Chaining { }; struct Diag_Unexpected_Await_On_Function_Declaration { - [[qljs::diag("E0719", Diagnostic_Severity::error)]] // + [[qljs::diag("E0719", Diagnostic_Severity::warning)]] // // clang-format off [[qljs::message("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", ARG(await_keyword))]] // From 83a2c932491b723e441ccb9b1960dda56590c13f Mon Sep 17 00:00:00 2001 From: HicaroD Date: Mon, 15 Jan 2024 16:13:57 -0300 Subject: [PATCH 3/6] docs: E0719 warning definition --- docs/errors/E0719.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/errors/E0719.md diff --git a/docs/errors/E0719.md b/docs/errors/E0719.md new file mode 100644 index 0000000000..1987c9037c --- /dev/null +++ b/docs/errors/E0719.md @@ -0,0 +1,15 @@ +# E0719: unexpected 'await' keyword on function declaration + +For defining asynchronous functions, you need to explicitly annotate a +function with `async` keyword, not `await`. + +```javascript +await function f() {}; +``` + +To fix this warning, simply replace 'await' by 'async'. Now, you have an +asynchronous and you're able to use 'await' inside this function. + +```javascript +async function f() {} +``` From 4726f58adb3c760e5efe85aa01c6192d6e7fb536 Mon Sep 17 00:00:00 2001 From: HicaroD Date: Mon, 15 Jan 2024 16:17:15 -0300 Subject: [PATCH 4/6] fix(diagnostic): changing test name --- test/test-parse-function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-parse-function.cpp b/test/test-parse-function.cpp index 1d12ccbc31..ccd12c7050 100644 --- a/test/test-parse-function.cpp +++ b/test/test-parse-function.cpp @@ -1800,7 +1800,7 @@ TEST_F(Test_Parse_Function, return_with_comma_operator_missing_arguments) { } } -TEST_F(Test_Parse_Function, await_instead_of_async_on_function_declaration) { +TEST_F(Test_Parse_Function, unexpected_await_on_function_declaration) { test_parse_and_visit_statement( u8"await function f() { }"_sv, // u8"^^^^^ Diag_Unexpected_Await_On_Function_Declaration"_diag); From b6d1eedb7cb5ee1639334e621338dc58928d1658 Mon Sep 17 00:00:00 2001 From: HicaroD Date: Mon, 15 Jan 2024 21:14:49 -0300 Subject: [PATCH 5/6] fix(docs): better description and formatting keywords --- docs/errors/E0719.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/errors/E0719.md b/docs/errors/E0719.md index 1987c9037c..cdc28a2447 100644 --- a/docs/errors/E0719.md +++ b/docs/errors/E0719.md @@ -1,14 +1,14 @@ # E0719: unexpected 'await' keyword on function declaration -For defining asynchronous functions, you need to explicitly annotate a -function with `async` keyword, not `await`. +If you meant to define an asynchronous function, you need to explicitly annotate +the function with `async` keyword, not `await`. ```javascript -await function f() {}; +await function f() {} ``` -To fix this warning, simply replace 'await' by 'async'. Now, you have an -asynchronous and you're able to use 'await' inside this function. +To fix this warning, simply replace `await` by `async`. Now, you have an +asynchronous function and you're able to use `await` inside it. ```javascript async function f() {} From fdb3eb4e20d025d9e28035f0a70166c10d5ea2bf Mon Sep 17 00:00:00 2001 From: HicaroD Date: Sun, 28 Jan 2024 16:28:21 -0300 Subject: [PATCH 6/6] fix: minor changes - removing useless include and message changes --- po/messages.pot | 2 +- .../diag/diagnostic-metadata-generated.cpp | 2 +- src/quick-lint-js/diag/diagnostic-types-2.h | 2 +- src/quick-lint-js/fe/parse-statement.cpp | 1 - .../i18n/translation-table-generated.cpp | 8 +++---- .../i18n/translation-table-generated.h | 2 +- .../i18n/translation-table-test-generated.h | 22 +++++++++---------- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/po/messages.pot b/po/messages.pot index aa3a605e92..bc9e0cb6e6 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -2418,7 +2418,7 @@ msgid "using a '.' after a '?.' might fail, since '?.' might return 'undefined'. msgstr "" #: src/quick-lint-js/diag/diagnostic-metadata-generated.cpp -msgid "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?" +msgid "unexpected 'await' keyword on function declaration; maybe you meant 'async'?" msgstr "" #: test/test-diagnostic-formatter.cpp diff --git a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp index d36b110b0b..da91494369 100644 --- a/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp +++ b/src/quick-lint-js/diag/diagnostic-metadata-generated.cpp @@ -6933,7 +6933,7 @@ const QLJS_CONSTINIT Diagnostic_Info all_diagnostic_infos[] = { .code = 719, .severity = Diagnostic_Severity::warning, .message_formats = { - QLJS_TRANSLATABLE("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"), + QLJS_TRANSLATABLE("unexpected 'await' keyword on function declaration; maybe you meant 'async'?"), }, .message_args = { { diff --git a/src/quick-lint-js/diag/diagnostic-types-2.h b/src/quick-lint-js/diag/diagnostic-types-2.h index 735e28bf38..92a6cb41f4 100644 --- a/src/quick-lint-js/diag/diagnostic-types-2.h +++ b/src/quick-lint-js/diag/diagnostic-types-2.h @@ -3603,7 +3603,7 @@ struct Diag_Using_Dot_After_Optional_Chaining { struct Diag_Unexpected_Await_On_Function_Declaration { [[qljs::diag("E0719", Diagnostic_Severity::warning)]] // // clang-format off - [[qljs::message("Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", + [[qljs::message("unexpected 'await' keyword on function declaration; maybe you meant 'async'?", ARG(await_keyword))]] // // clang-format on Source_Code_Span await_keyword; diff --git a/src/quick-lint-js/fe/parse-statement.cpp b/src/quick-lint-js/fe/parse-statement.cpp index b171096d26..592bb6d1d7 100644 --- a/src/quick-lint-js/fe/parse-statement.cpp +++ b/src/quick-lint-js/fe/parse-statement.cpp @@ -1,7 +1,6 @@ // Copyright (C) 2020 Matthew "strager" Glazar // See end of file for extended copyright information. -#include #include #include #include diff --git a/src/quick-lint-js/i18n/translation-table-generated.cpp b/src/quick-lint-js/i18n/translation-table-generated.cpp index 04fca41deb..d43a5dcc30 100644 --- a/src/quick-lint-js/i18n/translation-table-generated.cpp +++ b/src/quick-lint-js/i18n/translation-table-generated.cpp @@ -164,8 +164,7 @@ const Translation_Table translation_data = { {0, 0, 0, 55, 0, 47}, // {0, 36, 0, 53, 0, 57}, // {0, 0, 0, 66, 0, 67}, // - {0, 0, 0, 0, 0, 66}, // - {56, 22, 0, 65, 0, 77}, // + {56, 22, 0, 65, 0, 66}, // {23, 15, 0, 19, 0, 18}, // {0, 0, 0, 0, 0, 13}, // {18, 18, 0, 14, 0, 16}, // @@ -558,7 +557,8 @@ const Translation_Table translation_data = { {0, 0, 0, 0, 0, 15}, // {0, 0, 0, 15, 0, 62}, // {16, 12, 14, 32, 17, 34}, // - {31, 12, 34, 35, 33, 29}, // + {0, 0, 0, 0, 0, 29}, // + {31, 12, 34, 35, 33, 77}, // {53, 46, 52, 49, 41, 43}, // {45, 43, 53, 32, 39, 33}, // {56, 49, 55, 52, 44, 46}, // @@ -2037,7 +2037,6 @@ const Translation_Table translation_data = { u8"TypeScript's 'enum' feature is not allowed in JavaScript\0" u8"TypeScript's 'interface' feature is not allowed in JavaScript code\0" u8"TypeScript's 'readonly' feature is not allowed in JavaScript code\0" - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?\0" u8"a 'do-while' loop\0" u8"a 'for' loop\0" u8"a 'typeof' type\0" @@ -2431,6 +2430,7 @@ const Translation_Table translation_data = { u8"unexpected '?' in type; use '| void' to make an optional type\0" u8"unexpected '?' when destructuring\0" u8"unexpected '\\' in identifier\0" + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?\0" u8"unexpected 'case' outside switch statement\0" u8"unexpected 'catch' without 'try'\0" u8"unexpected 'default' outside switch statement\0" diff --git a/src/quick-lint-js/i18n/translation-table-generated.h b/src/quick-lint-js/i18n/translation-table-generated.h index 36de77395e..1b006e019f 100644 --- a/src/quick-lint-js/i18n/translation-table-generated.h +++ b/src/quick-lint-js/i18n/translation-table-generated.h @@ -179,7 +179,6 @@ QLJS_CONSTEVAL std::uint16_t translation_table_const_look_up( "TypeScript's 'enum' feature is not allowed in JavaScript"sv, "TypeScript's 'interface' feature is not allowed in JavaScript code"sv, "TypeScript's 'readonly' feature is not allowed in JavaScript code"sv, - "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"sv, "a 'do-while' loop"sv, "a 'for' loop"sv, "a 'typeof' type"sv, @@ -573,6 +572,7 @@ QLJS_CONSTEVAL std::uint16_t translation_table_const_look_up( "unexpected '?' in type; use '| void' to make an optional type"sv, "unexpected '?' when destructuring"sv, "unexpected '\\' in identifier"sv, + "unexpected 'await' keyword on function declaration; maybe you meant 'async'?"sv, "unexpected 'case' outside switch statement"sv, "unexpected 'catch' without 'try'"sv, "unexpected 'default' outside switch statement"sv, diff --git a/src/quick-lint-js/i18n/translation-table-test-generated.h b/src/quick-lint-js/i18n/translation-table-test-generated.h index 3fc5a32352..b4591cccaa 100644 --- a/src/quick-lint-js/i18n/translation-table-test-generated.h +++ b/src/quick-lint-js/i18n/translation-table-test-generated.h @@ -1711,17 +1711,6 @@ inline const Translated_String test_translation_table[606] = { u8"TypeScript's 'readonly' feature is not allowed in JavaScript code", }, }, - { - "Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?"_translatable, - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - { - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - u8"Unexpected 'await' keyword on function declaration. Maybe you meant 'async'?", - }, - }, { "a 'do-while' loop"_translatable, u8"a 'do-while' loop", @@ -6045,6 +6034,17 @@ inline const Translated_String test_translation_table[606] = { u8"of\u00f6rv\u00e4ntad '\\' i identifierare", }, }, + { + "unexpected 'await' keyword on function declaration; maybe you meant 'async'?"_translatable, + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + { + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + u8"unexpected 'await' keyword on function declaration; maybe you meant 'async'?", + }, + }, { "unexpected 'case' outside switch statement"_translatable, u8"unexpected 'case' outside switch statement",