@typescript-deploys/pr-build 5.4.0-pr-55600-40 → 5.4.0-pr-55774-21
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/tsc.js +163 -1051
- package/lib/tsserver.js +178 -1064
- package/lib/typescript.d.ts +3 -3
- package/lib/typescript.js +180 -1063
- package/lib/typingsInstaller.js +71 -996
- package/package.json +2 -2
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20231108`;
|
|
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,
|
|
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, JSDocParsingMode;
|
|
3501
3501
|
var init_types = __esm({
|
|
3502
3502
|
"src/compiler/types.ts"() {
|
|
3503
3503
|
"use strict";
|
|
@@ -4018,20 +4018,6 @@ ${lanes.join("\n")}
|
|
|
4018
4018
|
GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["AllowNameSubstitution"] = 64] = "AllowNameSubstitution";
|
|
4019
4019
|
return GeneratedIdentifierFlags2;
|
|
4020
4020
|
})(GeneratedIdentifierFlags || {});
|
|
4021
|
-
RegularExpressionFlags = /* @__PURE__ */ ((RegularExpressionFlags2) => {
|
|
4022
|
-
RegularExpressionFlags2[RegularExpressionFlags2["None"] = 0] = "None";
|
|
4023
|
-
RegularExpressionFlags2[RegularExpressionFlags2["HasIndices"] = 1] = "HasIndices";
|
|
4024
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Global"] = 2] = "Global";
|
|
4025
|
-
RegularExpressionFlags2[RegularExpressionFlags2["IgnoreCase"] = 4] = "IgnoreCase";
|
|
4026
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Multiline"] = 8] = "Multiline";
|
|
4027
|
-
RegularExpressionFlags2[RegularExpressionFlags2["DotAll"] = 16] = "DotAll";
|
|
4028
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Unicode"] = 32] = "Unicode";
|
|
4029
|
-
RegularExpressionFlags2[RegularExpressionFlags2["UnicodeSets"] = 64] = "UnicodeSets";
|
|
4030
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Sticky"] = 128] = "Sticky";
|
|
4031
|
-
RegularExpressionFlags2[RegularExpressionFlags2["UnicodeMode"] = 96] = "UnicodeMode";
|
|
4032
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Modifiers"] = 28] = "Modifiers";
|
|
4033
|
-
return RegularExpressionFlags2;
|
|
4034
|
-
})(RegularExpressionFlags || {});
|
|
4035
4021
|
TokenFlags = /* @__PURE__ */ ((TokenFlags2) => {
|
|
4036
4022
|
TokenFlags2[TokenFlags2["None"] = 0] = "None";
|
|
4037
4023
|
TokenFlags2[TokenFlags2["PrecedingLineBreak"] = 1] = "PrecedingLineBreak";
|
|
@@ -4179,6 +4165,7 @@ ${lanes.join("\n")}
|
|
|
4179
4165
|
TypeFormatFlags2[TypeFormatFlags2["None"] = 0] = "None";
|
|
4180
4166
|
TypeFormatFlags2[TypeFormatFlags2["NoTruncation"] = 1] = "NoTruncation";
|
|
4181
4167
|
TypeFormatFlags2[TypeFormatFlags2["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
|
|
4168
|
+
TypeFormatFlags2[TypeFormatFlags2["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams";
|
|
4182
4169
|
TypeFormatFlags2[TypeFormatFlags2["UseStructuralFallback"] = 8] = "UseStructuralFallback";
|
|
4183
4170
|
TypeFormatFlags2[TypeFormatFlags2["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
|
|
4184
4171
|
TypeFormatFlags2[TypeFormatFlags2["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
|
|
@@ -4198,7 +4185,7 @@ ${lanes.join("\n")}
|
|
|
4198
4185
|
TypeFormatFlags2[TypeFormatFlags2["InElementType"] = 2097152] = "InElementType";
|
|
4199
4186
|
TypeFormatFlags2[TypeFormatFlags2["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument";
|
|
4200
4187
|
TypeFormatFlags2[TypeFormatFlags2["InTypeAlias"] = 8388608] = "InTypeAlias";
|
|
4201
|
-
TypeFormatFlags2[TypeFormatFlags2["NodeBuilderFlagsMask"] =
|
|
4188
|
+
TypeFormatFlags2[TypeFormatFlags2["NodeBuilderFlagsMask"] = 848330095] = "NodeBuilderFlagsMask";
|
|
4202
4189
|
return TypeFormatFlags2;
|
|
4203
4190
|
})(TypeFormatFlags || {});
|
|
4204
4191
|
SymbolFormatFlags = /* @__PURE__ */ ((SymbolFormatFlags2) => {
|
|
@@ -4363,6 +4350,7 @@ ${lanes.join("\n")}
|
|
|
4363
4350
|
InternalSymbolName2["ExportEquals"] = "export=";
|
|
4364
4351
|
InternalSymbolName2["Default"] = "default";
|
|
4365
4352
|
InternalSymbolName2["This"] = "this";
|
|
4353
|
+
InternalSymbolName2["InstantiationExpression"] = "__instantiationExpression";
|
|
4366
4354
|
return InternalSymbolName2;
|
|
4367
4355
|
})(InternalSymbolName || {});
|
|
4368
4356
|
NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
|
|
@@ -4736,8 +4724,6 @@ ${lanes.join("\n")}
|
|
|
4736
4724
|
ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020";
|
|
4737
4725
|
ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021";
|
|
4738
4726
|
ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022";
|
|
4739
|
-
ScriptTarget11[ScriptTarget11["ES2023"] = 10] = "ES2023";
|
|
4740
|
-
ScriptTarget11[ScriptTarget11["ES2024"] = 11] = "ES2024";
|
|
4741
4727
|
ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext";
|
|
4742
4728
|
ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON";
|
|
4743
4729
|
ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest";
|
|
@@ -7433,43 +7419,6 @@ ${lanes.join("\n")}
|
|
|
7433
7419
|
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."),
|
|
7434
7420
|
_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."),
|
|
7435
7421
|
Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
|
|
7436
|
-
Unknown_regular_expression_flag: diag(1497, 1 /* Error */, "Unknown_regular_expression_flag_1497", "Unknown regular expression flag."),
|
|
7437
|
-
Duplicate_regular_expression_flag: diag(1498, 1 /* Error */, "Duplicate_regular_expression_flag_1498", "Duplicate regular expression flag."),
|
|
7438
|
-
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."),
|
|
7439
|
-
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."),
|
|
7440
|
-
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."),
|
|
7441
|
-
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."),
|
|
7442
|
-
Incomplete_quantifier_Digit_expected: diag(1503, 1 /* Error */, "Incomplete_quantifier_Digit_expected_1503", "Incomplete quantifier. Digit expected."),
|
|
7443
|
-
Numbers_out_of_order_in_quantifier: diag(1504, 1 /* Error */, "Numbers_out_of_order_in_quantifier_1504", "Numbers out of order in quantifier."),
|
|
7444
|
-
There_is_nothing_available_for_repetition: diag(1505, 1 /* Error */, "There_is_nothing_available_for_repetition_1505", "There is nothing available for repetition."),
|
|
7445
|
-
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?"),
|
|
7446
|
-
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."),
|
|
7447
|
-
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."),
|
|
7448
|
-
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."),
|
|
7449
|
-
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."),
|
|
7450
|
-
Undetermined_character_escape: diag(1511, 1 /* Error */, "Undetermined_character_escape_1511", "Undetermined character escape."),
|
|
7451
|
-
Expected_a_capturing_group_name: diag(1512, 1 /* Error */, "Expected_a_capturing_group_name_1512", "Expected a capturing group name."),
|
|
7452
|
-
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."),
|
|
7453
|
-
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."),
|
|
7454
|
-
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."),
|
|
7455
|
-
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."),
|
|
7456
|
-
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."),
|
|
7457
|
-
Expected_a_class_set_oprand: diag(1518, 1 /* Error */, "Expected_a_class_set_oprand_1518", "Expected a class set oprand."),
|
|
7458
|
-
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."),
|
|
7459
|
-
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?"),
|
|
7460
|
-
Expected_a_Unicode_property_name: diag(1521, 1 /* Error */, "Expected_a_Unicode_property_name_1521", "Expected a Unicode property name."),
|
|
7461
|
-
Unknown_Unicode_property_name: diag(1522, 1 /* Error */, "Unknown_Unicode_property_name_1522", "Unknown Unicode property name."),
|
|
7462
|
-
Expected_a_Unicode_property_value: diag(1523, 1 /* Error */, "Expected_a_Unicode_property_value_1523", "Expected a Unicode property value."),
|
|
7463
|
-
Unknown_Unicode_property_value: diag(1524, 1 /* Error */, "Unknown_Unicode_property_value_1524", "Unknown Unicode property value."),
|
|
7464
|
-
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."),
|
|
7465
|
-
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."),
|
|
7466
|
-
Unknown_Unicode_property_name_or_value: diag(1527, 1 /* Error */, "Unknown_Unicode_property_name_or_value_1527", "Unknown Unicode property name or value."),
|
|
7467
|
-
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."),
|
|
7468
|
-
_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."),
|
|
7469
|
-
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."),
|
|
7470
|
-
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."),
|
|
7471
|
-
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."),
|
|
7472
|
-
_0_is_not_a_valid_character_escape: diag(1533, 1 /* Error */, "_0_is_not_a_valid_character_escape_1533", "'\\{0}' is not a valid character escape."),
|
|
7473
7422
|
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."),
|
|
7474
7423
|
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."),
|
|
7475
7424
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -9204,15 +9153,6 @@ ${lanes.join("\n")}
|
|
|
9204
9153
|
function stringToToken(s) {
|
|
9205
9154
|
return textToToken.get(s);
|
|
9206
9155
|
}
|
|
9207
|
-
function regularExpressionFlagToCharacter(f) {
|
|
9208
|
-
return regExpFlagChars[f];
|
|
9209
|
-
}
|
|
9210
|
-
function characterToRegularExpressionFlag(c) {
|
|
9211
|
-
return charToRegExpFlag.get(c);
|
|
9212
|
-
}
|
|
9213
|
-
function regularExpressionFlagToFirstAvailableLanguageVersion(f) {
|
|
9214
|
-
return regExpFlagToFirstAvailableLanguageVersion.get(f);
|
|
9215
|
-
}
|
|
9216
9156
|
function computeLineStarts(text) {
|
|
9217
9157
|
const result = [];
|
|
9218
9158
|
let pos = 0;
|
|
@@ -9309,11 +9249,8 @@ ${lanes.join("\n")}
|
|
|
9309
9249
|
function isHexDigit(ch) {
|
|
9310
9250
|
return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */;
|
|
9311
9251
|
}
|
|
9312
|
-
function
|
|
9313
|
-
return
|
|
9314
|
-
}
|
|
9315
|
-
function isWordCharacter(ch) {
|
|
9316
|
-
return isASCIILetter(ch) || isDigit(ch) || ch === 95 /* _ */;
|
|
9252
|
+
function isCodePoint(code) {
|
|
9253
|
+
return code <= 1114111;
|
|
9317
9254
|
}
|
|
9318
9255
|
function isOctalDigit(ch) {
|
|
9319
9256
|
return ch >= 48 /* _0 */ && ch <= 55 /* _7 */;
|
|
@@ -9650,10 +9587,10 @@ ${lanes.join("\n")}
|
|
|
9650
9587
|
}
|
|
9651
9588
|
}
|
|
9652
9589
|
function isIdentifierStart(ch, languageVersion) {
|
|
9653
|
-
return
|
|
9590
|
+
return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
|
|
9654
9591
|
}
|
|
9655
9592
|
function isIdentifierPart(ch, languageVersion, identifierVariant) {
|
|
9656
|
-
return
|
|
9593
|
+
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
|
|
9657
9594
|
(identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
|
|
9658
9595
|
}
|
|
9659
9596
|
function isIdentifierText(name, languageVersion, identifierVariant) {
|
|
@@ -9974,9 +9911,7 @@ ${lanes.join("\n")}
|
|
|
9974
9911
|
result += text.substring(start2, pos);
|
|
9975
9912
|
result += scanEscapeSequence(
|
|
9976
9913
|
/*shouldEmitInvalidEscapeError*/
|
|
9977
|
-
true
|
|
9978
|
-
/*isRegularExpression*/
|
|
9979
|
-
false
|
|
9914
|
+
true
|
|
9980
9915
|
);
|
|
9981
9916
|
start2 = pos;
|
|
9982
9917
|
continue;
|
|
@@ -10020,11 +9955,7 @@ ${lanes.join("\n")}
|
|
|
10020
9955
|
}
|
|
10021
9956
|
if (currChar === 92 /* backslash */) {
|
|
10022
9957
|
contents += text.substring(start2, pos);
|
|
10023
|
-
contents += scanEscapeSequence(
|
|
10024
|
-
shouldEmitInvalidEscapeError,
|
|
10025
|
-
/*isRegularExpression*/
|
|
10026
|
-
false
|
|
10027
|
-
);
|
|
9958
|
+
contents += scanEscapeSequence(shouldEmitInvalidEscapeError);
|
|
10028
9959
|
start2 = pos;
|
|
10029
9960
|
continue;
|
|
10030
9961
|
}
|
|
@@ -10044,7 +9975,7 @@ ${lanes.join("\n")}
|
|
|
10044
9975
|
tokenValue = contents;
|
|
10045
9976
|
return resultingToken;
|
|
10046
9977
|
}
|
|
10047
|
-
function scanEscapeSequence(shouldEmitInvalidEscapeError
|
|
9978
|
+
function scanEscapeSequence(shouldEmitInvalidEscapeError) {
|
|
10048
9979
|
const start2 = pos;
|
|
10049
9980
|
pos++;
|
|
10050
9981
|
if (pos >= end) {
|
|
@@ -10072,7 +10003,7 @@ ${lanes.join("\n")}
|
|
|
10072
10003
|
pos++;
|
|
10073
10004
|
}
|
|
10074
10005
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10075
|
-
if (
|
|
10006
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10076
10007
|
const code = parseInt(text.substring(start2 + 1, pos), 8);
|
|
10077
10008
|
error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0"));
|
|
10078
10009
|
return String.fromCharCode(code);
|
|
@@ -10081,7 +10012,7 @@ ${lanes.join("\n")}
|
|
|
10081
10012
|
case 56 /* _8 */:
|
|
10082
10013
|
case 57 /* _9 */:
|
|
10083
10014
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10084
|
-
if (
|
|
10015
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10085
10016
|
error2(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos));
|
|
10086
10017
|
return String.fromCharCode(ch);
|
|
10087
10018
|
}
|
|
@@ -10103,42 +10034,62 @@ ${lanes.join("\n")}
|
|
|
10103
10034
|
case 34 /* doubleQuote */:
|
|
10104
10035
|
return '"';
|
|
10105
10036
|
case 117 /* u */:
|
|
10106
|
-
if (
|
|
10107
|
-
pos
|
|
10108
|
-
|
|
10037
|
+
if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
|
|
10038
|
+
pos++;
|
|
10039
|
+
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
10040
|
+
1,
|
|
10041
|
+
/*canHaveSeparators*/
|
|
10042
|
+
false
|
|
10043
|
+
);
|
|
10044
|
+
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
10045
|
+
if (escapedValue < 0) {
|
|
10046
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10047
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10048
|
+
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
10049
|
+
}
|
|
10050
|
+
return text.substring(start2, pos);
|
|
10051
|
+
}
|
|
10052
|
+
if (!isCodePoint(escapedValue)) {
|
|
10053
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10054
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10055
|
+
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
|
|
10056
|
+
}
|
|
10057
|
+
return text.substring(start2, pos);
|
|
10058
|
+
}
|
|
10059
|
+
if (pos >= end) {
|
|
10060
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10061
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10062
|
+
error2(Diagnostics.Unexpected_end_of_text);
|
|
10063
|
+
}
|
|
10064
|
+
return text.substring(start2, pos);
|
|
10065
|
+
}
|
|
10066
|
+
if (text.charCodeAt(pos) !== 125 /* closeBrace */) {
|
|
10067
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10068
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10069
|
+
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
10070
|
+
}
|
|
10071
|
+
return text.substring(start2, pos);
|
|
10072
|
+
}
|
|
10073
|
+
pos++;
|
|
10074
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
10075
|
+
return utf16EncodeAsString(escapedValue);
|
|
10109
10076
|
}
|
|
10110
10077
|
for (; pos < start2 + 6; pos++) {
|
|
10111
10078
|
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
10112
10079
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10113
|
-
if (
|
|
10080
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10114
10081
|
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
10115
10082
|
}
|
|
10116
10083
|
return text.substring(start2, pos);
|
|
10117
10084
|
}
|
|
10118
10085
|
}
|
|
10119
10086
|
tokenFlags |= 1024 /* UnicodeEscape */;
|
|
10120
|
-
|
|
10121
|
-
const escapedValueString = String.fromCharCode(escapedValue);
|
|
10122
|
-
if (isRegularExpression && shouldEmitInvalidEscapeError && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && text.charCodeAt(pos + 2) !== 123 /* openBrace */) {
|
|
10123
|
-
const nextStart = pos;
|
|
10124
|
-
let nextPos = pos + 2;
|
|
10125
|
-
for (; nextPos < nextStart + 6; nextPos++) {
|
|
10126
|
-
if (!isHexDigit(text.charCodeAt(pos))) {
|
|
10127
|
-
return escapedValueString;
|
|
10128
|
-
}
|
|
10129
|
-
}
|
|
10130
|
-
const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);
|
|
10131
|
-
if (nextEscapedValue >= 56320 && nextEscapedValue <= 57343) {
|
|
10132
|
-
pos = nextPos;
|
|
10133
|
-
return escapedValueString + String.fromCharCode(nextEscapedValue);
|
|
10134
|
-
}
|
|
10135
|
-
}
|
|
10136
|
-
return escapedValueString;
|
|
10087
|
+
return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));
|
|
10137
10088
|
case 120 /* x */:
|
|
10138
10089
|
for (; pos < start2 + 4; pos++) {
|
|
10139
10090
|
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
10140
10091
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
10141
|
-
if (
|
|
10092
|
+
if (shouldEmitInvalidEscapeError) {
|
|
10142
10093
|
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
10143
10094
|
}
|
|
10144
10095
|
return text.substring(start2, pos);
|
|
@@ -10155,16 +10106,10 @@ ${lanes.join("\n")}
|
|
|
10155
10106
|
case 8233 /* paragraphSeparator */:
|
|
10156
10107
|
return "";
|
|
10157
10108
|
default:
|
|
10158
|
-
if (isRegularExpression && (shouldEmitInvalidEscapeError || isIdentifierPart(ch, languageVersion))) {
|
|
10159
|
-
error2(Diagnostics._0_is_not_a_valid_character_escape, pos - 2, 2, String.fromCharCode(ch));
|
|
10160
|
-
}
|
|
10161
10109
|
return String.fromCharCode(ch);
|
|
10162
10110
|
}
|
|
10163
10111
|
}
|
|
10164
|
-
function scanExtendedUnicodeEscape(
|
|
10165
|
-
const start2 = pos;
|
|
10166
|
-
pos += 3;
|
|
10167
|
-
const escapedStart = pos;
|
|
10112
|
+
function scanExtendedUnicodeEscape() {
|
|
10168
10113
|
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
10169
10114
|
1,
|
|
10170
10115
|
/*canHaveSeparators*/
|
|
@@ -10173,34 +10118,24 @@ ${lanes.join("\n")}
|
|
|
10173
10118
|
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
10174
10119
|
let isInvalidExtendedEscape = false;
|
|
10175
10120
|
if (escapedValue < 0) {
|
|
10176
|
-
|
|
10177
|
-
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
10178
|
-
}
|
|
10121
|
+
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
10179
10122
|
isInvalidExtendedEscape = true;
|
|
10180
10123
|
} else if (escapedValue > 1114111) {
|
|
10181
|
-
|
|
10182
|
-
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, escapedStart, pos - escapedStart);
|
|
10183
|
-
}
|
|
10124
|
+
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
|
|
10184
10125
|
isInvalidExtendedEscape = true;
|
|
10185
10126
|
}
|
|
10186
10127
|
if (pos >= end) {
|
|
10187
|
-
|
|
10188
|
-
error2(Diagnostics.Unexpected_end_of_text);
|
|
10189
|
-
}
|
|
10128
|
+
error2(Diagnostics.Unexpected_end_of_text);
|
|
10190
10129
|
isInvalidExtendedEscape = true;
|
|
10191
10130
|
} else if (text.charCodeAt(pos) === 125 /* closeBrace */) {
|
|
10192
10131
|
pos++;
|
|
10193
10132
|
} else {
|
|
10194
|
-
|
|
10195
|
-
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
10196
|
-
}
|
|
10133
|
+
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
10197
10134
|
isInvalidExtendedEscape = true;
|
|
10198
10135
|
}
|
|
10199
10136
|
if (isInvalidExtendedEscape) {
|
|
10200
|
-
|
|
10201
|
-
return text.substring(start2, pos);
|
|
10137
|
+
return "";
|
|
10202
10138
|
}
|
|
10203
|
-
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
10204
10139
|
return utf16EncodeAsString(escapedValue);
|
|
10205
10140
|
}
|
|
10206
10141
|
function peekUnicodeEscape() {
|
|
@@ -10242,6 +10177,8 @@ ${lanes.join("\n")}
|
|
|
10242
10177
|
} else if (ch === 92 /* backslash */) {
|
|
10243
10178
|
ch = peekExtendedUnicodeEscape();
|
|
10244
10179
|
if (ch >= 0 && isIdentifierPart(ch, languageVersion)) {
|
|
10180
|
+
pos += 3;
|
|
10181
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
10245
10182
|
result += scanExtendedUnicodeEscape();
|
|
10246
10183
|
start2 = pos;
|
|
10247
10184
|
continue;
|
|
@@ -10712,6 +10649,8 @@ ${lanes.join("\n")}
|
|
|
10712
10649
|
case 92 /* backslash */:
|
|
10713
10650
|
const extendedCookedChar = peekExtendedUnicodeEscape();
|
|
10714
10651
|
if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
|
|
10652
|
+
pos += 3;
|
|
10653
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
10715
10654
|
tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
10716
10655
|
return token = getIdentifierToken();
|
|
10717
10656
|
}
|
|
@@ -10727,7 +10666,7 @@ ${lanes.join("\n")}
|
|
|
10727
10666
|
return token = 0 /* Unknown */;
|
|
10728
10667
|
case 35 /* hash */:
|
|
10729
10668
|
if (pos !== 0 && text[pos + 1] === "!") {
|
|
10730
|
-
error2(Diagnostics.can_only_be_used_at_the_start_of_a_file
|
|
10669
|
+
error2(Diagnostics.can_only_be_used_at_the_start_of_a_file);
|
|
10731
10670
|
pos++;
|
|
10732
10671
|
return token = 0 /* Unknown */;
|
|
10733
10672
|
}
|
|
@@ -10736,6 +10675,8 @@ ${lanes.join("\n")}
|
|
|
10736
10675
|
pos++;
|
|
10737
10676
|
const extendedCookedChar2 = peekExtendedUnicodeEscape();
|
|
10738
10677
|
if (extendedCookedChar2 >= 0 && isIdentifierStart(extendedCookedChar2, languageVersion)) {
|
|
10678
|
+
pos += 3;
|
|
10679
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
10739
10680
|
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
10740
10681
|
return token = 81 /* PrivateIdentifier */;
|
|
10741
10682
|
}
|
|
@@ -10873,841 +10814,14 @@ ${lanes.join("\n")}
|
|
|
10873
10814
|
}
|
|
10874
10815
|
p++;
|
|
10875
10816
|
}
|
|
10876
|
-
|
|
10877
|
-
const endOfBody = p - (isUnterminated ? 0 : 1);
|
|
10878
|
-
let regExpFlags = 0 /* None */;
|
|
10879
|
-
while (p < end) {
|
|
10880
|
-
const ch = text.charCodeAt(p);
|
|
10881
|
-
if (!isIdentifierPart(ch, languageVersion)) {
|
|
10882
|
-
break;
|
|
10883
|
-
}
|
|
10884
|
-
const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
|
|
10885
|
-
if (flag === void 0) {
|
|
10886
|
-
error2(Diagnostics.Unknown_regular_expression_flag, p, 1);
|
|
10887
|
-
} else if (regExpFlags & flag) {
|
|
10888
|
-
error2(Diagnostics.Duplicate_regular_expression_flag, p, 1);
|
|
10889
|
-
} else if (((regExpFlags | flag) & 96 /* UnicodeMode */) === 96 /* UnicodeMode */) {
|
|
10890
|
-
error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, p, 1);
|
|
10891
|
-
} else {
|
|
10892
|
-
regExpFlags |= flag;
|
|
10893
|
-
const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
|
|
10894
|
-
if (languageVersion < availableFrom) {
|
|
10895
|
-
error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, p, 1, ScriptTarget[availableFrom]);
|
|
10896
|
-
}
|
|
10897
|
-
}
|
|
10817
|
+
while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
|
|
10898
10818
|
p++;
|
|
10899
10819
|
}
|
|
10900
|
-
pos =
|
|
10901
|
-
const saveTokenPos = tokenStart;
|
|
10902
|
-
const saveTokenFlags = tokenFlags;
|
|
10903
|
-
scanRegularExpressionWorker(text.slice(0, endOfBody), endOfBody, regExpFlags, isUnterminated);
|
|
10904
|
-
if (!isUnterminated) {
|
|
10905
|
-
pos = p;
|
|
10906
|
-
}
|
|
10907
|
-
tokenStart = saveTokenPos;
|
|
10908
|
-
tokenFlags = saveTokenFlags;
|
|
10820
|
+
pos = p;
|
|
10909
10821
|
tokenValue = text.substring(tokenStart, pos);
|
|
10910
10822
|
token = 14 /* RegularExpressionLiteral */;
|
|
10911
10823
|
}
|
|
10912
10824
|
return token;
|
|
10913
|
-
function scanRegularExpressionWorker(text2, end2, regExpFlags, isUnterminated) {
|
|
10914
|
-
const unicodeMode = !!(regExpFlags & 96 /* UnicodeMode */);
|
|
10915
|
-
const unicodeSetsMode = !!(regExpFlags & 64 /* UnicodeSets */);
|
|
10916
|
-
let mayContainStrings = false;
|
|
10917
|
-
let numberOfCapturingGroups = 0;
|
|
10918
|
-
const groupSpecifiers = /* @__PURE__ */ new Set();
|
|
10919
|
-
const groupNameReferences = [];
|
|
10920
|
-
const decimalEscapes = [];
|
|
10921
|
-
const namedCapturingGroups = [];
|
|
10922
|
-
function scanDisjunction(isInGroup) {
|
|
10923
|
-
while (true) {
|
|
10924
|
-
namedCapturingGroups.push(/* @__PURE__ */ new Set());
|
|
10925
|
-
scanAlternative(isInGroup);
|
|
10926
|
-
namedCapturingGroups.pop();
|
|
10927
|
-
if (text2.charCodeAt(pos) !== 124 /* bar */) {
|
|
10928
|
-
return;
|
|
10929
|
-
}
|
|
10930
|
-
pos++;
|
|
10931
|
-
}
|
|
10932
|
-
}
|
|
10933
|
-
function scanAlternative(isInGroup) {
|
|
10934
|
-
let isPreviousTermQuantifiable = false;
|
|
10935
|
-
while (pos < end2) {
|
|
10936
|
-
const start2 = pos;
|
|
10937
|
-
const ch = text2.charCodeAt(pos);
|
|
10938
|
-
switch (ch) {
|
|
10939
|
-
case 94 /* caret */:
|
|
10940
|
-
case 36 /* $ */:
|
|
10941
|
-
pos++;
|
|
10942
|
-
isPreviousTermQuantifiable = false;
|
|
10943
|
-
break;
|
|
10944
|
-
case 92 /* backslash */:
|
|
10945
|
-
pos++;
|
|
10946
|
-
switch (text2.charCodeAt(pos)) {
|
|
10947
|
-
case 98 /* b */:
|
|
10948
|
-
case 66 /* B */:
|
|
10949
|
-
pos++;
|
|
10950
|
-
isPreviousTermQuantifiable = false;
|
|
10951
|
-
break;
|
|
10952
|
-
default:
|
|
10953
|
-
scanAtomEscape();
|
|
10954
|
-
isPreviousTermQuantifiable = true;
|
|
10955
|
-
break;
|
|
10956
|
-
}
|
|
10957
|
-
break;
|
|
10958
|
-
case 40 /* openParen */:
|
|
10959
|
-
pos++;
|
|
10960
|
-
if (text2.charCodeAt(pos) === 63 /* question */) {
|
|
10961
|
-
pos++;
|
|
10962
|
-
switch (text2.charCodeAt(pos)) {
|
|
10963
|
-
case 61 /* equals */:
|
|
10964
|
-
case 33 /* exclamation */:
|
|
10965
|
-
pos++;
|
|
10966
|
-
isPreviousTermQuantifiable = false;
|
|
10967
|
-
break;
|
|
10968
|
-
case 60 /* lessThan */:
|
|
10969
|
-
const groupNameStart = pos;
|
|
10970
|
-
pos++;
|
|
10971
|
-
switch (text2.charCodeAt(pos)) {
|
|
10972
|
-
case 61 /* equals */:
|
|
10973
|
-
case 33 /* exclamation */:
|
|
10974
|
-
pos++;
|
|
10975
|
-
isPreviousTermQuantifiable = false;
|
|
10976
|
-
break;
|
|
10977
|
-
default:
|
|
10978
|
-
scanGroupName(
|
|
10979
|
-
/*isReference*/
|
|
10980
|
-
false
|
|
10981
|
-
);
|
|
10982
|
-
scanExpectedChar(62 /* greaterThan */);
|
|
10983
|
-
if (languageVersion < 5 /* ES2018 */) {
|
|
10984
|
-
error2(Diagnostics.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, groupNameStart, pos - groupNameStart);
|
|
10985
|
-
}
|
|
10986
|
-
numberOfCapturingGroups++;
|
|
10987
|
-
isPreviousTermQuantifiable = true;
|
|
10988
|
-
break;
|
|
10989
|
-
}
|
|
10990
|
-
break;
|
|
10991
|
-
default:
|
|
10992
|
-
const start3 = pos;
|
|
10993
|
-
const setFlags = scanPatternModifiers();
|
|
10994
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
10995
|
-
pos++;
|
|
10996
|
-
scanPatternModifiers(setFlags);
|
|
10997
|
-
if (pos === start3 + 1) {
|
|
10998
|
-
error2(Diagnostics.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, start3, pos - start3);
|
|
10999
|
-
}
|
|
11000
|
-
}
|
|
11001
|
-
scanExpectedChar(58 /* colon */);
|
|
11002
|
-
isPreviousTermQuantifiable = true;
|
|
11003
|
-
break;
|
|
11004
|
-
}
|
|
11005
|
-
} else {
|
|
11006
|
-
numberOfCapturingGroups++;
|
|
11007
|
-
isPreviousTermQuantifiable = true;
|
|
11008
|
-
}
|
|
11009
|
-
scanDisjunction(
|
|
11010
|
-
/*isInGroup*/
|
|
11011
|
-
true
|
|
11012
|
-
);
|
|
11013
|
-
scanExpectedChar(41 /* closeParen */);
|
|
11014
|
-
break;
|
|
11015
|
-
case 123 /* openBrace */:
|
|
11016
|
-
pos++;
|
|
11017
|
-
const digitsStart = pos;
|
|
11018
|
-
scanDigits();
|
|
11019
|
-
const min2 = tokenValue;
|
|
11020
|
-
if (text2.charCodeAt(pos) === 44 /* comma */) {
|
|
11021
|
-
pos++;
|
|
11022
|
-
scanDigits();
|
|
11023
|
-
const max = tokenValue;
|
|
11024
|
-
if (!min2) {
|
|
11025
|
-
if (max || text2.charCodeAt(pos) === 125 /* closeBrace */) {
|
|
11026
|
-
error2(Diagnostics.Incomplete_quantifier_Digit_expected, digitsStart, 0);
|
|
11027
|
-
} else {
|
|
11028
|
-
if (unicodeMode) {
|
|
11029
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start2, 1, String.fromCharCode(ch));
|
|
11030
|
-
}
|
|
11031
|
-
isPreviousTermQuantifiable = true;
|
|
11032
|
-
break;
|
|
11033
|
-
}
|
|
11034
|
-
}
|
|
11035
|
-
if (max && Number.parseInt(min2) > Number.parseInt(max)) {
|
|
11036
|
-
error2(Diagnostics.Numbers_out_of_order_in_quantifier, digitsStart, pos - digitsStart);
|
|
11037
|
-
}
|
|
11038
|
-
} else if (!min2) {
|
|
11039
|
-
if (unicodeMode) {
|
|
11040
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start2, 1, String.fromCharCode(ch));
|
|
11041
|
-
}
|
|
11042
|
-
isPreviousTermQuantifiable = true;
|
|
11043
|
-
break;
|
|
11044
|
-
}
|
|
11045
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
11046
|
-
pos--;
|
|
11047
|
-
case 42 /* asterisk */:
|
|
11048
|
-
case 43 /* plus */:
|
|
11049
|
-
case 63 /* question */:
|
|
11050
|
-
pos++;
|
|
11051
|
-
if (text2.charCodeAt(pos) === 63 /* question */) {
|
|
11052
|
-
pos++;
|
|
11053
|
-
}
|
|
11054
|
-
if (!isPreviousTermQuantifiable) {
|
|
11055
|
-
error2(Diagnostics.There_is_nothing_available_for_repetition, start2, pos - start2);
|
|
11056
|
-
}
|
|
11057
|
-
isPreviousTermQuantifiable = false;
|
|
11058
|
-
break;
|
|
11059
|
-
case 46 /* dot */:
|
|
11060
|
-
pos++;
|
|
11061
|
-
isPreviousTermQuantifiable = true;
|
|
11062
|
-
break;
|
|
11063
|
-
case 91 /* openBracket */:
|
|
11064
|
-
pos++;
|
|
11065
|
-
if (unicodeSetsMode) {
|
|
11066
|
-
scanClassSetExpression();
|
|
11067
|
-
} else {
|
|
11068
|
-
scanClassRanges();
|
|
11069
|
-
}
|
|
11070
|
-
scanExpectedChar(93 /* closeBracket */);
|
|
11071
|
-
isPreviousTermQuantifiable = true;
|
|
11072
|
-
break;
|
|
11073
|
-
case 41 /* closeParen */:
|
|
11074
|
-
if (isInGroup) {
|
|
11075
|
-
return;
|
|
11076
|
-
}
|
|
11077
|
-
case 93 /* closeBracket */:
|
|
11078
|
-
case 125 /* closeBrace */:
|
|
11079
|
-
if (isUnterminated && !isInGroup) {
|
|
11080
|
-
return;
|
|
11081
|
-
}
|
|
11082
|
-
if (unicodeMode) {
|
|
11083
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
11084
|
-
}
|
|
11085
|
-
pos++;
|
|
11086
|
-
isPreviousTermQuantifiable = true;
|
|
11087
|
-
break;
|
|
11088
|
-
case 47 /* slash */:
|
|
11089
|
-
case 124 /* bar */:
|
|
11090
|
-
return;
|
|
11091
|
-
default:
|
|
11092
|
-
scanSourceCharacter();
|
|
11093
|
-
isPreviousTermQuantifiable = true;
|
|
11094
|
-
break;
|
|
11095
|
-
}
|
|
11096
|
-
}
|
|
11097
|
-
}
|
|
11098
|
-
function scanPatternModifiers(currFlags = 0 /* None */) {
|
|
11099
|
-
while (pos < end2) {
|
|
11100
|
-
const ch = text2.charCodeAt(pos);
|
|
11101
|
-
if (!isIdentifierPart(ch, languageVersion)) {
|
|
11102
|
-
break;
|
|
11103
|
-
}
|
|
11104
|
-
const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
|
|
11105
|
-
if (flag === void 0) {
|
|
11106
|
-
error2(Diagnostics.Unknown_regular_expression_flag, pos, 1);
|
|
11107
|
-
} else if (currFlags & flag) {
|
|
11108
|
-
error2(Diagnostics.Duplicate_regular_expression_flag, pos, 1);
|
|
11109
|
-
} else if (!(flag & 28 /* Modifiers */)) {
|
|
11110
|
-
error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, 1);
|
|
11111
|
-
} else {
|
|
11112
|
-
currFlags |= flag;
|
|
11113
|
-
const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
|
|
11114
|
-
if (languageVersion < availableFrom) {
|
|
11115
|
-
error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, 1, ScriptTarget[availableFrom]);
|
|
11116
|
-
}
|
|
11117
|
-
}
|
|
11118
|
-
pos++;
|
|
11119
|
-
}
|
|
11120
|
-
return currFlags;
|
|
11121
|
-
}
|
|
11122
|
-
function scanAtomEscape() {
|
|
11123
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
11124
|
-
switch (text2.charCodeAt(pos)) {
|
|
11125
|
-
case 107 /* k */:
|
|
11126
|
-
pos++;
|
|
11127
|
-
if (text2.charCodeAt(pos) === 60 /* lessThan */) {
|
|
11128
|
-
pos++;
|
|
11129
|
-
scanGroupName(
|
|
11130
|
-
/*isReference*/
|
|
11131
|
-
true
|
|
11132
|
-
);
|
|
11133
|
-
scanExpectedChar(62 /* greaterThan */);
|
|
11134
|
-
} else if (unicodeMode) {
|
|
11135
|
-
error2(Diagnostics.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, pos - 2, 2);
|
|
11136
|
-
}
|
|
11137
|
-
break;
|
|
11138
|
-
case 113 /* q */:
|
|
11139
|
-
if (unicodeSetsMode) {
|
|
11140
|
-
pos++;
|
|
11141
|
-
error2(Diagnostics.q_is_only_available_inside_character_class, pos - 2, 2);
|
|
11142
|
-
break;
|
|
11143
|
-
}
|
|
11144
|
-
default:
|
|
11145
|
-
scanCharacterClassEscape() || scanDecimalEscape() || scanCharacterEscape();
|
|
11146
|
-
break;
|
|
11147
|
-
}
|
|
11148
|
-
}
|
|
11149
|
-
function scanDecimalEscape() {
|
|
11150
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
11151
|
-
const ch = text2.charCodeAt(pos);
|
|
11152
|
-
if (ch >= 49 /* _1 */ && ch <= 57 /* _9 */) {
|
|
11153
|
-
const start2 = pos;
|
|
11154
|
-
scanDigits();
|
|
11155
|
-
decimalEscapes.push({ pos: start2, end: pos, value: +tokenValue });
|
|
11156
|
-
return true;
|
|
11157
|
-
}
|
|
11158
|
-
return false;
|
|
11159
|
-
}
|
|
11160
|
-
function scanCharacterEscape() {
|
|
11161
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
11162
|
-
let ch = text2.charCodeAt(pos);
|
|
11163
|
-
switch (ch) {
|
|
11164
|
-
case 99 /* c */:
|
|
11165
|
-
pos++;
|
|
11166
|
-
ch = text2.charCodeAt(pos);
|
|
11167
|
-
if (isASCIILetter(ch)) {
|
|
11168
|
-
pos++;
|
|
11169
|
-
return String.fromCharCode(ch & 31);
|
|
11170
|
-
}
|
|
11171
|
-
if (unicodeMode) {
|
|
11172
|
-
error2(Diagnostics.c_must_be_followed_by_an_ASCII_letter, pos - 2, 2);
|
|
11173
|
-
}
|
|
11174
|
-
return String.fromCharCode(ch);
|
|
11175
|
-
case 94 /* caret */:
|
|
11176
|
-
case 36 /* $ */:
|
|
11177
|
-
case 47 /* slash */:
|
|
11178
|
-
case 92 /* backslash */:
|
|
11179
|
-
case 46 /* dot */:
|
|
11180
|
-
case 42 /* asterisk */:
|
|
11181
|
-
case 43 /* plus */:
|
|
11182
|
-
case 63 /* question */:
|
|
11183
|
-
case 40 /* openParen */:
|
|
11184
|
-
case 41 /* closeParen */:
|
|
11185
|
-
case 91 /* openBracket */:
|
|
11186
|
-
case 93 /* closeBracket */:
|
|
11187
|
-
case 123 /* openBrace */:
|
|
11188
|
-
case 125 /* closeBrace */:
|
|
11189
|
-
case 124 /* bar */:
|
|
11190
|
-
pos++;
|
|
11191
|
-
return String.fromCharCode(ch);
|
|
11192
|
-
default:
|
|
11193
|
-
if (pos >= end2) {
|
|
11194
|
-
error2(Diagnostics.Undetermined_character_escape, pos - 1, 1, ch);
|
|
11195
|
-
return "\\";
|
|
11196
|
-
}
|
|
11197
|
-
pos--;
|
|
11198
|
-
return scanEscapeSequence(
|
|
11199
|
-
/*shouldEmitInvalidEscapeError*/
|
|
11200
|
-
unicodeMode,
|
|
11201
|
-
/*isRegularExpression*/
|
|
11202
|
-
true
|
|
11203
|
-
);
|
|
11204
|
-
}
|
|
11205
|
-
}
|
|
11206
|
-
function scanGroupName(isReference) {
|
|
11207
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 60 /* lessThan */);
|
|
11208
|
-
tokenStart = pos;
|
|
11209
|
-
scanIdentifier(codePointAt(text2, pos), languageVersion);
|
|
11210
|
-
if (pos === tokenStart) {
|
|
11211
|
-
error2(Diagnostics.Expected_a_capturing_group_name);
|
|
11212
|
-
} else if (isReference) {
|
|
11213
|
-
groupNameReferences.push({ pos: tokenStart, end: pos, name: tokenValue });
|
|
11214
|
-
} else if (namedCapturingGroups.some((group2) => group2.has(tokenValue))) {
|
|
11215
|
-
error2(Diagnostics.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, tokenStart, pos - tokenStart);
|
|
11216
|
-
} else {
|
|
11217
|
-
last(namedCapturingGroups).add(tokenValue);
|
|
11218
|
-
groupSpecifiers.add(tokenValue);
|
|
11219
|
-
}
|
|
11220
|
-
}
|
|
11221
|
-
function isClassContentExit(ch) {
|
|
11222
|
-
return ch === 93 /* closeBracket */ || pos >= end2;
|
|
11223
|
-
}
|
|
11224
|
-
function scanClassRanges() {
|
|
11225
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
|
|
11226
|
-
if (text2.charCodeAt(pos) === 94 /* caret */) {
|
|
11227
|
-
pos++;
|
|
11228
|
-
}
|
|
11229
|
-
while (pos < end2) {
|
|
11230
|
-
const ch = text2.charCodeAt(pos);
|
|
11231
|
-
if (isClassContentExit(ch)) {
|
|
11232
|
-
return;
|
|
11233
|
-
}
|
|
11234
|
-
const minStart = pos;
|
|
11235
|
-
const minCharacter = scanClassAtom();
|
|
11236
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
11237
|
-
pos++;
|
|
11238
|
-
const ch2 = text2.charCodeAt(pos);
|
|
11239
|
-
if (isClassContentExit(ch2)) {
|
|
11240
|
-
return;
|
|
11241
|
-
}
|
|
11242
|
-
if (!minCharacter) {
|
|
11243
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, minStart, pos - 1 - minStart);
|
|
11244
|
-
}
|
|
11245
|
-
const maxStart = pos;
|
|
11246
|
-
const maxCharacter = scanClassAtom();
|
|
11247
|
-
if (!maxCharacter) {
|
|
11248
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, maxStart, pos - maxStart);
|
|
11249
|
-
continue;
|
|
11250
|
-
}
|
|
11251
|
-
if (!minCharacter) {
|
|
11252
|
-
continue;
|
|
11253
|
-
}
|
|
11254
|
-
const minCharacterValue = codePointAt(minCharacter, 0);
|
|
11255
|
-
const maxCharacterValue = codePointAt(maxCharacter, 0);
|
|
11256
|
-
if (minCharacter.length === charSize(minCharacterValue) && maxCharacter.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
|
|
11257
|
-
error2(Diagnostics.Range_out_of_order_in_character_class, minStart, pos - minStart);
|
|
11258
|
-
}
|
|
11259
|
-
}
|
|
11260
|
-
}
|
|
11261
|
-
}
|
|
11262
|
-
function scanClassSetExpression() {
|
|
11263
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
|
|
11264
|
-
let isCharacterComplement = false;
|
|
11265
|
-
if (text2.charCodeAt(pos) === 94 /* caret */) {
|
|
11266
|
-
pos++;
|
|
11267
|
-
isCharacterComplement = true;
|
|
11268
|
-
}
|
|
11269
|
-
let expressionMayContainStrings = false;
|
|
11270
|
-
let ch = text2.charCodeAt(pos);
|
|
11271
|
-
if (isClassContentExit(ch)) {
|
|
11272
|
-
return;
|
|
11273
|
-
}
|
|
11274
|
-
let start2 = pos;
|
|
11275
|
-
let oprand;
|
|
11276
|
-
switch (text2.slice(pos, pos + 2)) {
|
|
11277
|
-
case "--":
|
|
11278
|
-
case "&&":
|
|
11279
|
-
error2(Diagnostics.Expected_a_class_set_oprand);
|
|
11280
|
-
mayContainStrings = false;
|
|
11281
|
-
break;
|
|
11282
|
-
default:
|
|
11283
|
-
oprand = scanClassSetOprand();
|
|
11284
|
-
break;
|
|
11285
|
-
}
|
|
11286
|
-
switch (text2.charCodeAt(pos)) {
|
|
11287
|
-
case 45 /* minus */:
|
|
11288
|
-
if (text2.charCodeAt(pos + 1) === 45 /* minus */) {
|
|
11289
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
11290
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
|
|
11291
|
-
}
|
|
11292
|
-
expressionMayContainStrings = mayContainStrings;
|
|
11293
|
-
scanClassSetSubExpression(3 /* ClassSubtraction */);
|
|
11294
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
11295
|
-
return;
|
|
11296
|
-
}
|
|
11297
|
-
break;
|
|
11298
|
-
case 38 /* ampersand */:
|
|
11299
|
-
if (text2.charCodeAt(pos + 1) === 38 /* ampersand */) {
|
|
11300
|
-
scanClassSetSubExpression(2 /* ClassIntersection */);
|
|
11301
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
11302
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
|
|
11303
|
-
}
|
|
11304
|
-
expressionMayContainStrings = mayContainStrings;
|
|
11305
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
11306
|
-
return;
|
|
11307
|
-
} else {
|
|
11308
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
11309
|
-
}
|
|
11310
|
-
break;
|
|
11311
|
-
default:
|
|
11312
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
11313
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);
|
|
11314
|
-
}
|
|
11315
|
-
expressionMayContainStrings = mayContainStrings;
|
|
11316
|
-
break;
|
|
11317
|
-
}
|
|
11318
|
-
while (pos < end2) {
|
|
11319
|
-
ch = text2.charCodeAt(pos);
|
|
11320
|
-
switch (ch) {
|
|
11321
|
-
case 45 /* minus */:
|
|
11322
|
-
pos++;
|
|
11323
|
-
ch = text2.charCodeAt(pos);
|
|
11324
|
-
if (isClassContentExit(ch)) {
|
|
11325
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
11326
|
-
return;
|
|
11327
|
-
}
|
|
11328
|
-
if (ch === 45 /* minus */) {
|
|
11329
|
-
pos++;
|
|
11330
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
11331
|
-
start2 = pos - 2;
|
|
11332
|
-
oprand = text2.slice(start2, pos);
|
|
11333
|
-
continue;
|
|
11334
|
-
} else {
|
|
11335
|
-
if (!oprand) {
|
|
11336
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, start2, pos - 1 - start2);
|
|
11337
|
-
}
|
|
11338
|
-
const secondStart = pos;
|
|
11339
|
-
const secondOprand = scanClassSetOprand();
|
|
11340
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
11341
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, secondStart, pos - secondStart);
|
|
11342
|
-
}
|
|
11343
|
-
expressionMayContainStrings || (expressionMayContainStrings = mayContainStrings);
|
|
11344
|
-
if (!secondOprand) {
|
|
11345
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, secondStart, pos - secondStart);
|
|
11346
|
-
break;
|
|
11347
|
-
}
|
|
11348
|
-
if (!oprand) {
|
|
11349
|
-
break;
|
|
11350
|
-
}
|
|
11351
|
-
const minCharacterValue = codePointAt(oprand, 0);
|
|
11352
|
-
const maxCharacterValue = codePointAt(secondOprand, 0);
|
|
11353
|
-
if (oprand.length === charSize(minCharacterValue) && secondOprand.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
|
|
11354
|
-
error2(Diagnostics.Range_out_of_order_in_character_class, start2, pos - start2);
|
|
11355
|
-
}
|
|
11356
|
-
}
|
|
11357
|
-
break;
|
|
11358
|
-
case 38 /* ampersand */:
|
|
11359
|
-
start2 = pos;
|
|
11360
|
-
pos++;
|
|
11361
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
11362
|
-
pos++;
|
|
11363
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
11364
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
11365
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
11366
|
-
pos++;
|
|
11367
|
-
}
|
|
11368
|
-
} else {
|
|
11369
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
|
|
11370
|
-
}
|
|
11371
|
-
oprand = text2.slice(start2, pos);
|
|
11372
|
-
continue;
|
|
11373
|
-
}
|
|
11374
|
-
if (isClassContentExit(text2.charCodeAt(pos))) {
|
|
11375
|
-
break;
|
|
11376
|
-
}
|
|
11377
|
-
start2 = pos;
|
|
11378
|
-
switch (text2.slice(pos, pos + 2)) {
|
|
11379
|
-
case "--":
|
|
11380
|
-
case "&&":
|
|
11381
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos, 2);
|
|
11382
|
-
pos += 2;
|
|
11383
|
-
oprand = text2.slice(start2, pos);
|
|
11384
|
-
break;
|
|
11385
|
-
default:
|
|
11386
|
-
oprand = scanClassSetOprand();
|
|
11387
|
-
break;
|
|
11388
|
-
}
|
|
11389
|
-
}
|
|
11390
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
11391
|
-
}
|
|
11392
|
-
function scanClassSetSubExpression(expressionType) {
|
|
11393
|
-
let expressionMayContainStrings = mayContainStrings;
|
|
11394
|
-
while (pos < end2) {
|
|
11395
|
-
let ch = text2.charCodeAt(pos);
|
|
11396
|
-
if (isClassContentExit(ch)) {
|
|
11397
|
-
break;
|
|
11398
|
-
}
|
|
11399
|
-
switch (ch) {
|
|
11400
|
-
case 45 /* minus */:
|
|
11401
|
-
pos++;
|
|
11402
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
11403
|
-
pos++;
|
|
11404
|
-
if (expressionType !== 3 /* ClassSubtraction */) {
|
|
11405
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
11406
|
-
}
|
|
11407
|
-
} else {
|
|
11408
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 1, 1);
|
|
11409
|
-
}
|
|
11410
|
-
break;
|
|
11411
|
-
case 38 /* ampersand */:
|
|
11412
|
-
pos++;
|
|
11413
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
11414
|
-
pos++;
|
|
11415
|
-
if (expressionType !== 2 /* ClassIntersection */) {
|
|
11416
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
11417
|
-
}
|
|
11418
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
11419
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
11420
|
-
pos++;
|
|
11421
|
-
}
|
|
11422
|
-
} else {
|
|
11423
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
|
|
11424
|
-
}
|
|
11425
|
-
break;
|
|
11426
|
-
default:
|
|
11427
|
-
switch (expressionType) {
|
|
11428
|
-
case 3 /* ClassSubtraction */:
|
|
11429
|
-
error2(Diagnostics._0_expected, pos, 0, "--");
|
|
11430
|
-
break;
|
|
11431
|
-
case 2 /* ClassIntersection */:
|
|
11432
|
-
error2(Diagnostics._0_expected, pos, 0, "&&");
|
|
11433
|
-
break;
|
|
11434
|
-
default:
|
|
11435
|
-
break;
|
|
11436
|
-
}
|
|
11437
|
-
break;
|
|
11438
|
-
}
|
|
11439
|
-
ch = text2.charCodeAt(pos);
|
|
11440
|
-
if (isClassContentExit(ch)) {
|
|
11441
|
-
error2(Diagnostics.Expected_a_class_set_oprand);
|
|
11442
|
-
break;
|
|
11443
|
-
}
|
|
11444
|
-
scanClassSetOprand();
|
|
11445
|
-
expressionMayContainStrings && (expressionMayContainStrings = mayContainStrings);
|
|
11446
|
-
}
|
|
11447
|
-
mayContainStrings = expressionMayContainStrings;
|
|
11448
|
-
}
|
|
11449
|
-
function scanClassSetOprand() {
|
|
11450
|
-
mayContainStrings = false;
|
|
11451
|
-
switch (text2.charCodeAt(pos)) {
|
|
11452
|
-
case 91 /* openBracket */:
|
|
11453
|
-
pos++;
|
|
11454
|
-
scanClassSetExpression();
|
|
11455
|
-
scanExpectedChar(93 /* closeBracket */);
|
|
11456
|
-
return "";
|
|
11457
|
-
case 92 /* backslash */:
|
|
11458
|
-
pos++;
|
|
11459
|
-
if (scanCharacterClassEscape()) {
|
|
11460
|
-
return "";
|
|
11461
|
-
} else if (text2.charCodeAt(pos) === 113 /* q */) {
|
|
11462
|
-
pos++;
|
|
11463
|
-
if (text2.charCodeAt(pos) === 123 /* openBrace */) {
|
|
11464
|
-
pos++;
|
|
11465
|
-
scanClassStringDisjunctionContents();
|
|
11466
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
11467
|
-
return "";
|
|
11468
|
-
} else {
|
|
11469
|
-
error2(Diagnostics.q_must_be_followed_by_string_alternatives_enclosed_in_braces, pos - 2, 2);
|
|
11470
|
-
return "q";
|
|
11471
|
-
}
|
|
11472
|
-
}
|
|
11473
|
-
pos--;
|
|
11474
|
-
default:
|
|
11475
|
-
return scanClassSetCharacter();
|
|
11476
|
-
}
|
|
11477
|
-
}
|
|
11478
|
-
function scanClassStringDisjunctionContents() {
|
|
11479
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 123 /* openBrace */);
|
|
11480
|
-
let characterCount = 0;
|
|
11481
|
-
while (pos < end2) {
|
|
11482
|
-
const ch = text2.charCodeAt(pos);
|
|
11483
|
-
switch (ch) {
|
|
11484
|
-
case 125 /* closeBrace */:
|
|
11485
|
-
if (characterCount !== 1) {
|
|
11486
|
-
mayContainStrings = true;
|
|
11487
|
-
}
|
|
11488
|
-
return;
|
|
11489
|
-
case 124 /* bar */:
|
|
11490
|
-
if (characterCount !== 1) {
|
|
11491
|
-
mayContainStrings = true;
|
|
11492
|
-
}
|
|
11493
|
-
pos++;
|
|
11494
|
-
start = pos;
|
|
11495
|
-
characterCount = 0;
|
|
11496
|
-
break;
|
|
11497
|
-
default:
|
|
11498
|
-
scanClassSetCharacter();
|
|
11499
|
-
characterCount++;
|
|
11500
|
-
break;
|
|
11501
|
-
}
|
|
11502
|
-
}
|
|
11503
|
-
}
|
|
11504
|
-
function scanClassSetCharacter() {
|
|
11505
|
-
const ch = text2.charCodeAt(pos);
|
|
11506
|
-
if (ch === 92 /* backslash */) {
|
|
11507
|
-
pos++;
|
|
11508
|
-
const ch2 = text2.charCodeAt(pos);
|
|
11509
|
-
switch (ch2) {
|
|
11510
|
-
case 98 /* b */:
|
|
11511
|
-
pos++;
|
|
11512
|
-
return "\b";
|
|
11513
|
-
case 38 /* ampersand */:
|
|
11514
|
-
case 45 /* minus */:
|
|
11515
|
-
case 33 /* exclamation */:
|
|
11516
|
-
case 35 /* hash */:
|
|
11517
|
-
case 37 /* percent */:
|
|
11518
|
-
case 44 /* comma */:
|
|
11519
|
-
case 58 /* colon */:
|
|
11520
|
-
case 59 /* semicolon */:
|
|
11521
|
-
case 60 /* lessThan */:
|
|
11522
|
-
case 61 /* equals */:
|
|
11523
|
-
case 62 /* greaterThan */:
|
|
11524
|
-
case 64 /* at */:
|
|
11525
|
-
case 96 /* backtick */:
|
|
11526
|
-
case 126 /* tilde */:
|
|
11527
|
-
pos++;
|
|
11528
|
-
return String.fromCharCode(ch2);
|
|
11529
|
-
default:
|
|
11530
|
-
return scanCharacterEscape();
|
|
11531
|
-
}
|
|
11532
|
-
} else if (ch === text2.charCodeAt(pos + 1)) {
|
|
11533
|
-
switch (ch) {
|
|
11534
|
-
case 38 /* ampersand */:
|
|
11535
|
-
case 33 /* exclamation */:
|
|
11536
|
-
case 35 /* hash */:
|
|
11537
|
-
case 37 /* percent */:
|
|
11538
|
-
case 42 /* asterisk */:
|
|
11539
|
-
case 43 /* plus */:
|
|
11540
|
-
case 44 /* comma */:
|
|
11541
|
-
case 46 /* dot */:
|
|
11542
|
-
case 58 /* colon */:
|
|
11543
|
-
case 59 /* semicolon */:
|
|
11544
|
-
case 60 /* lessThan */:
|
|
11545
|
-
case 61 /* equals */:
|
|
11546
|
-
case 62 /* greaterThan */:
|
|
11547
|
-
case 63 /* question */:
|
|
11548
|
-
case 64 /* at */:
|
|
11549
|
-
case 96 /* backtick */:
|
|
11550
|
-
case 126 /* tilde */:
|
|
11551
|
-
error2(Diagnostics.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, pos, 2);
|
|
11552
|
-
pos += 2;
|
|
11553
|
-
return text2.substring(pos - 2, pos);
|
|
11554
|
-
}
|
|
11555
|
-
}
|
|
11556
|
-
switch (ch) {
|
|
11557
|
-
case 47 /* slash */:
|
|
11558
|
-
case 40 /* openParen */:
|
|
11559
|
-
case 41 /* closeParen */:
|
|
11560
|
-
case 91 /* openBracket */:
|
|
11561
|
-
case 93 /* closeBracket */:
|
|
11562
|
-
case 123 /* openBrace */:
|
|
11563
|
-
case 125 /* closeBrace */:
|
|
11564
|
-
case 45 /* minus */:
|
|
11565
|
-
case 124 /* bar */:
|
|
11566
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
11567
|
-
pos++;
|
|
11568
|
-
return String.fromCharCode(ch);
|
|
11569
|
-
}
|
|
11570
|
-
return scanSourceCharacter();
|
|
11571
|
-
}
|
|
11572
|
-
function scanClassAtom() {
|
|
11573
|
-
if (text2.charCodeAt(pos) === 92 /* backslash */) {
|
|
11574
|
-
pos++;
|
|
11575
|
-
const ch = text2.charCodeAt(pos);
|
|
11576
|
-
switch (ch) {
|
|
11577
|
-
case 98 /* b */:
|
|
11578
|
-
pos++;
|
|
11579
|
-
return "\b";
|
|
11580
|
-
case 45 /* minus */:
|
|
11581
|
-
pos++;
|
|
11582
|
-
return String.fromCharCode(ch);
|
|
11583
|
-
default:
|
|
11584
|
-
if (scanCharacterClassEscape()) {
|
|
11585
|
-
return "";
|
|
11586
|
-
}
|
|
11587
|
-
return scanCharacterEscape();
|
|
11588
|
-
}
|
|
11589
|
-
} else {
|
|
11590
|
-
return scanSourceCharacter();
|
|
11591
|
-
}
|
|
11592
|
-
}
|
|
11593
|
-
function scanCharacterClassEscape() {
|
|
11594
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
11595
|
-
let isCharacterComplement = false;
|
|
11596
|
-
const start2 = pos - 1;
|
|
11597
|
-
const ch = text2.charCodeAt(pos);
|
|
11598
|
-
switch (ch) {
|
|
11599
|
-
case 100 /* d */:
|
|
11600
|
-
case 68 /* D */:
|
|
11601
|
-
case 115 /* s */:
|
|
11602
|
-
case 83 /* S */:
|
|
11603
|
-
case 119 /* w */:
|
|
11604
|
-
case 87 /* W */:
|
|
11605
|
-
pos++;
|
|
11606
|
-
return true;
|
|
11607
|
-
case 80 /* P */:
|
|
11608
|
-
isCharacterComplement = true;
|
|
11609
|
-
case 112 /* p */:
|
|
11610
|
-
pos++;
|
|
11611
|
-
if (text2.charCodeAt(pos) === 123 /* openBrace */) {
|
|
11612
|
-
pos++;
|
|
11613
|
-
const propertyNameOrValueStart = pos;
|
|
11614
|
-
const propertyNameOrValue = scanWordCharacters();
|
|
11615
|
-
if (text2.charCodeAt(pos) === 61 /* equals */) {
|
|
11616
|
-
const propertyName = nonBinaryUnicodeProperties.get(propertyNameOrValue);
|
|
11617
|
-
if (pos === propertyNameOrValueStart) {
|
|
11618
|
-
error2(Diagnostics.Expected_a_Unicode_property_name);
|
|
11619
|
-
} else if (propertyName === void 0) {
|
|
11620
|
-
error2(Diagnostics.Unknown_Unicode_property_name, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
11621
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(), identity);
|
|
11622
|
-
if (suggestion) {
|
|
11623
|
-
error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
|
11624
|
-
}
|
|
11625
|
-
}
|
|
11626
|
-
pos++;
|
|
11627
|
-
const propertyValueStart = pos;
|
|
11628
|
-
const propertyValue = scanWordCharacters();
|
|
11629
|
-
if (pos === propertyValueStart) {
|
|
11630
|
-
error2(Diagnostics.Expected_a_Unicode_property_value);
|
|
11631
|
-
} else if (propertyName !== void 0 && !valuesOfNonBinaryUnicodeProperties[propertyName].has(propertyValue)) {
|
|
11632
|
-
error2(Diagnostics.Unknown_Unicode_property_value, propertyValueStart, pos - propertyValueStart);
|
|
11633
|
-
const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName], identity);
|
|
11634
|
-
if (suggestion) {
|
|
11635
|
-
error2(Diagnostics.Did_you_mean_0, propertyValueStart, pos - propertyValueStart, suggestion);
|
|
11636
|
-
}
|
|
11637
|
-
}
|
|
11638
|
-
} else {
|
|
11639
|
-
if (pos === propertyNameOrValueStart) {
|
|
11640
|
-
error2(Diagnostics.Expected_a_Unicode_property_name_or_value);
|
|
11641
|
-
} else if (binaryUnicodePropertiesOfStrings.has(propertyNameOrValue)) {
|
|
11642
|
-
if (!unicodeSetsMode) {
|
|
11643
|
-
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);
|
|
11644
|
-
} else if (isCharacterComplement) {
|
|
11645
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
11646
|
-
} else {
|
|
11647
|
-
mayContainStrings = true;
|
|
11648
|
-
}
|
|
11649
|
-
} else if (!valuesOfNonBinaryUnicodeProperties.General_Category.has(propertyNameOrValue) && !binaryUnicodeProperties.has(propertyNameOrValue)) {
|
|
11650
|
-
error2(Diagnostics.Unknown_Unicode_property_name_or_value, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
11651
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings], identity);
|
|
11652
|
-
if (suggestion) {
|
|
11653
|
-
error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
|
11654
|
-
}
|
|
11655
|
-
}
|
|
11656
|
-
}
|
|
11657
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
11658
|
-
if (!unicodeMode) {
|
|
11659
|
-
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);
|
|
11660
|
-
}
|
|
11661
|
-
} else if (unicodeMode) {
|
|
11662
|
-
error2(Diagnostics._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, pos - 2, 2, String.fromCharCode(ch));
|
|
11663
|
-
}
|
|
11664
|
-
return true;
|
|
11665
|
-
}
|
|
11666
|
-
return false;
|
|
11667
|
-
}
|
|
11668
|
-
function scanWordCharacters() {
|
|
11669
|
-
let value = "";
|
|
11670
|
-
while (pos < end2) {
|
|
11671
|
-
const ch = text2.charCodeAt(pos);
|
|
11672
|
-
if (!isWordCharacter(ch)) {
|
|
11673
|
-
break;
|
|
11674
|
-
}
|
|
11675
|
-
value += String.fromCharCode(ch);
|
|
11676
|
-
pos++;
|
|
11677
|
-
}
|
|
11678
|
-
return value;
|
|
11679
|
-
}
|
|
11680
|
-
function scanSourceCharacter() {
|
|
11681
|
-
const size = unicodeMode ? charSize(codePointAt(text2, pos)) : 1;
|
|
11682
|
-
pos += size;
|
|
11683
|
-
return text2.substring(pos - size, pos);
|
|
11684
|
-
}
|
|
11685
|
-
function scanExpectedChar(ch) {
|
|
11686
|
-
if (text2.charCodeAt(pos) === ch) {
|
|
11687
|
-
pos++;
|
|
11688
|
-
} else {
|
|
11689
|
-
error2(Diagnostics._0_expected, pos, 0, String.fromCharCode(ch));
|
|
11690
|
-
}
|
|
11691
|
-
}
|
|
11692
|
-
scanDisjunction(
|
|
11693
|
-
/*isInGroup*/
|
|
11694
|
-
false
|
|
11695
|
-
);
|
|
11696
|
-
forEach(groupNameReferences, (reference) => {
|
|
11697
|
-
if (!groupSpecifiers.has(reference.name)) {
|
|
11698
|
-
error2(Diagnostics.There_is_no_capturing_group_named_0_in_this_regular_expression, reference.pos, reference.end - reference.pos, reference.name);
|
|
11699
|
-
}
|
|
11700
|
-
});
|
|
11701
|
-
forEach(decimalEscapes, (escape) => {
|
|
11702
|
-
if (escape.value > numberOfCapturingGroups) {
|
|
11703
|
-
if (numberOfCapturingGroups) {
|
|
11704
|
-
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);
|
|
11705
|
-
} else {
|
|
11706
|
-
error2(Diagnostics.Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression, escape.pos, escape.end - escape.pos);
|
|
11707
|
-
}
|
|
11708
|
-
}
|
|
11709
|
-
});
|
|
11710
|
-
}
|
|
11711
10825
|
}
|
|
11712
10826
|
function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
|
|
11713
10827
|
const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
|
|
@@ -11930,6 +11044,8 @@ ${lanes.join("\n")}
|
|
|
11930
11044
|
pos--;
|
|
11931
11045
|
const extendedCookedChar = peekExtendedUnicodeEscape();
|
|
11932
11046
|
if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
|
|
11047
|
+
pos += 3;
|
|
11048
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
11933
11049
|
tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
11934
11050
|
return token = getIdentifierToken();
|
|
11935
11051
|
}
|
|
@@ -12069,7 +11185,7 @@ ${lanes.join("\n")}
|
|
|
12069
11185
|
function utf16EncodeAsString(codePoint) {
|
|
12070
11186
|
return utf16EncodeAsStringWorker(codePoint);
|
|
12071
11187
|
}
|
|
12072
|
-
var textToKeywordObj, textToKeyword, textToToken,
|
|
11188
|
+
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, jsDocSeeOrLink, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
|
|
12073
11189
|
var init_scanner = __esm({
|
|
12074
11190
|
"src/compiler/scanner.ts"() {
|
|
12075
11191
|
"use strict";
|
|
@@ -12224,26 +11340,6 @@ ${lanes.join("\n")}
|
|
|
12224
11340
|
"#": 63 /* HashToken */,
|
|
12225
11341
|
"`": 62 /* BacktickToken */
|
|
12226
11342
|
}));
|
|
12227
|
-
charToRegExpFlag = new Map(Object.entries({
|
|
12228
|
-
d: 1 /* HasIndices */,
|
|
12229
|
-
g: 2 /* Global */,
|
|
12230
|
-
i: 4 /* IgnoreCase */,
|
|
12231
|
-
m: 8 /* Multiline */,
|
|
12232
|
-
s: 16 /* DotAll */,
|
|
12233
|
-
u: 32 /* Unicode */,
|
|
12234
|
-
v: 64 /* UnicodeSets */,
|
|
12235
|
-
y: 128 /* Sticky */
|
|
12236
|
-
}));
|
|
12237
|
-
regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
|
|
12238
|
-
[1 /* HasIndices */, 9 /* ES2022 */],
|
|
12239
|
-
[2 /* Global */, 0 /* ES3 */],
|
|
12240
|
-
[4 /* IgnoreCase */, 0 /* ES3 */],
|
|
12241
|
-
[8 /* Multiline */, 0 /* ES3 */],
|
|
12242
|
-
[16 /* DotAll */, 5 /* ES2018 */],
|
|
12243
|
-
[32 /* Unicode */, 2 /* ES2015 */],
|
|
12244
|
-
[64 /* UnicodeSets */, 11 /* ES2024 */],
|
|
12245
|
-
[128 /* Sticky */, 2 /* ES2015 */]
|
|
12246
|
-
]);
|
|
12247
11343
|
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];
|
|
12248
11344
|
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];
|
|
12249
11345
|
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];
|
|
@@ -12254,26 +11350,9 @@ ${lanes.join("\n")}
|
|
|
12254
11350
|
commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
12255
11351
|
jsDocSeeOrLink = /@(?:see|link)/i;
|
|
12256
11352
|
tokenStrings = makeReverseMap(textToToken);
|
|
12257
|
-
regExpFlagChars = makeReverseMap(charToRegExpFlag);
|
|
12258
11353
|
mergeConflictMarkerLength = "<<<<<<<".length;
|
|
12259
11354
|
shebangTriviaRegex = /^#!.*/;
|
|
12260
11355
|
utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback;
|
|
12261
|
-
nonBinaryUnicodeProperties = new Map(Object.entries({
|
|
12262
|
-
General_Category: "General_Category",
|
|
12263
|
-
gc: "General_Category",
|
|
12264
|
-
Script: "Script",
|
|
12265
|
-
sc: "Script",
|
|
12266
|
-
Script_Extensions: "Script_Extensions",
|
|
12267
|
-
scx: "Script_Extensions"
|
|
12268
|
-
}));
|
|
12269
|
-
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"]);
|
|
12270
|
-
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"]);
|
|
12271
|
-
valuesOfNonBinaryUnicodeProperties = {
|
|
12272
|
-
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"]),
|
|
12273
|
-
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"]),
|
|
12274
|
-
Script_Extensions: /* @__PURE__ */ new Set()
|
|
12275
|
-
// Currently empty
|
|
12276
|
-
};
|
|
12277
11356
|
}
|
|
12278
11357
|
});
|
|
12279
11358
|
|
|
@@ -30421,10 +29500,7 @@ ${lanes.join("\n")}
|
|
|
30421
29500
|
function parseErrorAtPosition(start, length2, message, ...args) {
|
|
30422
29501
|
const lastError = lastOrUndefined(parseDiagnostics);
|
|
30423
29502
|
let result;
|
|
30424
|
-
if (
|
|
30425
|
-
result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args);
|
|
30426
|
-
addRelatedInfo(lastError, result);
|
|
30427
|
-
} else if (!lastError || start !== lastError.start) {
|
|
29503
|
+
if (!lastError || start !== lastError.start) {
|
|
30428
29504
|
result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args);
|
|
30429
29505
|
parseDiagnostics.push(result);
|
|
30430
29506
|
}
|
|
@@ -30580,7 +29656,7 @@ ${lanes.join("\n")}
|
|
|
30580
29656
|
parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64 /* EqualsToken */);
|
|
30581
29657
|
return;
|
|
30582
29658
|
}
|
|
30583
|
-
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions,
|
|
29659
|
+
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, (n) => n) ?? getSpaceSuggestion(expressionText);
|
|
30584
29660
|
if (suggestion) {
|
|
30585
29661
|
parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
|
|
30586
29662
|
return;
|
|
@@ -51094,7 +50170,7 @@ ${lanes.join("\n")}
|
|
|
51094
50170
|
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
|
|
51095
50171
|
}
|
|
51096
50172
|
function toNodeBuilderFlags(flags = 0 /* None */) {
|
|
51097
|
-
return flags &
|
|
50173
|
+
return flags & 848330095 /* NodeBuilderFlagsMask */;
|
|
51098
50174
|
}
|
|
51099
50175
|
function isClassInstanceSide(type) {
|
|
51100
50176
|
return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */));
|
|
@@ -51343,7 +50419,7 @@ ${lanes.join("\n")}
|
|
|
51343
50419
|
}
|
|
51344
50420
|
return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode));
|
|
51345
50421
|
}
|
|
51346
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */
|
|
50422
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */) {
|
|
51347
50423
|
const name2 = typeParameterToName(type, context);
|
|
51348
50424
|
context.approximateLength += idText(name2).length;
|
|
51349
50425
|
return factory.createTypeReferenceNode(
|
|
@@ -51554,6 +50630,21 @@ ${lanes.join("\n")}
|
|
|
51554
50630
|
const typeId = type2.id;
|
|
51555
50631
|
const symbol = type2.symbol;
|
|
51556
50632
|
if (symbol) {
|
|
50633
|
+
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
50634
|
+
if (isInstantiationExpressionType) {
|
|
50635
|
+
const instantiationExpressionType = type2;
|
|
50636
|
+
const existing = instantiationExpressionType.node;
|
|
50637
|
+
if (isTypeQueryNode(existing) && getTypeFromTypeNode(existing) === type2) {
|
|
50638
|
+
const typeNode = serializeExistingTypeNode(context, existing);
|
|
50639
|
+
if (typeNode) {
|
|
50640
|
+
return typeNode;
|
|
50641
|
+
}
|
|
50642
|
+
}
|
|
50643
|
+
if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) {
|
|
50644
|
+
return createElidedInformationPlaceholder(context);
|
|
50645
|
+
}
|
|
50646
|
+
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
50647
|
+
}
|
|
51557
50648
|
const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */;
|
|
51558
50649
|
if (isJSConstructor(symbol.valueDeclaration)) {
|
|
51559
50650
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -51565,7 +50656,7 @@ ${lanes.join("\n")}
|
|
|
51565
50656
|
false
|
|
51566
50657
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
51567
50658
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
51568
|
-
} else if ((
|
|
50659
|
+
} else if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
51569
50660
|
const typeAlias = getTypeAliasForTypeLiteral(type2);
|
|
51570
50661
|
if (typeAlias) {
|
|
51571
50662
|
return symbolToTypeNode(typeAlias, context, 788968 /* Type */);
|
|
@@ -51576,20 +50667,6 @@ ${lanes.join("\n")}
|
|
|
51576
50667
|
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
51577
50668
|
}
|
|
51578
50669
|
} else {
|
|
51579
|
-
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
51580
|
-
if (isInstantiationExpressionType) {
|
|
51581
|
-
const instantiationExpressionType = type2;
|
|
51582
|
-
if (isTypeQueryNode(instantiationExpressionType.node)) {
|
|
51583
|
-
const typeNode = serializeExistingTypeNode(context, instantiationExpressionType.node);
|
|
51584
|
-
if (typeNode) {
|
|
51585
|
-
return typeNode;
|
|
51586
|
-
}
|
|
51587
|
-
}
|
|
51588
|
-
if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
51589
|
-
return createElidedInformationPlaceholder(context);
|
|
51590
|
-
}
|
|
51591
|
-
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
51592
|
-
}
|
|
51593
50670
|
return createTypeNodeFromObjectType(type2);
|
|
51594
50671
|
}
|
|
51595
50672
|
function shouldWriteTypeOfFunctionSymbol() {
|
|
@@ -52143,36 +51220,65 @@ ${lanes.join("\n")}
|
|
|
52143
51220
|
true
|
|
52144
51221
|
)[0];
|
|
52145
51222
|
let cleanup;
|
|
52146
|
-
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) {
|
|
52147
|
-
|
|
52148
|
-
|
|
52149
|
-
|
|
52150
|
-
|
|
52151
|
-
|
|
52152
|
-
if (
|
|
52153
|
-
|
|
52154
|
-
|
|
52155
|
-
|
|
52156
|
-
|
|
52157
|
-
|
|
52158
|
-
|
|
51223
|
+
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && (some(expandedParams) || some(signature.typeParameters))) {
|
|
51224
|
+
let pushFakeScope2 = function(kind2, addAll) {
|
|
51225
|
+
Debug.assert(context.enclosingDeclaration);
|
|
51226
|
+
let existingFakeScope;
|
|
51227
|
+
if (getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration === kind2) {
|
|
51228
|
+
existingFakeScope = context.enclosingDeclaration;
|
|
51229
|
+
} else if (context.enclosingDeclaration.parent && getNodeLinks(context.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === kind2) {
|
|
51230
|
+
existingFakeScope = context.enclosingDeclaration.parent;
|
|
51231
|
+
}
|
|
51232
|
+
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
51233
|
+
const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();
|
|
51234
|
+
let newLocals;
|
|
51235
|
+
addAll((name, symbol) => {
|
|
51236
|
+
if (!locals.has(name)) {
|
|
51237
|
+
newLocals = append(newLocals, name);
|
|
51238
|
+
locals.set(name, symbol);
|
|
51239
|
+
}
|
|
51240
|
+
});
|
|
51241
|
+
if (!newLocals)
|
|
51242
|
+
return;
|
|
51243
|
+
const oldCleanup = cleanup;
|
|
51244
|
+
function undo() {
|
|
52159
51245
|
forEach(newLocals, (s) => locals.delete(s));
|
|
52160
|
-
|
|
52161
|
-
|
|
51246
|
+
oldCleanup == null ? void 0 : oldCleanup();
|
|
51247
|
+
}
|
|
52162
51248
|
if (existingFakeScope) {
|
|
52163
|
-
cleanup =
|
|
51249
|
+
cleanup = undo;
|
|
52164
51250
|
} else {
|
|
52165
51251
|
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
52166
|
-
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration =
|
|
51252
|
+
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = kind2;
|
|
52167
51253
|
fakeScope.locals = locals;
|
|
52168
51254
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
52169
51255
|
setParent(fakeScope, saveEnclosingDeclaration);
|
|
52170
51256
|
context.enclosingDeclaration = fakeScope;
|
|
52171
51257
|
cleanup = () => {
|
|
52172
51258
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
52173
|
-
|
|
51259
|
+
undo();
|
|
52174
51260
|
};
|
|
52175
51261
|
}
|
|
51262
|
+
};
|
|
51263
|
+
var pushFakeScope = pushFakeScope2;
|
|
51264
|
+
pushFakeScope2(
|
|
51265
|
+
"params",
|
|
51266
|
+
(add) => {
|
|
51267
|
+
for (const param of expandedParams) {
|
|
51268
|
+
add(param.escapedName, param);
|
|
51269
|
+
}
|
|
51270
|
+
}
|
|
51271
|
+
);
|
|
51272
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51273
|
+
pushFakeScope2(
|
|
51274
|
+
"typeParams",
|
|
51275
|
+
(add) => {
|
|
51276
|
+
for (const typeParam of signature.typeParameters ?? emptyArray) {
|
|
51277
|
+
const typeParamName = typeParameterToName(typeParam, context).escapedText;
|
|
51278
|
+
add(typeParamName, typeParam.symbol);
|
|
51279
|
+
}
|
|
51280
|
+
}
|
|
51281
|
+
);
|
|
52176
51282
|
}
|
|
52177
51283
|
}
|
|
52178
51284
|
const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports));
|
|
@@ -52717,7 +51823,7 @@ ${lanes.join("\n")}
|
|
|
52717
51823
|
return identifier;
|
|
52718
51824
|
}
|
|
52719
51825
|
}
|
|
52720
|
-
function
|
|
51826
|
+
function typeParameterShadowsOtherTypeParameterInScope(escapedName, context, type) {
|
|
52721
51827
|
const result = resolveName(
|
|
52722
51828
|
context.enclosingDeclaration,
|
|
52723
51829
|
escapedName,
|
|
@@ -52728,11 +51834,8 @@ ${lanes.join("\n")}
|
|
|
52728
51834
|
/*isUse*/
|
|
52729
51835
|
false
|
|
52730
51836
|
);
|
|
52731
|
-
if (result) {
|
|
52732
|
-
|
|
52733
|
-
return false;
|
|
52734
|
-
}
|
|
52735
|
-
return true;
|
|
51837
|
+
if (result && result.flags & 262144 /* TypeParameter */) {
|
|
51838
|
+
return result !== type.symbol;
|
|
52736
51839
|
}
|
|
52737
51840
|
return false;
|
|
52738
51841
|
}
|
|
@@ -52758,7 +51861,7 @@ ${lanes.join("\n")}
|
|
|
52758
51861
|
const rawtext = result.escapedText;
|
|
52759
51862
|
let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0;
|
|
52760
51863
|
let text = rawtext;
|
|
52761
|
-
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) ||
|
|
51864
|
+
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
52762
51865
|
i++;
|
|
52763
51866
|
text = `${rawtext}_${i}`;
|
|
52764
51867
|
}
|
|
@@ -52769,7 +51872,7 @@ ${lanes.join("\n")}
|
|
|
52769
51872
|
}
|
|
52770
51873
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
52771
51874
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
52772
|
-
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(
|
|
51875
|
+
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(text);
|
|
52773
51876
|
}
|
|
52774
51877
|
return result;
|
|
52775
51878
|
}
|
|
@@ -52914,7 +52017,10 @@ ${lanes.join("\n")}
|
|
|
52914
52017
|
return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
|
|
52915
52018
|
}
|
|
52916
52019
|
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {
|
|
52917
|
-
|
|
52020
|
+
while (getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration) {
|
|
52021
|
+
enclosingDeclaration = enclosingDeclaration.parent;
|
|
52022
|
+
}
|
|
52023
|
+
return enclosingDeclaration;
|
|
52918
52024
|
}
|
|
52919
52025
|
function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
|
|
52920
52026
|
if (!isErrorType(type) && enclosingDeclaration) {
|
|
@@ -52994,7 +52100,7 @@ ${lanes.join("\n")}
|
|
|
52994
52100
|
}
|
|
52995
52101
|
if (isIdentifier(node)) {
|
|
52996
52102
|
const type = getDeclaredTypeOfSymbol(sym);
|
|
52997
|
-
const name = sym.flags & 262144 /* TypeParameter */
|
|
52103
|
+
const name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(type, context) : factory.cloneNode(node);
|
|
52998
52104
|
name.symbol = sym;
|
|
52999
52105
|
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) };
|
|
53000
52106
|
}
|
|
@@ -57611,7 +56717,13 @@ ${lanes.join("\n")}
|
|
|
57611
56717
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
57612
56718
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
57613
56719
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
57614
|
-
|
|
56720
|
+
if (isTupleType(modifiersType)) {
|
|
56721
|
+
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
56722
|
+
} else if (isArrayType(modifiersType)) {
|
|
56723
|
+
addMemberForKeyType(numberType);
|
|
56724
|
+
} else {
|
|
56725
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
56726
|
+
}
|
|
57615
56727
|
} else {
|
|
57616
56728
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
57617
56729
|
}
|
|
@@ -59420,7 +58532,7 @@ ${lanes.join("\n")}
|
|
|
59420
58532
|
if (constraint) {
|
|
59421
58533
|
constraints = append(constraints, constraint);
|
|
59422
58534
|
}
|
|
59423
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) {
|
|
58535
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && (node === parent2.type || node === parent2.nameType)) {
|
|
59424
58536
|
const mappedType = getTypeFromTypeNode(parent2);
|
|
59425
58537
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
59426
58538
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -62468,6 +61580,7 @@ ${lanes.join("\n")}
|
|
|
62468
61580
|
) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType;
|
|
62469
61581
|
}
|
|
62470
61582
|
function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
61583
|
+
Debug.assert(type.symbol, "anonymous type must have symbol to be instantiated");
|
|
62471
61584
|
const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol);
|
|
62472
61585
|
if (type.objectFlags & 32 /* Mapped */) {
|
|
62473
61586
|
result.declaration = type.declaration;
|
|
@@ -65715,6 +64828,7 @@ ${lanes.join("\n")}
|
|
|
65715
64828
|
const sourceObjectFlags = getObjectFlags(source2);
|
|
65716
64829
|
const targetObjectFlags = getObjectFlags(target2);
|
|
65717
64830
|
if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {
|
|
64831
|
+
Debug.assertEqual(sourceSignatures.length, targetSignatures.length);
|
|
65718
64832
|
for (let i = 0; i < targetSignatures.length; i++) {
|
|
65719
64833
|
const related = signatureRelatedTo(
|
|
65720
64834
|
sourceSignatures[i],
|
|
@@ -69925,6 +69039,9 @@ ${lanes.join("\n")}
|
|
|
69925
69039
|
}
|
|
69926
69040
|
function getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived) {
|
|
69927
69041
|
if (!assumeTrue) {
|
|
69042
|
+
if (type === candidate) {
|
|
69043
|
+
return neverType;
|
|
69044
|
+
}
|
|
69928
69045
|
if (checkDerived) {
|
|
69929
69046
|
return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
|
|
69930
69047
|
}
|
|
@@ -69941,6 +69058,9 @@ ${lanes.join("\n")}
|
|
|
69941
69058
|
if (type.flags & 3 /* AnyOrUnknown */) {
|
|
69942
69059
|
return candidate;
|
|
69943
69060
|
}
|
|
69061
|
+
if (type === candidate) {
|
|
69062
|
+
return candidate;
|
|
69063
|
+
}
|
|
69944
69064
|
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
|
|
69945
69065
|
const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
|
|
69946
69066
|
const narrowedType = mapType(candidate, (c) => {
|
|
@@ -75966,14 +75086,7 @@ ${lanes.join("\n")}
|
|
|
75966
75086
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
75967
75087
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
75968
75088
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
75969
|
-
const result3 = createAnonymousType(
|
|
75970
|
-
/*symbol*/
|
|
75971
|
-
void 0,
|
|
75972
|
-
resolved.members,
|
|
75973
|
-
callSignatures,
|
|
75974
|
-
constructSignatures,
|
|
75975
|
-
resolved.indexInfos
|
|
75976
|
-
);
|
|
75089
|
+
const result3 = createAnonymousType(createSymbol(0 /* None */, "__instantiationExpression" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
75977
75090
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
75978
75091
|
result3.node = node;
|
|
75979
75092
|
return result3;
|
|
@@ -151199,7 +150312,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
151199
150312
|
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
|
|
151200
150313
|
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
|
|
151201
150314
|
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
|
|
151202
|
-
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code
|
|
150315
|
+
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,
|
|
150316
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,
|
|
150317
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,
|
|
150318
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,
|
|
150319
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,
|
|
150320
|
+
Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,
|
|
150321
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,
|
|
150322
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,
|
|
150323
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,
|
|
150324
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,
|
|
150325
|
+
Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code
|
|
151203
150326
|
];
|
|
151204
150327
|
registerCodeFix({
|
|
151205
150328
|
errorCodes: errorCodes18,
|
|
@@ -162199,7 +161322,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162199
161322
|
["script" /* scriptElement */]: 1,
|
|
162200
161323
|
["external module name" /* externalModuleName */]: 2
|
|
162201
161324
|
};
|
|
162202
|
-
tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\
|
|
161325
|
+
tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
|
|
162203
161326
|
nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
|
|
162204
161327
|
}
|
|
162205
161328
|
});
|
|
@@ -185021,7 +184144,6 @@ ${e.message}`;
|
|
|
185021
184144
|
ProcessLevel: () => ProcessLevel,
|
|
185022
184145
|
ProgramUpdateLevel: () => ProgramUpdateLevel,
|
|
185023
184146
|
QuotePreference: () => QuotePreference,
|
|
185024
|
-
RegularExpressionFlags: () => RegularExpressionFlags,
|
|
185025
184147
|
RelationComparisonResult: () => RelationComparisonResult,
|
|
185026
184148
|
Rename: () => ts_Rename_exports,
|
|
185027
184149
|
ScriptElementKind: () => ScriptElementKind,
|
|
@@ -185147,7 +184269,6 @@ ${e.message}`;
|
|
|
185147
184269
|
changeExtension: () => changeExtension,
|
|
185148
184270
|
changesAffectModuleResolution: () => changesAffectModuleResolution,
|
|
185149
184271
|
changesAffectingProgramStructure: () => changesAffectingProgramStructure,
|
|
185150
|
-
characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
|
|
185151
184272
|
childIsDecorated: () => childIsDecorated,
|
|
185152
184273
|
classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
|
|
185153
184274
|
classHasClassThisAssignment: () => classHasClassThisAssignment,
|
|
@@ -186913,7 +186034,6 @@ ${e.message}`;
|
|
|
186913
186034
|
reducePathComponents: () => reducePathComponents,
|
|
186914
186035
|
refactor: () => ts_refactor_exports,
|
|
186915
186036
|
regExpEscape: () => regExpEscape,
|
|
186916
|
-
regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
|
|
186917
186037
|
relativeComplement: () => relativeComplement,
|
|
186918
186038
|
removeAllComments: () => removeAllComments,
|
|
186919
186039
|
removeEmitHelper: () => removeEmitHelper,
|
|
@@ -187434,7 +186554,6 @@ ${e.message}`;
|
|
|
187434
186554
|
ProcessLevel: () => ProcessLevel,
|
|
187435
186555
|
ProgramUpdateLevel: () => ProgramUpdateLevel,
|
|
187436
186556
|
QuotePreference: () => QuotePreference,
|
|
187437
|
-
RegularExpressionFlags: () => RegularExpressionFlags,
|
|
187438
186557
|
RelationComparisonResult: () => RelationComparisonResult,
|
|
187439
186558
|
Rename: () => ts_Rename_exports,
|
|
187440
186559
|
ScriptElementKind: () => ScriptElementKind,
|
|
@@ -187560,7 +186679,6 @@ ${e.message}`;
|
|
|
187560
186679
|
changeExtension: () => changeExtension,
|
|
187561
186680
|
changesAffectModuleResolution: () => changesAffectModuleResolution,
|
|
187562
186681
|
changesAffectingProgramStructure: () => changesAffectingProgramStructure,
|
|
187563
|
-
characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
|
|
187564
186682
|
childIsDecorated: () => childIsDecorated,
|
|
187565
186683
|
classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
|
|
187566
186684
|
classHasClassThisAssignment: () => classHasClassThisAssignment,
|
|
@@ -189326,7 +188444,6 @@ ${e.message}`;
|
|
|
189326
188444
|
reducePathComponents: () => reducePathComponents,
|
|
189327
188445
|
refactor: () => ts_refactor_exports,
|
|
189328
188446
|
regExpEscape: () => regExpEscape,
|
|
189329
|
-
regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
|
|
189330
188447
|
relativeComplement: () => relativeComplement,
|
|
189331
188448
|
removeAllComments: () => removeAllComments,
|
|
189332
188449
|
removeEmitHelper: () => removeEmitHelper,
|