@typescript-deploys/pr-build 5.3.0-pr-55600-13 → 5.3.0-pr-55601-8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230901`;
38
+ version = `${versionMajorMinor}.0-insiders.20230902`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3497,7 +3497,7 @@ ${lanes.join("\n")}
3497
3497
  const name = DiagnosticCategory[d.category];
3498
3498
  return lowerCase ? name.toLowerCase() : name;
3499
3499
  }
3500
- var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, RegularExpressionFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3500
+ var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3501
3501
  var init_types = __esm({
3502
3502
  "src/compiler/types.ts"() {
3503
3503
  "use strict";
@@ -4005,20 +4005,6 @@ ${lanes.join("\n")}
4005
4005
  GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["AllowNameSubstitution"] = 64] = "AllowNameSubstitution";
4006
4006
  return GeneratedIdentifierFlags2;
4007
4007
  })(GeneratedIdentifierFlags || {});
4008
- RegularExpressionFlags = /* @__PURE__ */ ((RegularExpressionFlags2) => {
4009
- RegularExpressionFlags2[RegularExpressionFlags2["None"] = 0] = "None";
4010
- RegularExpressionFlags2[RegularExpressionFlags2["HasIndices"] = 1] = "HasIndices";
4011
- RegularExpressionFlags2[RegularExpressionFlags2["Global"] = 2] = "Global";
4012
- RegularExpressionFlags2[RegularExpressionFlags2["IgnoreCase"] = 4] = "IgnoreCase";
4013
- RegularExpressionFlags2[RegularExpressionFlags2["Multiline"] = 8] = "Multiline";
4014
- RegularExpressionFlags2[RegularExpressionFlags2["DotAll"] = 16] = "DotAll";
4015
- RegularExpressionFlags2[RegularExpressionFlags2["Unicode"] = 32] = "Unicode";
4016
- RegularExpressionFlags2[RegularExpressionFlags2["UnicodeSets"] = 64] = "UnicodeSets";
4017
- RegularExpressionFlags2[RegularExpressionFlags2["Sticky"] = 128] = "Sticky";
4018
- RegularExpressionFlags2[RegularExpressionFlags2["UnicodeMode"] = 96] = "UnicodeMode";
4019
- RegularExpressionFlags2[RegularExpressionFlags2["Modifiers"] = 28] = "Modifiers";
4020
- return RegularExpressionFlags2;
4021
- })(RegularExpressionFlags || {});
4022
4008
  TokenFlags = /* @__PURE__ */ ((TokenFlags2) => {
4023
4009
  TokenFlags2[TokenFlags2["None"] = 0] = "None";
4024
4010
  TokenFlags2[TokenFlags2["PrecedingLineBreak"] = 1] = "PrecedingLineBreak";
@@ -4722,8 +4708,6 @@ ${lanes.join("\n")}
4722
4708
  ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020";
4723
4709
  ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021";
4724
4710
  ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022";
4725
- ScriptTarget11[ScriptTarget11["ES2023"] = 10] = "ES2023";
4726
- ScriptTarget11[ScriptTarget11["ES2024"] = 11] = "ES2024";
4727
4711
  ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext";
4728
4712
  ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON";
4729
4713
  ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest";
@@ -7409,43 +7393,6 @@ ${lanes.join("\n")}
7409
7393
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
7410
7394
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
7411
7395
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
7412
- _0_is_not_a_valid_character_escape: diag(1496, 1 /* Error */, "_0_is_not_a_valid_character_escape_1496", "'\\{0}' is not a valid character escape."),
7413
- Unknown_regular_expression_flag: diag(1497, 1 /* Error */, "Unknown_regular_expression_flag_1497", "Unknown regular expression flag."),
7414
- Duplicate_regular_expression_flag: diag(1498, 1 /* Error */, "Duplicate_regular_expression_flag_1498", "Duplicate regular expression flag."),
7415
- This_regular_expression_flag_is_only_available_when_targeting_0_or_later: diag(1499, 1 /* Error */, "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1499", "This regular expression flag is only available when targeting '{0}' or later."),
7416
- The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: diag(1500, 1 /* Error */, "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1500", "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),
7417
- Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: diag(1501, 1 /* Error */, "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1501", "Named capturing groups are only available when targeting 'ES2018' or later."),
7418
- Subpattern_flags_must_be_present_when_there_is_a_minus_sign: diag(1502, 1 /* Error */, "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1502", "Subpattern flags must be present when there is a minus sign."),
7419
- Incomplete_quantifier_Digit_expected: diag(1503, 1 /* Error */, "Incomplete_quantifier_Digit_expected_1503", "Incomplete quantifier. Digit expected."),
7420
- Numbers_out_of_order_in_quantifier: diag(1504, 1 /* Error */, "Numbers_out_of_order_in_quantifier_1504", "Numbers out of order in quantifier."),
7421
- There_is_nothing_available_for_repetition: diag(1505, 1 /* Error */, "There_is_nothing_available_for_repetition_1505", "There is nothing available for repetition."),
7422
- Unexpected_0_Did_you_mean_to_escape_it_with_backslash: diag(1506, 1 /* Error */, "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1506", "Unexpected '{0}'. Did you mean to escape it with backslash?"),
7423
- This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: diag(1507, 1 /* Error */, "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1507", "This regular expression flag cannot be toggled within a subpattern."),
7424
- k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: diag(1508, 1 /* Error */, "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1508", "'\\k' must be followed by a capturing group name enclosed in angle brackets."),
7425
- q_is_only_available_inside_character_class: diag(1509, 1 /* Error */, "q_is_only_available_inside_character_class_1509", "'\\q' is only available inside character class."),
7426
- c_must_be_followed_by_an_ASCII_letter: diag(1510, 1 /* Error */, "c_must_be_followed_by_an_ASCII_letter_1510", "'\\c' must be followed by an ASCII letter."),
7427
- Undetermined_character_escape: diag(1511, 1 /* Error */, "Undetermined_character_escape_1511", "Undetermined character escape."),
7428
- Expected_a_capturing_group_name: diag(1512, 1 /* Error */, "Expected_a_capturing_group_name_1512", "Expected a capturing group name."),
7429
- Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: diag(1513, 1 /* Error */, "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1513", "Named capturing groups with the same name must be mutually exclusive to each other."),
7430
- A_character_class_range_must_not_be_bounded_by_another_character_class: diag(1514, 1 /* Error */, "A_character_class_range_must_not_be_bounded_by_another_character_class_1514", "A character class range must not be bounded by another character class."),
7431
- Range_out_of_order_in_character_class: diag(1515, 1 /* Error */, "Range_out_of_order_in_character_class_1515", "Range out of order in character class."),
7432
- Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: diag(1516, 1 /* Error */, "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1516", "Anything that would possibly match more than a single character is invalid inside a negated character class."),
7433
- Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: diag(1517, 1 /* Error */, "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1517", "Operators must not be mixed within a character class. Wrap it in a nested class instead."),
7434
- Expected_a_class_set_oprand: diag(1518, 1 /* Error */, "Expected_a_class_set_oprand_1518", "Expected a class set oprand."),
7435
- q_must_be_followed_by_string_alternatives_enclosed_in_braces: diag(1519, 1 /* Error */, "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1519", "'\\q' must be followed by string alternatives enclosed in braces."),
7436
- A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: diag(1520, 1 /* Error */, "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1520", "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),
7437
- Expected_a_Unicode_property_name: diag(1521, 1 /* Error */, "Expected_a_Unicode_property_name_1521", "Expected a Unicode property name."),
7438
- Unknown_Unicode_property_name: diag(1522, 1 /* Error */, "Unknown_Unicode_property_name_1522", "Unknown Unicode property name."),
7439
- Expected_a_Unicode_property_value: diag(1523, 1 /* Error */, "Expected_a_Unicode_property_value_1523", "Expected a Unicode property value."),
7440
- Unknown_Unicode_property_value: diag(1524, 1 /* Error */, "Unknown_Unicode_property_value_1524", "Unknown Unicode property value."),
7441
- Expected_a_Unicode_property_name_or_value: diag(1525, 1 /* Error */, "Expected_a_Unicode_property_name_or_value_1525", "Expected a Unicode property name or value."),
7442
- Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: diag(1526, 1 /* Error */, "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1526", "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),
7443
- Unknown_Unicode_property_name_or_value: diag(1527, 1 /* Error */, "Unknown_Unicode_property_name_or_value_1527", "Unknown Unicode property name or value."),
7444
- Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1528, 1 /* Error */, "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1528", "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),
7445
- _0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: diag(1529, 1 /* Error */, "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1529", "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),
7446
- There_is_no_capturing_group_named_0_in_this_regular_expression: diag(1530, 1 /* Error */, "There_is_no_capturing_group_named_0_in_this_regular_expression_1530", "There is no capturing group named '{0}' in this regular expression."),
7447
- A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_regular_expression: diag(1531, 1 /* Error */, "A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_1531", "A decimal escape must refer to an existent capturing group. There are only {0} capturing groups in this regular expression."),
7448
- Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression: diag(1532, 1 /* Error */, "Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression_1532", "Decimal escapes are invalid when there are no capturing groups in a regular expression."),
7449
7396
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
7450
7397
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
7451
7398
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -9171,15 +9118,6 @@ ${lanes.join("\n")}
9171
9118
  function stringToToken(s) {
9172
9119
  return textToToken.get(s);
9173
9120
  }
9174
- function regularExpressionFlagToCharacter(f) {
9175
- return regExpFlagChars[f];
9176
- }
9177
- function characterToRegularExpressionFlag(c) {
9178
- return charToRegExpFlag.get(c);
9179
- }
9180
- function regularExpressionFlagToFirstAvailableLanguageVersion(f) {
9181
- return regExpFlagToFirstAvailableLanguageVersion.get(f);
9182
- }
9183
9121
  function computeLineStarts(text) {
9184
9122
  const result = [];
9185
9123
  let pos = 0;
@@ -9276,11 +9214,8 @@ ${lanes.join("\n")}
9276
9214
  function isHexDigit(ch) {
9277
9215
  return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */;
9278
9216
  }
9279
- function isASCIILetter(ch) {
9280
- return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */;
9281
- }
9282
- function isWordCharacter(ch) {
9283
- return isASCIILetter(ch) || isDigit(ch) || ch === 95 /* _ */;
9217
+ function isCodePoint(code) {
9218
+ return code <= 1114111;
9284
9219
  }
9285
9220
  function isOctalDigit(ch) {
9286
9221
  return ch >= 48 /* _0 */ && ch <= 55 /* _7 */;
@@ -9617,10 +9552,10 @@ ${lanes.join("\n")}
9617
9552
  }
9618
9553
  }
9619
9554
  function isIdentifierStart(ch, languageVersion) {
9620
- return isASCIILetter(ch) || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
9555
+ return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
9621
9556
  }
9622
9557
  function isIdentifierPart(ch, languageVersion, identifierVariant) {
9623
- return isWordCharacter(ch) || ch === 36 /* $ */ || // "-" and ":" are valid in JSX Identifiers
9558
+ return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || // "-" and ":" are valid in JSX Identifiers
9624
9559
  (identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
9625
9560
  }
9626
9561
  function isIdentifierText(name, languageVersion, identifierVariant) {
@@ -9706,8 +9641,13 @@ ${lanes.join("\n")}
9706
9641
  });
9707
9642
  }
9708
9643
  return scanner2;
9709
- function error2(message, errPos = pos, length3 = 0, ...args) {
9710
- return onError == null ? void 0 : onError(message, errPos, length3, ...args);
9644
+ function error2(message, errPos = pos, length3, arg0) {
9645
+ if (onError) {
9646
+ const oldPos = pos;
9647
+ pos = errPos;
9648
+ onError(message, length3 || 0, arg0);
9649
+ pos = oldPos;
9650
+ }
9711
9651
  }
9712
9652
  function scanNumberFragment() {
9713
9653
  let start2 = pos;
@@ -9932,9 +9872,7 @@ ${lanes.join("\n")}
9932
9872
  result += text.substring(start2, pos);
9933
9873
  result += scanEscapeSequence(
9934
9874
  /*shouldEmitInvalidEscapeError*/
9935
- true,
9936
- /*isRegularExpression*/
9937
- false
9875
+ true
9938
9876
  );
9939
9877
  start2 = pos;
9940
9878
  continue;
@@ -9978,11 +9916,7 @@ ${lanes.join("\n")}
9978
9916
  }
9979
9917
  if (currChar === 92 /* backslash */) {
9980
9918
  contents += text.substring(start2, pos);
9981
- contents += scanEscapeSequence(
9982
- shouldEmitInvalidEscapeError,
9983
- /*isRegularExpression*/
9984
- false
9985
- );
9919
+ contents += scanEscapeSequence(shouldEmitInvalidEscapeError);
9986
9920
  start2 = pos;
9987
9921
  continue;
9988
9922
  }
@@ -10002,7 +9936,7 @@ ${lanes.join("\n")}
10002
9936
  tokenValue = contents;
10003
9937
  return resultingToken;
10004
9938
  }
10005
- function scanEscapeSequence(shouldEmitInvalidEscapeError, isRegularExpression) {
9939
+ function scanEscapeSequence(shouldEmitInvalidEscapeError) {
10006
9940
  const start2 = pos;
10007
9941
  pos++;
10008
9942
  if (pos >= end) {
@@ -10061,9 +9995,45 @@ ${lanes.join("\n")}
10061
9995
  case 34 /* doubleQuote */:
10062
9996
  return '"';
10063
9997
  case 117 /* u */:
10064
- if ((!isRegularExpression || shouldEmitInvalidEscapeError) && pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
10065
- pos -= 2;
10066
- return scanExtendedUnicodeEscape(shouldEmitInvalidEscapeError);
9998
+ if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
9999
+ pos++;
10000
+ const escapedValueString = scanMinimumNumberOfHexDigits(
10001
+ 1,
10002
+ /*canHaveSeparators*/
10003
+ false
10004
+ );
10005
+ const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
10006
+ if (escapedValue < 0) {
10007
+ tokenFlags |= 2048 /* ContainsInvalidEscape */;
10008
+ if (shouldEmitInvalidEscapeError) {
10009
+ error2(Diagnostics.Hexadecimal_digit_expected);
10010
+ }
10011
+ return text.substring(start2, pos);
10012
+ }
10013
+ if (!isCodePoint(escapedValue)) {
10014
+ tokenFlags |= 2048 /* ContainsInvalidEscape */;
10015
+ if (shouldEmitInvalidEscapeError) {
10016
+ error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
10017
+ }
10018
+ return text.substring(start2, pos);
10019
+ }
10020
+ if (pos >= end) {
10021
+ tokenFlags |= 2048 /* ContainsInvalidEscape */;
10022
+ if (shouldEmitInvalidEscapeError) {
10023
+ error2(Diagnostics.Unexpected_end_of_text);
10024
+ }
10025
+ return text.substring(start2, pos);
10026
+ }
10027
+ if (text.charCodeAt(pos) !== 125 /* closeBrace */) {
10028
+ tokenFlags |= 2048 /* ContainsInvalidEscape */;
10029
+ if (shouldEmitInvalidEscapeError) {
10030
+ error2(Diagnostics.Unterminated_Unicode_escape_sequence);
10031
+ }
10032
+ return text.substring(start2, pos);
10033
+ }
10034
+ pos++;
10035
+ tokenFlags |= 8 /* ExtendedUnicodeEscape */;
10036
+ return utf16EncodeAsString(escapedValue);
10067
10037
  }
10068
10038
  for (; pos < start2 + 6; pos++) {
10069
10039
  if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
@@ -10075,23 +10045,7 @@ ${lanes.join("\n")}
10075
10045
  }
10076
10046
  }
10077
10047
  tokenFlags |= 1024 /* UnicodeEscape */;
10078
- const escapedValue = parseInt(text.substring(start2 + 2, pos), 16);
10079
- const escapedValueString = String.fromCharCode(escapedValue);
10080
- if (isRegularExpression && shouldEmitInvalidEscapeError && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && text.charCodeAt(pos + 2) !== 123 /* openBrace */) {
10081
- const nextStart = pos;
10082
- let nextPos = pos + 2;
10083
- for (; nextPos < nextStart + 6; nextPos++) {
10084
- if (!isHexDigit(text.charCodeAt(pos))) {
10085
- return escapedValueString;
10086
- }
10087
- }
10088
- const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);
10089
- if (nextEscapedValue >= 56320 && nextEscapedValue <= 57343) {
10090
- pos = nextPos;
10091
- return escapedValueString + String.fromCharCode(nextEscapedValue);
10092
- }
10093
- }
10094
- return escapedValueString;
10048
+ return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));
10095
10049
  case 120 /* x */:
10096
10050
  for (; pos < start2 + 4; pos++) {
10097
10051
  if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
@@ -10113,16 +10067,10 @@ ${lanes.join("\n")}
10113
10067
  case 8233 /* paragraphSeparator */:
10114
10068
  return "";
10115
10069
  default:
10116
- if (isRegularExpression && (shouldEmitInvalidEscapeError || isIdentifierPart(ch, languageVersion))) {
10117
- error2(Diagnostics._0_is_not_a_valid_character_escape, pos - 2, 2, String.fromCharCode(ch));
10118
- }
10119
10070
  return String.fromCharCode(ch);
10120
10071
  }
10121
10072
  }
10122
- function scanExtendedUnicodeEscape(shouldEmitInvalidEscapeError = true) {
10123
- const start2 = pos;
10124
- pos += 3;
10125
- const escapedStart = pos;
10073
+ function scanExtendedUnicodeEscape() {
10126
10074
  const escapedValueString = scanMinimumNumberOfHexDigits(
10127
10075
  1,
10128
10076
  /*canHaveSeparators*/
@@ -10131,34 +10079,24 @@ ${lanes.join("\n")}
10131
10079
  const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
10132
10080
  let isInvalidExtendedEscape = false;
10133
10081
  if (escapedValue < 0) {
10134
- if (shouldEmitInvalidEscapeError) {
10135
- error2(Diagnostics.Hexadecimal_digit_expected);
10136
- }
10082
+ error2(Diagnostics.Hexadecimal_digit_expected);
10137
10083
  isInvalidExtendedEscape = true;
10138
10084
  } else if (escapedValue > 1114111) {
10139
- if (shouldEmitInvalidEscapeError) {
10140
- error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, escapedStart, pos - escapedStart);
10141
- }
10085
+ error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
10142
10086
  isInvalidExtendedEscape = true;
10143
10087
  }
10144
10088
  if (pos >= end) {
10145
- if (shouldEmitInvalidEscapeError) {
10146
- error2(Diagnostics.Unexpected_end_of_text);
10147
- }
10089
+ error2(Diagnostics.Unexpected_end_of_text);
10148
10090
  isInvalidExtendedEscape = true;
10149
10091
  } else if (text.charCodeAt(pos) === 125 /* closeBrace */) {
10150
10092
  pos++;
10151
10093
  } else {
10152
- if (shouldEmitInvalidEscapeError) {
10153
- error2(Diagnostics.Unterminated_Unicode_escape_sequence);
10154
- }
10094
+ error2(Diagnostics.Unterminated_Unicode_escape_sequence);
10155
10095
  isInvalidExtendedEscape = true;
10156
10096
  }
10157
10097
  if (isInvalidExtendedEscape) {
10158
- tokenFlags |= 2048 /* ContainsInvalidEscape */;
10159
- return text.substring(start2, pos);
10098
+ return "";
10160
10099
  }
10161
- tokenFlags |= 8 /* ExtendedUnicodeEscape */;
10162
10100
  return utf16EncodeAsString(escapedValue);
10163
10101
  }
10164
10102
  function peekUnicodeEscape() {
@@ -10200,6 +10138,8 @@ ${lanes.join("\n")}
10200
10138
  } else if (ch === 92 /* backslash */) {
10201
10139
  ch = peekExtendedUnicodeEscape();
10202
10140
  if (ch >= 0 && isIdentifierPart(ch, languageVersion)) {
10141
+ pos += 3;
10142
+ tokenFlags |= 8 /* ExtendedUnicodeEscape */;
10203
10143
  result += scanExtendedUnicodeEscape();
10204
10144
  start2 = pos;
10205
10145
  continue;
@@ -10669,6 +10609,8 @@ ${lanes.join("\n")}
10669
10609
  case 92 /* backslash */:
10670
10610
  const extendedCookedChar = peekExtendedUnicodeEscape();
10671
10611
  if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
10612
+ pos += 3;
10613
+ tokenFlags |= 8 /* ExtendedUnicodeEscape */;
10672
10614
  tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
10673
10615
  return token = getIdentifierToken();
10674
10616
  }
@@ -10684,7 +10626,7 @@ ${lanes.join("\n")}
10684
10626
  return token = 0 /* Unknown */;
10685
10627
  case 35 /* hash */:
10686
10628
  if (pos !== 0 && text[pos + 1] === "!") {
10687
- error2(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);
10629
+ error2(Diagnostics.can_only_be_used_at_the_start_of_a_file);
10688
10630
  pos++;
10689
10631
  return token = 0 /* Unknown */;
10690
10632
  }
@@ -10693,6 +10635,8 @@ ${lanes.join("\n")}
10693
10635
  pos++;
10694
10636
  const extendedCookedChar2 = peekExtendedUnicodeEscape();
10695
10637
  if (extendedCookedChar2 >= 0 && isIdentifierStart(extendedCookedChar2, languageVersion)) {
10638
+ pos += 3;
10639
+ tokenFlags |= 8 /* ExtendedUnicodeEscape */;
10696
10640
  tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
10697
10641
  return token = 81 /* PrivateIdentifier */;
10698
10642
  }
@@ -10815,831 +10759,14 @@ ${lanes.join("\n")}
10815
10759
  }
10816
10760
  p++;
10817
10761
  }
10818
- const isUnterminated = !!(tokenFlags & 4 /* Unterminated */);
10819
- const endOfBody = p - (isUnterminated ? 0 : 1);
10820
- let regExpFlags = 0 /* None */;
10821
- while (p < end) {
10822
- const ch = text.charCodeAt(p);
10823
- if (!isIdentifierPart(ch, languageVersion)) {
10824
- break;
10825
- }
10826
- const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
10827
- if (flag === void 0) {
10828
- error2(Diagnostics.Unknown_regular_expression_flag, p, 1);
10829
- } else if (regExpFlags & flag) {
10830
- error2(Diagnostics.Duplicate_regular_expression_flag, p, 1);
10831
- } else if (((regExpFlags | flag) & 96 /* UnicodeMode */) === 96 /* UnicodeMode */) {
10832
- error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, p, 1);
10833
- } else {
10834
- regExpFlags |= flag;
10835
- const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
10836
- if (languageVersion < availableFrom) {
10837
- error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, p, 1, ScriptTarget[availableFrom]);
10838
- }
10839
- }
10762
+ while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
10840
10763
  p++;
10841
10764
  }
10842
- pos = tokenStart + 1;
10843
- const saveTokenPos = tokenStart;
10844
- const saveTokenFlags = tokenFlags;
10845
- scanRegularExpressionWorker(text.slice(0, endOfBody), endOfBody, regExpFlags, isUnterminated);
10846
- if (!isUnterminated) {
10847
- pos = p;
10848
- }
10849
- tokenStart = saveTokenPos;
10850
- tokenFlags = saveTokenFlags;
10765
+ pos = p;
10851
10766
  tokenValue = text.substring(tokenStart, pos);
10852
10767
  token = 14 /* RegularExpressionLiteral */;
10853
10768
  }
10854
10769
  return token;
10855
- function scanRegularExpressionWorker(text2, end2, regExpFlags, isUnterminated) {
10856
- const unicodeMode = !!(regExpFlags & 96 /* UnicodeMode */);
10857
- const unicodeSetsMode = !!(regExpFlags & 64 /* UnicodeSets */);
10858
- let mayContainStrings = false;
10859
- let numberOfCapturingGroups = 0;
10860
- const groupSpecifiers = /* @__PURE__ */ new Set();
10861
- const groupNameReferences = [];
10862
- const decimalEscapes = [];
10863
- const namedCapturingGroups = [];
10864
- function scanDisjunction(isInGroup) {
10865
- while (true) {
10866
- namedCapturingGroups.push(/* @__PURE__ */ new Set());
10867
- scanAlternative(isInGroup);
10868
- namedCapturingGroups.pop();
10869
- if (text2.charCodeAt(pos) !== 124 /* bar */) {
10870
- return;
10871
- }
10872
- pos++;
10873
- }
10874
- }
10875
- function scanAlternative(isInGroup) {
10876
- let isPreviousTermQuantifiable = false;
10877
- while (pos < end2) {
10878
- const start2 = pos;
10879
- const ch = text2.charCodeAt(pos);
10880
- switch (ch) {
10881
- case 94 /* caret */:
10882
- case 36 /* $ */:
10883
- pos++;
10884
- isPreviousTermQuantifiable = false;
10885
- break;
10886
- case 92 /* backslash */:
10887
- pos++;
10888
- switch (text2.charCodeAt(pos)) {
10889
- case 98 /* b */:
10890
- case 66 /* B */:
10891
- pos++;
10892
- isPreviousTermQuantifiable = false;
10893
- break;
10894
- default:
10895
- scanAtomEscape();
10896
- isPreviousTermQuantifiable = true;
10897
- break;
10898
- }
10899
- break;
10900
- case 40 /* openParen */:
10901
- pos++;
10902
- if (text2.charCodeAt(pos) === 63 /* question */) {
10903
- pos++;
10904
- switch (text2.charCodeAt(pos)) {
10905
- case 61 /* equals */:
10906
- case 33 /* exclamation */:
10907
- pos++;
10908
- isPreviousTermQuantifiable = false;
10909
- break;
10910
- case 60 /* lessThan */:
10911
- const groupNameStart = pos;
10912
- pos++;
10913
- switch (text2.charCodeAt(pos)) {
10914
- case 61 /* equals */:
10915
- case 33 /* exclamation */:
10916
- pos++;
10917
- isPreviousTermQuantifiable = false;
10918
- break;
10919
- default:
10920
- scanGroupName(
10921
- /*isReference*/
10922
- false
10923
- );
10924
- scanExpectedChar(62 /* greaterThan */);
10925
- if (languageVersion < 5 /* ES2018 */) {
10926
- error2(Diagnostics.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, groupNameStart, pos - groupNameStart);
10927
- }
10928
- numberOfCapturingGroups++;
10929
- isPreviousTermQuantifiable = true;
10930
- break;
10931
- }
10932
- break;
10933
- default:
10934
- const start3 = pos;
10935
- const setFlags = scanPatternModifiers();
10936
- if (text2.charCodeAt(pos) === 45 /* minus */) {
10937
- pos++;
10938
- scanPatternModifiers(setFlags);
10939
- if (pos === start3 + 1) {
10940
- error2(Diagnostics.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, start3, pos - start3);
10941
- }
10942
- }
10943
- scanExpectedChar(58 /* colon */);
10944
- isPreviousTermQuantifiable = true;
10945
- break;
10946
- }
10947
- } else {
10948
- numberOfCapturingGroups++;
10949
- isPreviousTermQuantifiable = true;
10950
- }
10951
- scanDisjunction(
10952
- /*isInGroup*/
10953
- true
10954
- );
10955
- scanExpectedChar(41 /* closeParen */);
10956
- break;
10957
- case 123 /* openBrace */:
10958
- pos++;
10959
- const digitsStart = pos;
10960
- scanDigits();
10961
- const min2 = tokenValue;
10962
- if (!min2) {
10963
- error2(Diagnostics.Incomplete_quantifier_Digit_expected);
10964
- }
10965
- if (text2.charCodeAt(pos) === 44 /* comma */) {
10966
- pos++;
10967
- scanDigits();
10968
- const max = tokenValue;
10969
- if (max && Number.parseInt(min2) > Number.parseInt(max)) {
10970
- error2(Diagnostics.Numbers_out_of_order_in_quantifier, digitsStart, pos - digitsStart);
10971
- }
10972
- }
10973
- scanExpectedChar(125 /* closeBrace */);
10974
- pos--;
10975
- case 42 /* asterisk */:
10976
- case 43 /* plus */:
10977
- case 63 /* question */:
10978
- pos++;
10979
- if (text2.charCodeAt(pos) === 63 /* question */) {
10980
- pos++;
10981
- }
10982
- if (!isPreviousTermQuantifiable) {
10983
- error2(Diagnostics.There_is_nothing_available_for_repetition, start2, pos - start2);
10984
- }
10985
- isPreviousTermQuantifiable = false;
10986
- break;
10987
- case 46 /* dot */:
10988
- pos++;
10989
- isPreviousTermQuantifiable = true;
10990
- break;
10991
- case 91 /* openBracket */:
10992
- pos++;
10993
- if (unicodeSetsMode) {
10994
- scanClassSetExpression();
10995
- } else {
10996
- scanClassRanges();
10997
- }
10998
- scanExpectedChar(93 /* closeBracket */);
10999
- isPreviousTermQuantifiable = true;
11000
- break;
11001
- case 41 /* closeParen */:
11002
- if (isInGroup) {
11003
- return;
11004
- }
11005
- case 93 /* closeBracket */:
11006
- case 125 /* closeBrace */:
11007
- if (isUnterminated && !isInGroup) {
11008
- return;
11009
- }
11010
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
11011
- pos++;
11012
- isPreviousTermQuantifiable = true;
11013
- break;
11014
- case 47 /* slash */:
11015
- case 124 /* bar */:
11016
- return;
11017
- default:
11018
- if (isLineBreak(ch)) {
11019
- return;
11020
- }
11021
- scanSourceCharacter();
11022
- isPreviousTermQuantifiable = true;
11023
- break;
11024
- }
11025
- }
11026
- }
11027
- function scanPatternModifiers(currFlags = 0 /* None */) {
11028
- while (pos < end2) {
11029
- const ch = text2.charCodeAt(pos);
11030
- if (!isIdentifierPart(ch, languageVersion)) {
11031
- break;
11032
- }
11033
- const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
11034
- if (flag === void 0) {
11035
- error2(Diagnostics.Unknown_regular_expression_flag, pos, 1);
11036
- } else if (currFlags & flag) {
11037
- error2(Diagnostics.Duplicate_regular_expression_flag, pos, 1);
11038
- } else if (!(flag & 28 /* Modifiers */)) {
11039
- error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, 1);
11040
- } else {
11041
- currFlags |= flag;
11042
- const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
11043
- if (languageVersion < availableFrom) {
11044
- error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, 1, ScriptTarget[availableFrom]);
11045
- }
11046
- }
11047
- pos++;
11048
- }
11049
- return currFlags;
11050
- }
11051
- function scanAtomEscape() {
11052
- Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
11053
- switch (text2.charCodeAt(pos)) {
11054
- case 107 /* k */:
11055
- pos++;
11056
- if (text2.charCodeAt(pos) === 60 /* lessThan */) {
11057
- pos++;
11058
- scanGroupName(
11059
- /*isReference*/
11060
- true
11061
- );
11062
- scanExpectedChar(62 /* greaterThan */);
11063
- } else if (unicodeMode) {
11064
- error2(Diagnostics.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, pos - 2, 2);
11065
- }
11066
- break;
11067
- case 113 /* q */:
11068
- if (unicodeSetsMode) {
11069
- pos++;
11070
- error2(Diagnostics.q_is_only_available_inside_character_class, pos - 2, 2);
11071
- break;
11072
- }
11073
- default:
11074
- scanCharacterClassEscape() || scanDecimalEscape() || scanCharacterEscape();
11075
- break;
11076
- }
11077
- }
11078
- function scanDecimalEscape() {
11079
- Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
11080
- const ch = text2.charCodeAt(pos);
11081
- if (ch >= 49 /* _1 */ && ch <= 57 /* _9 */) {
11082
- const start2 = pos;
11083
- scanDigits();
11084
- decimalEscapes.push({ pos: start2, end: pos, value: +tokenValue });
11085
- return true;
11086
- }
11087
- return false;
11088
- }
11089
- function scanCharacterEscape() {
11090
- Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
11091
- let ch = text2.charCodeAt(pos);
11092
- switch (ch) {
11093
- case 99 /* c */:
11094
- pos++;
11095
- ch = text2.charCodeAt(pos);
11096
- if (isASCIILetter(ch)) {
11097
- pos++;
11098
- return String.fromCharCode(ch & 31);
11099
- }
11100
- if (unicodeMode) {
11101
- error2(Diagnostics.c_must_be_followed_by_an_ASCII_letter, pos - 2, 2);
11102
- }
11103
- return String.fromCharCode(ch);
11104
- case 94 /* caret */:
11105
- case 36 /* $ */:
11106
- case 47 /* slash */:
11107
- case 92 /* backslash */:
11108
- case 46 /* dot */:
11109
- case 42 /* asterisk */:
11110
- case 43 /* plus */:
11111
- case 63 /* question */:
11112
- case 40 /* openParen */:
11113
- case 41 /* closeParen */:
11114
- case 91 /* openBracket */:
11115
- case 93 /* closeBracket */:
11116
- case 123 /* openBrace */:
11117
- case 125 /* closeBrace */:
11118
- case 124 /* bar */:
11119
- pos++;
11120
- return String.fromCharCode(ch);
11121
- default:
11122
- if (pos >= end2 || isLineBreak(ch)) {
11123
- error2(Diagnostics.Undetermined_character_escape, pos - 1, 1, ch);
11124
- return "\\";
11125
- }
11126
- pos--;
11127
- return scanEscapeSequence(
11128
- /*shouldEmitInvalidEscapeError*/
11129
- unicodeMode,
11130
- /*isRegularExpression*/
11131
- true
11132
- );
11133
- }
11134
- }
11135
- function scanGroupName(isReference) {
11136
- Debug.assertEqual(text2.charCodeAt(pos - 1), 60 /* lessThan */);
11137
- tokenStart = pos;
11138
- scanIdentifier(codePointAt(text2, pos), languageVersion);
11139
- if (pos === tokenStart) {
11140
- error2(Diagnostics.Expected_a_capturing_group_name);
11141
- } else if (isReference) {
11142
- groupNameReferences.push({ pos: tokenStart, end: pos, name: tokenValue });
11143
- } else if (namedCapturingGroups.some((group2) => group2.has(tokenValue))) {
11144
- error2(Diagnostics.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, tokenStart, pos - tokenStart);
11145
- } else {
11146
- last(namedCapturingGroups).add(tokenValue);
11147
- groupSpecifiers.add(tokenValue);
11148
- }
11149
- }
11150
- function isClassContentExit(ch) {
11151
- return ch === 93 /* closeBracket */ || pos >= end2 || isLineBreak(ch);
11152
- }
11153
- function scanClassRanges() {
11154
- Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
11155
- if (text2.charCodeAt(pos) === 94 /* caret */) {
11156
- pos++;
11157
- }
11158
- while (pos < end2) {
11159
- const ch = text2.charCodeAt(pos);
11160
- if (isClassContentExit(ch)) {
11161
- return;
11162
- }
11163
- const minStart = pos;
11164
- const minCharacter = scanClassAtom();
11165
- if (text2.charCodeAt(pos) === 45 /* minus */) {
11166
- pos++;
11167
- const ch2 = text2.charCodeAt(pos);
11168
- if (isClassContentExit(ch2)) {
11169
- return;
11170
- }
11171
- if (!minCharacter) {
11172
- error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, minStart, pos - 1 - minStart);
11173
- }
11174
- const maxStart = pos;
11175
- const maxCharacter = scanClassAtom();
11176
- if (!maxCharacter) {
11177
- error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, maxStart, pos - maxStart);
11178
- continue;
11179
- }
11180
- if (!minCharacter) {
11181
- continue;
11182
- }
11183
- const minCharacterValue = codePointAt(minCharacter, 0);
11184
- const maxCharacterValue = codePointAt(maxCharacter, 0);
11185
- if (minCharacter.length === charSize(minCharacterValue) && maxCharacter.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
11186
- error2(Diagnostics.Range_out_of_order_in_character_class, minStart, pos - minStart);
11187
- }
11188
- }
11189
- }
11190
- }
11191
- function scanClassSetExpression() {
11192
- Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
11193
- let isCharacterComplement = false;
11194
- if (text2.charCodeAt(pos) === 94 /* caret */) {
11195
- pos++;
11196
- isCharacterComplement = true;
11197
- }
11198
- let expressionMayContainStrings = false;
11199
- let ch = text2.charCodeAt(pos);
11200
- if (isClassContentExit(ch)) {
11201
- return;
11202
- }
11203
- let start2 = pos;
11204
- let oprand;
11205
- switch (text2.slice(pos, pos + 2)) {
11206
- case "--":
11207
- case "&&":
11208
- error2(Diagnostics.Expected_a_class_set_oprand);
11209
- mayContainStrings = false;
11210
- break;
11211
- default:
11212
- oprand = scanClassSetOprand();
11213
- break;
11214
- }
11215
- switch (text2.charCodeAt(pos)) {
11216
- case 45 /* minus */:
11217
- if (text2.charCodeAt(pos + 1) === 45 /* minus */) {
11218
- if (isCharacterComplement && mayContainStrings) {
11219
- error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
11220
- }
11221
- expressionMayContainStrings = mayContainStrings;
11222
- scanClassSetSubExpression(3 /* ClassSubtraction */);
11223
- mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
11224
- return;
11225
- }
11226
- break;
11227
- case 38 /* ampersand */:
11228
- if (text2.charCodeAt(pos + 1) === 38 /* ampersand */) {
11229
- scanClassSetSubExpression(2 /* ClassIntersection */);
11230
- if (isCharacterComplement && mayContainStrings) {
11231
- error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
11232
- }
11233
- expressionMayContainStrings = mayContainStrings;
11234
- mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
11235
- return;
11236
- } else {
11237
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
11238
- }
11239
- break;
11240
- default:
11241
- if (isCharacterComplement && mayContainStrings) {
11242
- error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
11243
- }
11244
- expressionMayContainStrings = mayContainStrings;
11245
- break;
11246
- }
11247
- while (pos < end2) {
11248
- ch = text2.charCodeAt(pos);
11249
- switch (ch) {
11250
- case 45 /* minus */:
11251
- pos++;
11252
- ch = text2.charCodeAt(pos);
11253
- if (isClassContentExit(ch)) {
11254
- mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
11255
- return;
11256
- }
11257
- if (ch === 45 /* minus */) {
11258
- pos++;
11259
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
11260
- start2 = pos - 2;
11261
- oprand = text2.slice(start2, pos);
11262
- continue;
11263
- } else {
11264
- if (!oprand) {
11265
- error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, start2, pos - 1 - start2);
11266
- }
11267
- const secondStart = pos;
11268
- const secondOprand = scanClassSetOprand();
11269
- if (isCharacterComplement && mayContainStrings) {
11270
- error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, secondStart, pos - secondStart);
11271
- }
11272
- expressionMayContainStrings || (expressionMayContainStrings = mayContainStrings);
11273
- if (!secondOprand) {
11274
- error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, secondStart, pos - secondStart);
11275
- break;
11276
- }
11277
- if (!oprand) {
11278
- break;
11279
- }
11280
- const minCharacterValue = codePointAt(oprand, 0);
11281
- const maxCharacterValue = codePointAt(secondOprand, 0);
11282
- if (oprand.length === charSize(minCharacterValue) && secondOprand.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
11283
- error2(Diagnostics.Range_out_of_order_in_character_class, start2, pos - start2);
11284
- }
11285
- }
11286
- break;
11287
- case 38 /* ampersand */:
11288
- start2 = pos;
11289
- pos++;
11290
- if (text2.charCodeAt(pos) === 38 /* ampersand */) {
11291
- pos++;
11292
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
11293
- if (text2.charCodeAt(pos) === 38 /* ampersand */) {
11294
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
11295
- pos++;
11296
- }
11297
- } else {
11298
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
11299
- }
11300
- oprand = text2.slice(start2, pos);
11301
- continue;
11302
- }
11303
- if (isClassContentExit(text2.charCodeAt(pos))) {
11304
- break;
11305
- }
11306
- start2 = pos;
11307
- switch (text2.slice(pos, pos + 2)) {
11308
- case "--":
11309
- case "&&":
11310
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos, 2);
11311
- pos += 2;
11312
- oprand = text2.slice(start2, pos);
11313
- break;
11314
- default:
11315
- oprand = scanClassSetOprand();
11316
- break;
11317
- }
11318
- }
11319
- mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
11320
- }
11321
- function scanClassSetSubExpression(expressionType) {
11322
- let expressionMayContainStrings = mayContainStrings;
11323
- while (pos < end2) {
11324
- let ch = text2.charCodeAt(pos);
11325
- if (isClassContentExit(ch)) {
11326
- break;
11327
- }
11328
- switch (ch) {
11329
- case 45 /* minus */:
11330
- pos++;
11331
- if (text2.charCodeAt(pos) === 45 /* minus */) {
11332
- pos++;
11333
- if (expressionType !== 3 /* ClassSubtraction */) {
11334
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
11335
- }
11336
- } else {
11337
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 1, 1);
11338
- }
11339
- break;
11340
- case 38 /* ampersand */:
11341
- pos++;
11342
- if (text2.charCodeAt(pos) === 38 /* ampersand */) {
11343
- pos++;
11344
- if (expressionType !== 2 /* ClassIntersection */) {
11345
- error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
11346
- }
11347
- if (text2.charCodeAt(pos) === 38 /* ampersand */) {
11348
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
11349
- pos++;
11350
- }
11351
- } else {
11352
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
11353
- }
11354
- break;
11355
- default:
11356
- switch (expressionType) {
11357
- case 3 /* ClassSubtraction */:
11358
- error2(Diagnostics._0_expected, pos, 0, "--");
11359
- break;
11360
- case 2 /* ClassIntersection */:
11361
- error2(Diagnostics._0_expected, pos, 0, "&&");
11362
- break;
11363
- default:
11364
- break;
11365
- }
11366
- break;
11367
- }
11368
- ch = text2.charCodeAt(pos);
11369
- if (isClassContentExit(ch)) {
11370
- error2(Diagnostics.Expected_a_class_set_oprand);
11371
- break;
11372
- }
11373
- scanClassSetOprand();
11374
- expressionMayContainStrings && (expressionMayContainStrings = mayContainStrings);
11375
- }
11376
- mayContainStrings = expressionMayContainStrings;
11377
- }
11378
- function scanClassSetOprand() {
11379
- mayContainStrings = false;
11380
- switch (text2.charCodeAt(pos)) {
11381
- case 91 /* openBracket */:
11382
- pos++;
11383
- scanClassSetExpression();
11384
- scanExpectedChar(93 /* closeBracket */);
11385
- return "";
11386
- case 92 /* backslash */:
11387
- pos++;
11388
- if (scanCharacterClassEscape()) {
11389
- return "";
11390
- } else if (text2.charCodeAt(pos) === 113 /* q */) {
11391
- pos++;
11392
- if (text2.charCodeAt(pos) === 123 /* openBrace */) {
11393
- pos++;
11394
- scanClassStringDisjunctionContents();
11395
- scanExpectedChar(125 /* closeBrace */);
11396
- return "";
11397
- } else {
11398
- error2(Diagnostics.q_must_be_followed_by_string_alternatives_enclosed_in_braces, pos - 2, 2);
11399
- return "q";
11400
- }
11401
- }
11402
- pos--;
11403
- default:
11404
- return scanClassSetCharacter();
11405
- }
11406
- }
11407
- function scanClassStringDisjunctionContents() {
11408
- Debug.assertEqual(text2.charCodeAt(pos - 1), 123 /* openBrace */);
11409
- let characterCount = 0;
11410
- while (pos < end2) {
11411
- const ch = text2.charCodeAt(pos);
11412
- switch (ch) {
11413
- case 125 /* closeBrace */:
11414
- if (characterCount !== 1) {
11415
- mayContainStrings = true;
11416
- }
11417
- return;
11418
- case 124 /* bar */:
11419
- if (characterCount !== 1) {
11420
- mayContainStrings = true;
11421
- }
11422
- pos++;
11423
- start = pos;
11424
- characterCount = 0;
11425
- break;
11426
- default:
11427
- if (isLineBreak(ch)) {
11428
- break;
11429
- }
11430
- scanClassSetCharacter();
11431
- characterCount++;
11432
- break;
11433
- }
11434
- }
11435
- }
11436
- function scanClassSetCharacter() {
11437
- const ch = text2.charCodeAt(pos);
11438
- if (ch === 92 /* backslash */) {
11439
- pos++;
11440
- const ch2 = text2.charCodeAt(pos);
11441
- switch (ch2) {
11442
- case 98 /* b */:
11443
- pos++;
11444
- return "\b";
11445
- case 38 /* ampersand */:
11446
- case 45 /* minus */:
11447
- case 33 /* exclamation */:
11448
- case 35 /* hash */:
11449
- case 37 /* percent */:
11450
- case 44 /* comma */:
11451
- case 58 /* colon */:
11452
- case 59 /* semicolon */:
11453
- case 60 /* lessThan */:
11454
- case 61 /* equals */:
11455
- case 62 /* greaterThan */:
11456
- case 64 /* at */:
11457
- case 96 /* backtick */:
11458
- case 126 /* tilde */:
11459
- pos++;
11460
- return String.fromCharCode(ch2);
11461
- default:
11462
- return scanCharacterEscape();
11463
- }
11464
- } else if (ch === text2.charCodeAt(pos + 1)) {
11465
- switch (ch) {
11466
- case 38 /* ampersand */:
11467
- case 33 /* exclamation */:
11468
- case 35 /* hash */:
11469
- case 37 /* percent */:
11470
- case 42 /* asterisk */:
11471
- case 43 /* plus */:
11472
- case 44 /* comma */:
11473
- case 46 /* dot */:
11474
- case 58 /* colon */:
11475
- case 59 /* semicolon */:
11476
- case 60 /* lessThan */:
11477
- case 61 /* equals */:
11478
- case 62 /* greaterThan */:
11479
- case 63 /* question */:
11480
- case 64 /* at */:
11481
- case 96 /* backtick */:
11482
- case 126 /* tilde */:
11483
- error2(Diagnostics.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, pos, 2);
11484
- pos += 2;
11485
- return text2.substring(pos - 2, pos);
11486
- }
11487
- }
11488
- switch (ch) {
11489
- case 47 /* slash */:
11490
- case 40 /* openParen */:
11491
- case 41 /* closeParen */:
11492
- case 91 /* openBracket */:
11493
- case 93 /* closeBracket */:
11494
- case 123 /* openBrace */:
11495
- case 125 /* closeBrace */:
11496
- case 45 /* minus */:
11497
- case 124 /* bar */:
11498
- error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
11499
- pos++;
11500
- return String.fromCharCode(ch);
11501
- }
11502
- return scanSourceCharacter();
11503
- }
11504
- function scanClassAtom() {
11505
- if (text2.charCodeAt(pos) === 92 /* backslash */) {
11506
- pos++;
11507
- const ch = text2.charCodeAt(pos);
11508
- switch (ch) {
11509
- case 98 /* b */:
11510
- pos++;
11511
- return "\b";
11512
- case 45 /* minus */:
11513
- pos++;
11514
- return String.fromCharCode(ch);
11515
- default:
11516
- if (scanCharacterClassEscape()) {
11517
- return "";
11518
- }
11519
- return scanCharacterEscape();
11520
- }
11521
- } else {
11522
- return scanSourceCharacter();
11523
- }
11524
- }
11525
- function scanCharacterClassEscape() {
11526
- Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
11527
- let isCharacterComplement = false;
11528
- const start2 = pos - 1;
11529
- const ch = text2.charCodeAt(pos);
11530
- switch (ch) {
11531
- case 100 /* d */:
11532
- case 68 /* D */:
11533
- case 115 /* s */:
11534
- case 83 /* S */:
11535
- case 119 /* w */:
11536
- case 87 /* W */:
11537
- pos++;
11538
- return true;
11539
- case 80 /* P */:
11540
- isCharacterComplement = true;
11541
- case 112 /* p */:
11542
- pos++;
11543
- if (text2.charCodeAt(pos) === 123 /* openBrace */) {
11544
- pos++;
11545
- const propertyNameOrValueStart = pos;
11546
- const propertyNameOrValue = scanWordCharacters();
11547
- if (text2.charCodeAt(pos) === 61 /* equals */) {
11548
- const propertyName = nonBinaryUnicodeProperties.get(propertyNameOrValue);
11549
- if (pos === propertyNameOrValueStart) {
11550
- error2(Diagnostics.Expected_a_Unicode_property_name);
11551
- } else if (propertyName === void 0) {
11552
- error2(Diagnostics.Unknown_Unicode_property_name, propertyNameOrValueStart, pos - propertyNameOrValueStart);
11553
- const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(), identity);
11554
- if (suggestion) {
11555
- error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
11556
- }
11557
- }
11558
- pos++;
11559
- const propertyValueStart = pos;
11560
- const propertyValue = scanWordCharacters();
11561
- if (pos === propertyValueStart) {
11562
- error2(Diagnostics.Expected_a_Unicode_property_value);
11563
- } else if (propertyName !== void 0 && !valuesOfNonBinaryUnicodeProperties[propertyName].has(propertyValue)) {
11564
- error2(Diagnostics.Unknown_Unicode_property_value, propertyValueStart, pos - propertyValueStart);
11565
- const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName], identity);
11566
- if (suggestion) {
11567
- error2(Diagnostics.Did_you_mean_0, propertyValueStart, pos - propertyValueStart, suggestion);
11568
- }
11569
- }
11570
- } else {
11571
- if (pos === propertyNameOrValueStart) {
11572
- error2(Diagnostics.Expected_a_Unicode_property_name_or_value);
11573
- } else if (binaryUnicodePropertiesOfStrings.has(propertyNameOrValue)) {
11574
- if (!unicodeSetsMode) {
11575
- error2(Diagnostics.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, propertyNameOrValueStart, pos - propertyNameOrValueStart);
11576
- } else if (isCharacterComplement) {
11577
- error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, propertyNameOrValueStart, pos - propertyNameOrValueStart);
11578
- } else {
11579
- mayContainStrings = true;
11580
- }
11581
- } else if (!valuesOfNonBinaryUnicodeProperties.General_Category.has(propertyNameOrValue) && !binaryUnicodeProperties.has(propertyNameOrValue)) {
11582
- error2(Diagnostics.Unknown_Unicode_property_name_or_value, propertyNameOrValueStart, pos - propertyNameOrValueStart);
11583
- const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings], identity);
11584
- if (suggestion) {
11585
- error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
11586
- }
11587
- }
11588
- }
11589
- scanExpectedChar(125 /* closeBrace */);
11590
- if (!unicodeMode) {
11591
- error2(Diagnostics.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, start2, pos - start2);
11592
- }
11593
- } else if (unicodeMode) {
11594
- error2(Diagnostics._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, pos - 2, 2, String.fromCharCode(ch));
11595
- }
11596
- return true;
11597
- }
11598
- return false;
11599
- }
11600
- function scanWordCharacters() {
11601
- let value = "";
11602
- while (pos < end2) {
11603
- const ch = text2.charCodeAt(pos);
11604
- if (!isWordCharacter(ch)) {
11605
- break;
11606
- }
11607
- value += String.fromCharCode(ch);
11608
- pos++;
11609
- }
11610
- return value;
11611
- }
11612
- function scanSourceCharacter() {
11613
- const size = unicodeMode ? charSize(codePointAt(text2, pos)) : 1;
11614
- pos += size;
11615
- return text2.substring(pos - size, pos);
11616
- }
11617
- function scanExpectedChar(ch) {
11618
- if (text2.charCodeAt(pos) === ch) {
11619
- pos++;
11620
- } else {
11621
- error2(Diagnostics._0_expected, pos, 0, String.fromCharCode(ch));
11622
- }
11623
- }
11624
- scanDisjunction(
11625
- /*isInGroup*/
11626
- false
11627
- );
11628
- forEach(groupNameReferences, (reference) => {
11629
- if (!groupSpecifiers.has(reference.name)) {
11630
- error2(Diagnostics.There_is_no_capturing_group_named_0_in_this_regular_expression, reference.pos, reference.end - reference.pos, reference.name);
11631
- }
11632
- });
11633
- forEach(decimalEscapes, (escape) => {
11634
- if (escape.value > numberOfCapturingGroups) {
11635
- if (numberOfCapturingGroups) {
11636
- error2(Diagnostics.A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_regular_expression, escape.pos, escape.end - escape.pos, numberOfCapturingGroups);
11637
- } else {
11638
- error2(Diagnostics.Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression, escape.pos, escape.end - escape.pos);
11639
- }
11640
- }
11641
- });
11642
- }
11643
10770
  }
11644
10771
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
11645
10772
  const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
@@ -11862,6 +10989,8 @@ ${lanes.join("\n")}
11862
10989
  pos--;
11863
10990
  const extendedCookedChar = peekExtendedUnicodeEscape();
11864
10991
  if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
10992
+ pos += 3;
10993
+ tokenFlags |= 8 /* ExtendedUnicodeEscape */;
11865
10994
  tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
11866
10995
  return token = getIdentifierToken();
11867
10996
  }
@@ -11995,7 +11124,7 @@ ${lanes.join("\n")}
11995
11124
  function utf16EncodeAsString(codePoint) {
11996
11125
  return utf16EncodeAsStringWorker(codePoint);
11997
11126
  }
11998
- var textToKeywordObj, textToKeyword, textToToken, charToRegExpFlag, regExpFlagToFirstAvailableLanguageVersion, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, regExpFlagChars, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker, nonBinaryUnicodeProperties, binaryUnicodeProperties, binaryUnicodePropertiesOfStrings, valuesOfNonBinaryUnicodeProperties;
11127
+ var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
11999
11128
  var init_scanner = __esm({
12000
11129
  "src/compiler/scanner.ts"() {
12001
11130
  "use strict";
@@ -12150,26 +11279,6 @@ ${lanes.join("\n")}
12150
11279
  "#": 63 /* HashToken */,
12151
11280
  "`": 62 /* BacktickToken */
12152
11281
  }));
12153
- charToRegExpFlag = new Map(Object.entries({
12154
- d: 1 /* HasIndices */,
12155
- g: 2 /* Global */,
12156
- i: 4 /* IgnoreCase */,
12157
- m: 8 /* Multiline */,
12158
- s: 16 /* DotAll */,
12159
- u: 32 /* Unicode */,
12160
- v: 64 /* UnicodeSets */,
12161
- y: 128 /* Sticky */
12162
- }));
12163
- regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
12164
- [1 /* HasIndices */, 9 /* ES2022 */],
12165
- [2 /* Global */, 0 /* ES3 */],
12166
- [4 /* IgnoreCase */, 0 /* ES3 */],
12167
- [8 /* Multiline */, 0 /* ES3 */],
12168
- [16 /* DotAll */, 5 /* ES2018 */],
12169
- [32 /* Unicode */, 2 /* ES2015 */],
12170
- [64 /* UnicodeSets */, 11 /* ES2024 */],
12171
- [128 /* Sticky */, 2 /* ES2015 */]
12172
- ]);
12173
11282
  unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
12174
11283
  unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
12175
11284
  unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
@@ -12179,26 +11288,9 @@ ${lanes.join("\n")}
12179
11288
  commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
12180
11289
  commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
12181
11290
  tokenStrings = makeReverseMap(textToToken);
12182
- regExpFlagChars = makeReverseMap(charToRegExpFlag);
12183
11291
  mergeConflictMarkerLength = "<<<<<<<".length;
12184
11292
  shebangTriviaRegex = /^#!.*/;
12185
11293
  utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback;
12186
- nonBinaryUnicodeProperties = new Map(Object.entries({
12187
- General_Category: "General_Category",
12188
- gc: "General_Category",
12189
- Script: "Script",
12190
- sc: "Script",
12191
- Script_Extensions: "Script_Extensions",
12192
- scx: "Script_Extensions"
12193
- }));
12194
- binaryUnicodeProperties = /* @__PURE__ */ new Set(["ASCII", "ASCII_Hex_Digit", "AHex", "Alphabetic", "Alpha", "Any", "Assigned", "Bidi_Control", "Bidi_C", "Bidi_Mirrored", "Bidi_M", "Case_Ignorable", "CI", "Cased", "Changes_When_Casefolded", "CWCF", "Changes_When_Casemapped", "CWCM", "Changes_When_Lowercased", "CWL", "Changes_When_NFKC_Casefolded", "CWKCF", "Changes_When_Titlecased", "CWT", "Changes_When_Uppercased", "CWU", "Dash", "Default_Ignorable_Code_Point", "DI", "Deprecated", "Dep", "Diacritic", "Dia", "Emoji", "Emoji_Component", "EComp", "Emoji_Modifier", "EMod", "Emoji_Modifier_Base", "EBase", "Emoji_Presentation", "EPres", "Extended_Pictographic", "ExtPict", "Extender", "Ext", "Grapheme_Base", "Gr_Base", "Grapheme_Extend", "Gr_Ext", "Hex_Digit", "Hex", "IDS_Binary_Operator", "IDSB", "IDS_Trinary_Operator", "IDST", "ID_Continue", "IDC", "ID_Start", "IDS", "Ideographic", "Ideo", "Join_Control", "Join_C", "Logical_Order_Exception", "LOE", "Lowercase", "Lower", "Math", "Noncharacter_Code_Point", "NChar", "Pattern_Syntax", "Pat_Syn", "Pattern_White_Space", "Pat_WS", "Quotation_Mark", "QMark", "Radical", "Regional_Indicator", "RI", "Sentence_Terminal", "STerm", "Soft_Dotted", "SD", "Terminal_Punctuation", "Term", "Unified_Ideograph", "UIdeo", "Uppercase", "Upper", "Variation_Selector", "VS", "White_Space", "space", "XID_Continue", "XIDC", "XID_Start", "XIDS"]);
12195
- binaryUnicodePropertiesOfStrings = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]);
12196
- valuesOfNonBinaryUnicodeProperties = {
12197
- General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]),
12198
- Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]),
12199
- Script_Extensions: /* @__PURE__ */ new Set()
12200
- // Currently empty
12201
- };
12202
11294
  }
12203
11295
  });
12204
11296
 
@@ -18349,7 +17441,7 @@ ${lanes.join("\n")}
18349
17441
  forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
18350
17442
  }
18351
17443
  function formatStringFromArgs(text, args) {
18352
- return text.replace(/\{(\d+)\}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
17444
+ return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index]));
18353
17445
  }
18354
17446
  function setLocalizedDiagnosticMessages(messages) {
18355
17447
  localizedDiagnosticMessages = messages;
@@ -19335,7 +18427,7 @@ ${lanes.join("\n")}
19335
18427
  false
19336
18428
  );
19337
18429
  let success = true;
19338
- scanner2.setOnError(() => void (success = false));
18430
+ scanner2.setOnError(() => success = false);
19339
18431
  scanner2.setText(s + "n");
19340
18432
  let result = scanner2.scan();
19341
18433
  const negative = result === 41 /* MinusToken */;
@@ -30236,10 +29328,7 @@ ${lanes.join("\n")}
30236
29328
  function parseErrorAtPosition(start, length2, message, ...args) {
30237
29329
  const lastError = lastOrUndefined(parseDiagnostics);
30238
29330
  let result;
30239
- if (message.category === 3 /* Message */ && lastError && start === lastError.start && length2 === lastError.length) {
30240
- result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args);
30241
- addRelatedInfo(lastError, result);
30242
- } else if (!lastError || start !== lastError.start) {
29331
+ if (!lastError || start !== lastError.start) {
30243
29332
  result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args);
30244
29333
  parseDiagnostics.push(result);
30245
29334
  }
@@ -30250,10 +29339,10 @@ ${lanes.join("\n")}
30250
29339
  return parseErrorAtPosition(start, end - start, message, ...args);
30251
29340
  }
30252
29341
  function parseErrorAtRange(range, message, ...args) {
30253
- return parseErrorAt(range.pos, range.end, message, ...args);
29342
+ parseErrorAt(range.pos, range.end, message, ...args);
30254
29343
  }
30255
- function scanError(message, pos, length2, ...args) {
30256
- return parseErrorAtPosition(pos, length2, message, ...args);
29344
+ function scanError(message, length2, arg0) {
29345
+ parseErrorAtPosition(scanner2.getTokenEnd(), length2, message, arg0);
30257
29346
  }
30258
29347
  function getNodePos() {
30259
29348
  return scanner2.getTokenFullStart();
@@ -30395,7 +29484,7 @@ ${lanes.join("\n")}
30395
29484
  parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64 /* EqualsToken */);
30396
29485
  return;
30397
29486
  }
30398
- const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, identity) ?? getSpaceSuggestion(expressionText);
29487
+ const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, (n) => n) ?? getSpaceSuggestion(expressionText);
30399
29488
  if (suggestion) {
30400
29489
  parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
30401
29490
  return;
@@ -56408,7 +55497,7 @@ ${lanes.join("\n")}
56408
55497
  if (!lateSymbol)
56409
55498
  lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
56410
55499
  const earlySymbol = earlySymbols && earlySymbols.get(memberName);
56411
- if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
55500
+ if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
56412
55501
  const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
56413
55502
  const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
56414
55503
  forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
@@ -76159,6 +75248,10 @@ ${lanes.join("\n")}
76159
75248
  const nextTypes = [];
76160
75249
  const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
76161
75250
  forEachYieldExpression(func.body, (yieldExpression) => {
75251
+ const statement = findAncestor(yieldExpression, isStatement);
75252
+ if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
75253
+ return;
75254
+ }
76162
75255
  const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
76163
75256
  pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
76164
75257
  let nextType;
@@ -76249,6 +75342,9 @@ ${lanes.join("\n")}
76249
75342
  hasReturnOfTypeNever = true;
76250
75343
  return;
76251
75344
  }
75345
+ if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
75346
+ return;
75347
+ }
76252
75348
  let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
76253
75349
  if (functionFlags & 2 /* Async */) {
76254
75350
  type = unwrapAwaitedType(checkAwaitedType(
@@ -78422,7 +77518,7 @@ ${lanes.join("\n")}
78422
77518
  const isPrivate = isPrivateIdentifier(name);
78423
77519
  const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
78424
77520
  const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
78425
- const memberName = name && getPropertyNameForPropertyNameNode(name);
77521
+ const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
78426
77522
  if (memberName) {
78427
77523
  switch (member.kind) {
78428
77524
  case 177 /* GetAccessor */:
@@ -78469,7 +77565,7 @@ ${lanes.join("\n")}
78469
77565
  const memberNameNode = member.name;
78470
77566
  const isStaticMember = isStatic(member);
78471
77567
  if (isStaticMember && memberNameNode) {
78472
- const memberName = getPropertyNameForPropertyNameNode(memberNameNode);
77568
+ const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
78473
77569
  switch (memberName) {
78474
77570
  case "name":
78475
77571
  case "length":
@@ -184143,7 +183239,6 @@ ${e.message}`;
184143
183239
  PrivateIdentifierKind: () => PrivateIdentifierKind,
184144
183240
  ProcessLevel: () => ProcessLevel,
184145
183241
  QuotePreference: () => QuotePreference,
184146
- RegularExpressionFlags: () => RegularExpressionFlags,
184147
183242
  RelationComparisonResult: () => RelationComparisonResult,
184148
183243
  Rename: () => ts_Rename_exports,
184149
183244
  ScriptElementKind: () => ScriptElementKind,
@@ -184270,7 +183365,6 @@ ${e.message}`;
184270
183365
  changeExtension: () => changeExtension,
184271
183366
  changesAffectModuleResolution: () => changesAffectModuleResolution,
184272
183367
  changesAffectingProgramStructure: () => changesAffectingProgramStructure,
184273
- characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
184274
183368
  childIsDecorated: () => childIsDecorated,
184275
183369
  classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
184276
183370
  classHasClassThisAssignment: () => classHasClassThisAssignment,
@@ -186028,7 +185122,6 @@ ${e.message}`;
186028
185122
  reducePathComponents: () => reducePathComponents,
186029
185123
  refactor: () => ts_refactor_exports,
186030
185124
  regExpEscape: () => regExpEscape,
186031
- regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
186032
185125
  relativeComplement: () => relativeComplement,
186033
185126
  removeAllComments: () => removeAllComments,
186034
185127
  removeEmitHelper: () => removeEmitHelper,
@@ -186549,7 +185642,6 @@ ${e.message}`;
186549
185642
  PrivateIdentifierKind: () => PrivateIdentifierKind,
186550
185643
  ProcessLevel: () => ProcessLevel,
186551
185644
  QuotePreference: () => QuotePreference,
186552
- RegularExpressionFlags: () => RegularExpressionFlags,
186553
185645
  RelationComparisonResult: () => RelationComparisonResult,
186554
185646
  Rename: () => ts_Rename_exports,
186555
185647
  ScriptElementKind: () => ScriptElementKind,
@@ -186676,7 +185768,6 @@ ${e.message}`;
186676
185768
  changeExtension: () => changeExtension,
186677
185769
  changesAffectModuleResolution: () => changesAffectModuleResolution,
186678
185770
  changesAffectingProgramStructure: () => changesAffectingProgramStructure,
186679
- characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
186680
185771
  childIsDecorated: () => childIsDecorated,
186681
185772
  classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
186682
185773
  classHasClassThisAssignment: () => classHasClassThisAssignment,
@@ -188434,7 +187525,6 @@ ${e.message}`;
188434
187525
  reducePathComponents: () => reducePathComponents,
188435
187526
  refactor: () => ts_refactor_exports,
188436
187527
  regExpEscape: () => regExpEscape,
188437
- regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
188438
187528
  relativeComplement: () => relativeComplement,
188439
187529
  removeAllComments: () => removeAllComments,
188440
187530
  removeEmitHelper: () => removeEmitHelper,