@artel/artc 0.6.25246 → 0.6.25248
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/build/Cli.js +3 -3
- package/build/api/Api.js +6 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +71 -62
- package/build/{chunk-BGCXIMTW.js → chunk-CBZMJHSW.js} +2 -2
- package/build/{chunk-RIWU6SF4.js → chunk-CWGZOWF7.js} +490 -505
- package/build/{chunk-CNAUD5P6.js → chunk-JKFASNU3.js} +1 -1
- package/build/types/analysis/Analyzer.d.ts +10 -0
- package/build/types/analysis/control-flow/NarrowableReference.d.ts +3 -3
- package/build/types/analysis/semantic-context/SemanticContext.d.ts +2 -1
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +3 -0
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +6 -7
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +1 -1
- package/build/types/analysis/semantic-context/TranslationTextTemplateSemanticContext.d.ts +13 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +9 -13
- package/build/types/entities/VariableEntity.d.ts +35 -3
- package/build/types/tree/NodeKind.d.ts +20 -21
- package/build/types/tree/green/Nodes.d.ts +12 -26
- package/build/types/tree/red/Nodes.d.ts +15 -29
- package/package.json +1 -1
@@ -620,7 +620,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
620
620
|
};
|
621
621
|
|
622
622
|
// source/common/Constants.ts
|
623
|
-
var ArtelVersion = true ? "0.6.
|
623
|
+
var ArtelVersion = true ? "0.6.25248" : "";
|
624
624
|
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
|
625
625
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
626
626
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
@@ -1186,11 +1186,10 @@ __export(green_exports, {
|
|
1186
1186
|
SwitchStatement: () => SwitchStatement2,
|
1187
1187
|
Tag: () => Tag2,
|
1188
1188
|
TagList: () => TagList2,
|
1189
|
-
TextLiteralTranslation: () => TextLiteralTranslation2,
|
1190
1189
|
TextTemplateLiteral: () => TextTemplateLiteral2,
|
1191
|
-
TextTemplateLiteralTranslation: () => TextTemplateLiteralTranslation2,
|
1192
1190
|
TextTemplateSpan: () => TextTemplateSpan2,
|
1193
1191
|
TextTemplateSpanList: () => TextTemplateSpanList2,
|
1192
|
+
TextTranslation: () => TextTranslation2,
|
1194
1193
|
Token: () => Token6,
|
1195
1194
|
TokenExpression: () => TokenExpression2,
|
1196
1195
|
TokenFlags: () => TokenFlags2,
|
@@ -1443,27 +1442,26 @@ var NodeKind = /* @__PURE__ */ ((NodeKind3) => {
|
|
1443
1442
|
NodeKind3[NodeKind3["FieldOrVariantTranslation"] = 137] = "FieldOrVariantTranslation";
|
1444
1443
|
NodeKind3[NodeKind3["TypeMemberTranslationList"] = 138] = "TypeMemberTranslationList";
|
1445
1444
|
NodeKind3[NodeKind3["TypeTranslation"] = 139] = "TypeTranslation";
|
1446
|
-
NodeKind3[NodeKind3["
|
1447
|
-
NodeKind3[NodeKind3["
|
1448
|
-
NodeKind3[NodeKind3["
|
1449
|
-
NodeKind3[NodeKind3["
|
1450
|
-
NodeKind3[NodeKind3["
|
1451
|
-
NodeKind3[NodeKind3["
|
1452
|
-
NodeKind3[NodeKind3["
|
1453
|
-
NodeKind3[NodeKind3["
|
1454
|
-
NodeKind3[NodeKind3["
|
1455
|
-
NodeKind3[NodeKind3["
|
1456
|
-
NodeKind3[NodeKind3["
|
1457
|
-
NodeKind3[NodeKind3["
|
1458
|
-
NodeKind3[NodeKind3["
|
1459
|
-
NodeKind3[NodeKind3["
|
1460
|
-
NodeKind3[NodeKind3["
|
1461
|
-
NodeKind3[NodeKind3["
|
1462
|
-
NodeKind3[NodeKind3["
|
1463
|
-
NodeKind3[NodeKind3["
|
1464
|
-
NodeKind3[NodeKind3["
|
1465
|
-
NodeKind3[NodeKind3["
|
1466
|
-
NodeKind3[NodeKind3["TypeAnnotation"] = 160] = "TypeAnnotation";
|
1445
|
+
NodeKind3[NodeKind3["TextTranslation"] = 140] = "TextTranslation";
|
1446
|
+
NodeKind3[NodeKind3["TranslationTextTemplate"] = 141] = "TranslationTextTemplate";
|
1447
|
+
NodeKind3[NodeKind3["TranslationTextTemplateSpanList"] = 142] = "TranslationTextTemplateSpanList";
|
1448
|
+
NodeKind3[NodeKind3["TranslationTextTemplateSpan"] = 143] = "TranslationTextTemplateSpan";
|
1449
|
+
NodeKind3[NodeKind3["TranslationTextTemplateParameterDeclaration"] = 144] = "TranslationTextTemplateParameterDeclaration";
|
1450
|
+
NodeKind3[NodeKind3["VariantDeclaration"] = 145] = "VariantDeclaration";
|
1451
|
+
NodeKind3[NodeKind3["TypeParameterDeclaration"] = 146] = "TypeParameterDeclaration";
|
1452
|
+
NodeKind3[NodeKind3["ParameterDeclaration"] = 147] = "ParameterDeclaration";
|
1453
|
+
NodeKind3[NodeKind3["Argument"] = 148] = "Argument";
|
1454
|
+
NodeKind3[NodeKind3["TagList"] = 149] = "TagList";
|
1455
|
+
NodeKind3[NodeKind3["Tag"] = 150] = "Tag";
|
1456
|
+
NodeKind3[NodeKind3["ModifierList"] = 151] = "ModifierList";
|
1457
|
+
NodeKind3[NodeKind3["Modifier"] = 152] = "Modifier";
|
1458
|
+
NodeKind3[NodeKind3["ParameterClause"] = 153] = "ParameterClause";
|
1459
|
+
NodeKind3[NodeKind3["ParameterList"] = 154] = "ParameterList";
|
1460
|
+
NodeKind3[NodeKind3["TypeArgumentClause"] = 155] = "TypeArgumentClause";
|
1461
|
+
NodeKind3[NodeKind3["TypeArgumentList"] = 156] = "TypeArgumentList";
|
1462
|
+
NodeKind3[NodeKind3["TypeParameterClause"] = 157] = "TypeParameterClause";
|
1463
|
+
NodeKind3[NodeKind3["TypeParameterList"] = 158] = "TypeParameterList";
|
1464
|
+
NodeKind3[NodeKind3["TypeAnnotation"] = 159] = "TypeAnnotation";
|
1467
1465
|
return NodeKind3;
|
1468
1466
|
})(NodeKind || {});
|
1469
1467
|
|
@@ -1848,11 +1846,10 @@ __export(tree_exports, {
|
|
1848
1846
|
SwitchStatement: () => SwitchStatement,
|
1849
1847
|
Tag: () => Tag,
|
1850
1848
|
TagList: () => TagList,
|
1851
|
-
TextLiteralTranslation: () => TextLiteralTranslation,
|
1852
1849
|
TextTemplateLiteral: () => TextTemplateLiteral,
|
1853
|
-
TextTemplateLiteralTranslation: () => TextTemplateLiteralTranslation,
|
1854
1850
|
TextTemplateSpan: () => TextTemplateSpan,
|
1855
1851
|
TextTemplateSpanList: () => TextTemplateSpanList,
|
1852
|
+
TextTranslation: () => TextTranslation,
|
1856
1853
|
Token: () => Token4,
|
1857
1854
|
TokenExpression: () => TokenExpression,
|
1858
1855
|
TokenFlags: () => TokenFlags2,
|
@@ -3654,14 +3651,14 @@ function isLowercaseChar(char) {
|
|
3654
3651
|
}
|
3655
3652
|
|
3656
3653
|
// source/common/Name.ts
|
3657
|
-
var NameFlags = /* @__PURE__ */ ((
|
3658
|
-
|
3659
|
-
|
3660
|
-
|
3661
|
-
|
3662
|
-
|
3663
|
-
|
3664
|
-
return
|
3654
|
+
var NameFlags = /* @__PURE__ */ ((NameFlags3) => {
|
3655
|
+
NameFlags3[NameFlags3["None"] = 0] = "None";
|
3656
|
+
NameFlags3[NameFlags3["QuotedName"] = 2] = "QuotedName";
|
3657
|
+
NameFlags3[NameFlags3["RequiresQuotes"] = 4] = "RequiresQuotes";
|
3658
|
+
NameFlags3[NameFlags3["ConflictResolvingParameterName"] = 8] = "ConflictResolvingParameterName";
|
3659
|
+
NameFlags3[NameFlags3["BackingVariableName"] = 16] = "BackingVariableName";
|
3660
|
+
NameFlags3[NameFlags3["PreferKebabCase"] = 32] = "PreferKebabCase";
|
3661
|
+
return NameFlags3;
|
3665
3662
|
})(NameFlags || {});
|
3666
3663
|
var Name = class _Name {
|
3667
3664
|
/**
|
@@ -4022,9 +4019,9 @@ var TreeQuery = class {
|
|
4022
4019
|
return analyzer.entity.ofEnumerationVariableDeclaration(parent);
|
4023
4020
|
case 99 /* ErrorVariableDeclaration */:
|
4024
4021
|
return analyzer.entity.ofErrorVariableDeclaration(parent);
|
4025
|
-
case
|
4022
|
+
case 147 /* ParameterDeclaration */:
|
4026
4023
|
return analyzer.entity.ofParameterDeclaration(parent);
|
4027
|
-
case
|
4024
|
+
case 146 /* TypeParameterDeclaration */:
|
4028
4025
|
return analyzer.entity.ofTypeParameterDeclaration(parent);
|
4029
4026
|
case 31 /* PackageStructuredTypeDeclaration */:
|
4030
4027
|
return analyzer.entity.ofPackageStructuredTypeDeclaration(parent);
|
@@ -4050,7 +4047,7 @@ var TreeQuery = class {
|
|
4050
4047
|
return analyzer.entity.ofConstructorDeclaration(parent);
|
4051
4048
|
case 44 /* DestructorDeclaration */:
|
4052
4049
|
return analyzer.entity.ofDestructorDeclaration(parent);
|
4053
|
-
case
|
4050
|
+
case 145 /* VariantDeclaration */:
|
4054
4051
|
return analyzer.entity.ofVariantDeclaration(parent);
|
4055
4052
|
case 38 /* TypeExtensionDeclaration */:
|
4056
4053
|
return analyzer.entity.ofTypeExtensionDeclaration(parent);
|
@@ -4074,6 +4071,8 @@ var TreeQuery = class {
|
|
4074
4071
|
return analyzer.entity.ofDereferencedVariableSetterDeclaration(parent);
|
4075
4072
|
case 51 /* OperatorDeclaration */:
|
4076
4073
|
return analyzer.entity.ofOperatorDeclaration(parent);
|
4074
|
+
case 144 /* TranslationTextTemplateParameterDeclaration */:
|
4075
|
+
return analyzer.entity.ofTranslationTextTemplateParameterDeclaration(parent);
|
4077
4076
|
default:
|
4078
4077
|
Debug.typeIsAssignableTo();
|
4079
4078
|
Debug.typeIsAssignableTo();
|
@@ -8469,38 +8468,10 @@ var TypeTranslation = class extends BaseNode {
|
|
8469
8468
|
];
|
8470
8469
|
}
|
8471
8470
|
};
|
8472
|
-
var
|
8471
|
+
var TextTranslation = class extends BaseNode {
|
8473
8472
|
constructor(green, rangeStart, parent) {
|
8474
8473
|
super(green, rangeStart, parent);
|
8475
|
-
this.kind = 140 /*
|
8476
|
-
}
|
8477
|
-
get children() {
|
8478
|
-
return this._children ??= this.createChildren();
|
8479
|
-
}
|
8480
|
-
get sourceText() {
|
8481
|
-
return this.children[0];
|
8482
|
-
}
|
8483
|
-
get minusGreaterThanToken() {
|
8484
|
-
return this.children[1];
|
8485
|
-
}
|
8486
|
-
get translatedText() {
|
8487
|
-
return this.children[2];
|
8488
|
-
}
|
8489
|
-
get thisAsNode() {
|
8490
|
-
return this;
|
8491
|
-
}
|
8492
|
-
createChildren() {
|
8493
|
-
return [
|
8494
|
-
this.green.sourceText.toRed(childRangeStart(this, 0), this),
|
8495
|
-
this.green.minusGreaterThanToken.toRed(childRangeStart(this, 1), this),
|
8496
|
-
this.green.translatedText.toRed(childRangeStart(this, 2), this)
|
8497
|
-
];
|
8498
|
-
}
|
8499
|
-
};
|
8500
|
-
var TextTemplateLiteralTranslation = class extends BaseNode {
|
8501
|
-
constructor(green, rangeStart, parent) {
|
8502
|
-
super(green, rangeStart, parent);
|
8503
|
-
this.kind = 141 /* TextTemplateLiteralTranslation */;
|
8474
|
+
this.kind = 140 /* TextTranslation */;
|
8504
8475
|
}
|
8505
8476
|
get children() {
|
8506
8477
|
return this._children ??= this.createChildren();
|
@@ -8528,7 +8499,7 @@ var TextTemplateLiteralTranslation = class extends BaseNode {
|
|
8528
8499
|
var TranslationTextTemplate = class extends BaseNode {
|
8529
8500
|
constructor(green, rangeStart, parent) {
|
8530
8501
|
super(green, rangeStart, parent);
|
8531
|
-
this.kind =
|
8502
|
+
this.kind = 141 /* TranslationTextTemplate */;
|
8532
8503
|
}
|
8533
8504
|
get children() {
|
8534
8505
|
return this._children ??= this.createChildren();
|
@@ -8552,7 +8523,7 @@ var TranslationTextTemplate = class extends BaseNode {
|
|
8552
8523
|
var TranslationTextTemplateSpanList = class extends BaseNode {
|
8553
8524
|
constructor(green, rangeStart, parent) {
|
8554
8525
|
super(green, rangeStart, parent);
|
8555
|
-
this.kind =
|
8526
|
+
this.kind = 142 /* TranslationTextTemplateSpanList */;
|
8556
8527
|
}
|
8557
8528
|
get children() {
|
8558
8529
|
return this._children ??= this.createChildren();
|
@@ -8570,7 +8541,7 @@ var TranslationTextTemplateSpanList = class extends BaseNode {
|
|
8570
8541
|
var TranslationTextTemplateSpan = class extends BaseNode {
|
8571
8542
|
constructor(green, rangeStart, parent) {
|
8572
8543
|
super(green, rangeStart, parent);
|
8573
|
-
this.kind =
|
8544
|
+
this.kind = 143 /* TranslationTextTemplateSpan */;
|
8574
8545
|
}
|
8575
8546
|
get children() {
|
8576
8547
|
return this._children ??= this.createChildren();
|
@@ -8594,7 +8565,7 @@ var TranslationTextTemplateSpan = class extends BaseNode {
|
|
8594
8565
|
var TranslationTextTemplateParameterDeclaration = class extends BaseNode {
|
8595
8566
|
constructor(green, rangeStart, parent) {
|
8596
8567
|
super(green, rangeStart, parent);
|
8597
|
-
this.kind =
|
8568
|
+
this.kind = 144 /* TranslationTextTemplateParameterDeclaration */;
|
8598
8569
|
}
|
8599
8570
|
get children() {
|
8600
8571
|
return this._children ??= this.createChildren();
|
@@ -8618,7 +8589,7 @@ var TranslationTextTemplateParameterDeclaration = class extends BaseNode {
|
|
8618
8589
|
var VariantDeclaration = class extends BaseNode {
|
8619
8590
|
constructor(green, rangeStart, parent) {
|
8620
8591
|
super(green, rangeStart, parent);
|
8621
|
-
this.kind =
|
8592
|
+
this.kind = 145 /* VariantDeclaration */;
|
8622
8593
|
}
|
8623
8594
|
get children() {
|
8624
8595
|
return this._children ??= this.createChildren();
|
@@ -8654,7 +8625,7 @@ var VariantDeclaration = class extends BaseNode {
|
|
8654
8625
|
var TypeParameterDeclaration = class extends BaseNode {
|
8655
8626
|
constructor(green, rangeStart, parent) {
|
8656
8627
|
super(green, rangeStart, parent);
|
8657
|
-
this.kind =
|
8628
|
+
this.kind = 146 /* TypeParameterDeclaration */;
|
8658
8629
|
}
|
8659
8630
|
get children() {
|
8660
8631
|
return this._children ??= this.createChildren();
|
@@ -8690,7 +8661,7 @@ var TypeParameterDeclaration = class extends BaseNode {
|
|
8690
8661
|
var ParameterDeclaration = class extends BaseNode {
|
8691
8662
|
constructor(green, rangeStart, parent) {
|
8692
8663
|
super(green, rangeStart, parent);
|
8693
|
-
this.kind =
|
8664
|
+
this.kind = 147 /* ParameterDeclaration */;
|
8694
8665
|
}
|
8695
8666
|
get children() {
|
8696
8667
|
return this._children ??= this.createChildren();
|
@@ -8726,7 +8697,7 @@ var ParameterDeclaration = class extends BaseNode {
|
|
8726
8697
|
var Argument = class extends BaseNode {
|
8727
8698
|
constructor(green, rangeStart, parent) {
|
8728
8699
|
super(green, rangeStart, parent);
|
8729
|
-
this.kind =
|
8700
|
+
this.kind = 148 /* Argument */;
|
8730
8701
|
}
|
8731
8702
|
get children() {
|
8732
8703
|
return this._children ??= this.createChildren();
|
@@ -8754,7 +8725,7 @@ var Argument = class extends BaseNode {
|
|
8754
8725
|
var TagList = class extends BaseNode {
|
8755
8726
|
constructor(green, rangeStart, parent) {
|
8756
8727
|
super(green, rangeStart, parent);
|
8757
|
-
this.kind =
|
8728
|
+
this.kind = 149 /* TagList */;
|
8758
8729
|
}
|
8759
8730
|
get children() {
|
8760
8731
|
return this._children ??= this.createChildren();
|
@@ -8772,7 +8743,7 @@ var TagList = class extends BaseNode {
|
|
8772
8743
|
var Tag = class extends BaseNode {
|
8773
8744
|
constructor(green, rangeStart, parent) {
|
8774
8745
|
super(green, rangeStart, parent);
|
8775
|
-
this.kind =
|
8746
|
+
this.kind = 150 /* Tag */;
|
8776
8747
|
}
|
8777
8748
|
get children() {
|
8778
8749
|
return this._children ??= this.createChildren();
|
@@ -8812,7 +8783,7 @@ var Tag = class extends BaseNode {
|
|
8812
8783
|
var ModifierList = class extends BaseNode {
|
8813
8784
|
constructor(green, rangeStart, parent) {
|
8814
8785
|
super(green, rangeStart, parent);
|
8815
|
-
this.kind =
|
8786
|
+
this.kind = 151 /* ModifierList */;
|
8816
8787
|
}
|
8817
8788
|
get children() {
|
8818
8789
|
return this._children ??= this.createChildren();
|
@@ -8830,7 +8801,7 @@ var ModifierList = class extends BaseNode {
|
|
8830
8801
|
var Modifier = class extends BaseNode {
|
8831
8802
|
constructor(green, rangeStart, parent) {
|
8832
8803
|
super(green, rangeStart, parent);
|
8833
|
-
this.kind =
|
8804
|
+
this.kind = 152 /* Modifier */;
|
8834
8805
|
}
|
8835
8806
|
get children() {
|
8836
8807
|
return this._children ??= this.createChildren();
|
@@ -8862,7 +8833,7 @@ var Modifier = class extends BaseNode {
|
|
8862
8833
|
var ParameterClause = class extends BaseNode {
|
8863
8834
|
constructor(green, rangeStart, parent) {
|
8864
8835
|
super(green, rangeStart, parent);
|
8865
|
-
this.kind =
|
8836
|
+
this.kind = 153 /* ParameterClause */;
|
8866
8837
|
}
|
8867
8838
|
get children() {
|
8868
8839
|
return this._children ??= this.createChildren();
|
@@ -8890,7 +8861,7 @@ var ParameterClause = class extends BaseNode {
|
|
8890
8861
|
var ParameterList = class extends BaseNode {
|
8891
8862
|
constructor(green, rangeStart, parent) {
|
8892
8863
|
super(green, rangeStart, parent);
|
8893
|
-
this.kind =
|
8864
|
+
this.kind = 154 /* ParameterList */;
|
8894
8865
|
}
|
8895
8866
|
get children() {
|
8896
8867
|
return this._children ??= this.createChildren();
|
@@ -8911,7 +8882,7 @@ var ParameterList = class extends BaseNode {
|
|
8911
8882
|
var TypeArgumentClause = class extends BaseNode {
|
8912
8883
|
constructor(green, rangeStart, parent) {
|
8913
8884
|
super(green, rangeStart, parent);
|
8914
|
-
this.kind =
|
8885
|
+
this.kind = 155 /* TypeArgumentClause */;
|
8915
8886
|
}
|
8916
8887
|
get children() {
|
8917
8888
|
return this._children ??= this.createChildren();
|
@@ -8939,7 +8910,7 @@ var TypeArgumentClause = class extends BaseNode {
|
|
8939
8910
|
var TypeArgumentList = class extends BaseNode {
|
8940
8911
|
constructor(green, rangeStart, parent) {
|
8941
8912
|
super(green, rangeStart, parent);
|
8942
|
-
this.kind =
|
8913
|
+
this.kind = 156 /* TypeArgumentList */;
|
8943
8914
|
}
|
8944
8915
|
get children() {
|
8945
8916
|
return this._children ??= this.createChildren();
|
@@ -8960,7 +8931,7 @@ var TypeArgumentList = class extends BaseNode {
|
|
8960
8931
|
var TypeParameterClause = class extends BaseNode {
|
8961
8932
|
constructor(green, rangeStart, parent) {
|
8962
8933
|
super(green, rangeStart, parent);
|
8963
|
-
this.kind =
|
8934
|
+
this.kind = 157 /* TypeParameterClause */;
|
8964
8935
|
}
|
8965
8936
|
get children() {
|
8966
8937
|
return this._children ??= this.createChildren();
|
@@ -8988,7 +8959,7 @@ var TypeParameterClause = class extends BaseNode {
|
|
8988
8959
|
var TypeParameterList = class extends BaseNode {
|
8989
8960
|
constructor(green, rangeStart, parent) {
|
8990
8961
|
super(green, rangeStart, parent);
|
8991
|
-
this.kind =
|
8962
|
+
this.kind = 158 /* TypeParameterList */;
|
8992
8963
|
}
|
8993
8964
|
get children() {
|
8994
8965
|
return this._children ??= this.createChildren();
|
@@ -9009,7 +8980,7 @@ var TypeParameterList = class extends BaseNode {
|
|
9009
8980
|
var TypeAnnotation = class extends BaseNode {
|
9010
8981
|
constructor(green, rangeStart, parent) {
|
9011
8982
|
super(green, rangeStart, parent);
|
9012
|
-
this.kind =
|
8983
|
+
this.kind = 159 /* TypeAnnotation */;
|
9013
8984
|
}
|
9014
8985
|
get children() {
|
9015
8986
|
return this._children ??= this.createChildren();
|
@@ -12229,32 +12200,10 @@ var TypeTranslation2 = class extends BaseNode2 {
|
|
12229
12200
|
return new TypeTranslation(this, rangeStart, parent);
|
12230
12201
|
}
|
12231
12202
|
};
|
12232
|
-
var
|
12233
|
-
constructor(sourceText, minusGreaterThanToken, translatedText) {
|
12234
|
-
super();
|
12235
|
-
this.kind = 140 /* TextLiteralTranslation */;
|
12236
|
-
this.children = [sourceText, minusGreaterThanToken, translatedText];
|
12237
|
-
}
|
12238
|
-
get sourceText() {
|
12239
|
-
return this.children[0];
|
12240
|
-
}
|
12241
|
-
get minusGreaterThanToken() {
|
12242
|
-
return this.children[1];
|
12243
|
-
}
|
12244
|
-
get translatedText() {
|
12245
|
-
return this.children[2];
|
12246
|
-
}
|
12247
|
-
get thisAsNode() {
|
12248
|
-
return this;
|
12249
|
-
}
|
12250
|
-
toRed(rangeStart, parent) {
|
12251
|
-
return new TextLiteralTranslation(this, rangeStart, parent);
|
12252
|
-
}
|
12253
|
-
};
|
12254
|
-
var TextTemplateLiteralTranslation2 = class extends BaseNode2 {
|
12203
|
+
var TextTranslation2 = class extends BaseNode2 {
|
12255
12204
|
constructor(sourceText, minusGreaterThanToken, translatedTextOrTranslationFunction) {
|
12256
12205
|
super();
|
12257
|
-
this.kind =
|
12206
|
+
this.kind = 140 /* TextTranslation */;
|
12258
12207
|
this.children = [sourceText, minusGreaterThanToken, translatedTextOrTranslationFunction];
|
12259
12208
|
}
|
12260
12209
|
get sourceText() {
|
@@ -12270,13 +12219,13 @@ var TextTemplateLiteralTranslation2 = class extends BaseNode2 {
|
|
12270
12219
|
return this;
|
12271
12220
|
}
|
12272
12221
|
toRed(rangeStart, parent) {
|
12273
|
-
return new
|
12222
|
+
return new TextTranslation(this, rangeStart, parent);
|
12274
12223
|
}
|
12275
12224
|
};
|
12276
12225
|
var TranslationTextTemplate2 = class extends BaseNode2 {
|
12277
12226
|
constructor(head, spanList) {
|
12278
12227
|
super();
|
12279
|
-
this.kind =
|
12228
|
+
this.kind = 141 /* TranslationTextTemplate */;
|
12280
12229
|
this.children = [head, spanList];
|
12281
12230
|
}
|
12282
12231
|
get head() {
|
@@ -12295,7 +12244,7 @@ var TranslationTextTemplate2 = class extends BaseNode2 {
|
|
12295
12244
|
var TranslationTextTemplateSpanList2 = class extends BaseNode2 {
|
12296
12245
|
constructor(spans) {
|
12297
12246
|
super();
|
12298
|
-
this.kind =
|
12247
|
+
this.kind = 142 /* TranslationTextTemplateSpanList */;
|
12299
12248
|
this.children = spans;
|
12300
12249
|
}
|
12301
12250
|
get spans() {
|
@@ -12311,7 +12260,7 @@ var TranslationTextTemplateSpanList2 = class extends BaseNode2 {
|
|
12311
12260
|
var TranslationTextTemplateSpan2 = class extends BaseNode2 {
|
12312
12261
|
constructor(parameter, text) {
|
12313
12262
|
super();
|
12314
|
-
this.kind =
|
12263
|
+
this.kind = 143 /* TranslationTextTemplateSpan */;
|
12315
12264
|
this.children = [parameter, text];
|
12316
12265
|
}
|
12317
12266
|
get parameter() {
|
@@ -12330,7 +12279,7 @@ var TranslationTextTemplateSpan2 = class extends BaseNode2 {
|
|
12330
12279
|
var TranslationTextTemplateParameterDeclaration2 = class extends BaseNode2 {
|
12331
12280
|
constructor(name, typeAnnotation) {
|
12332
12281
|
super();
|
12333
|
-
this.kind =
|
12282
|
+
this.kind = 144 /* TranslationTextTemplateParameterDeclaration */;
|
12334
12283
|
this.children = [name, typeAnnotation];
|
12335
12284
|
}
|
12336
12285
|
get name() {
|
@@ -12349,7 +12298,7 @@ var TranslationTextTemplateParameterDeclaration2 = class extends BaseNode2 {
|
|
12349
12298
|
var VariantDeclaration2 = class extends BaseNode2 {
|
12350
12299
|
constructor(tagList, modifierList, name, equalsToken, value) {
|
12351
12300
|
super();
|
12352
|
-
this.kind =
|
12301
|
+
this.kind = 145 /* VariantDeclaration */;
|
12353
12302
|
this.children = [tagList, modifierList, name, equalsToken, value];
|
12354
12303
|
}
|
12355
12304
|
get tagList() {
|
@@ -12377,7 +12326,7 @@ var VariantDeclaration2 = class extends BaseNode2 {
|
|
12377
12326
|
var TypeParameterDeclaration2 = class extends BaseNode2 {
|
12378
12327
|
constructor(name, colonToken, constraint, equalsToken, defaultType) {
|
12379
12328
|
super();
|
12380
|
-
this.kind =
|
12329
|
+
this.kind = 146 /* TypeParameterDeclaration */;
|
12381
12330
|
this.children = [name, colonToken, constraint, equalsToken, defaultType];
|
12382
12331
|
}
|
12383
12332
|
get name() {
|
@@ -12405,7 +12354,7 @@ var TypeParameterDeclaration2 = class extends BaseNode2 {
|
|
12405
12354
|
var ParameterDeclaration2 = class extends BaseNode2 {
|
12406
12355
|
constructor(tagList, name, typeAnnotation, equalsToken, defaultValue) {
|
12407
12356
|
super();
|
12408
|
-
this.kind =
|
12357
|
+
this.kind = 147 /* ParameterDeclaration */;
|
12409
12358
|
this.children = [tagList, name, typeAnnotation, equalsToken, defaultValue];
|
12410
12359
|
}
|
12411
12360
|
get tagList() {
|
@@ -12433,7 +12382,7 @@ var ParameterDeclaration2 = class extends BaseNode2 {
|
|
12433
12382
|
var Argument2 = class extends BaseNode2 {
|
12434
12383
|
constructor(name, equalsToken, value) {
|
12435
12384
|
super();
|
12436
|
-
this.kind =
|
12385
|
+
this.kind = 148 /* Argument */;
|
12437
12386
|
this.children = [name, equalsToken, value];
|
12438
12387
|
}
|
12439
12388
|
get name() {
|
@@ -12455,7 +12404,7 @@ var Argument2 = class extends BaseNode2 {
|
|
12455
12404
|
var TagList2 = class extends BaseNode2 {
|
12456
12405
|
constructor(tags) {
|
12457
12406
|
super();
|
12458
|
-
this.kind =
|
12407
|
+
this.kind = 149 /* TagList */;
|
12459
12408
|
this.children = tags;
|
12460
12409
|
}
|
12461
12410
|
get tags() {
|
@@ -12471,7 +12420,7 @@ var TagList2 = class extends BaseNode2 {
|
|
12471
12420
|
var Tag2 = class extends BaseNode2 {
|
12472
12421
|
constructor(hashSignToken, name, typeArgumentClause, openParenthesisToken, argumentList, closeParenthesisToken) {
|
12473
12422
|
super();
|
12474
|
-
this.kind =
|
12423
|
+
this.kind = 150 /* Tag */;
|
12475
12424
|
this.children = [hashSignToken, name, typeArgumentClause, openParenthesisToken, argumentList, closeParenthesisToken];
|
12476
12425
|
}
|
12477
12426
|
get hashSignToken() {
|
@@ -12502,7 +12451,7 @@ var Tag2 = class extends BaseNode2 {
|
|
12502
12451
|
var ModifierList2 = class extends BaseNode2 {
|
12503
12452
|
constructor(modifiers) {
|
12504
12453
|
super();
|
12505
|
-
this.kind =
|
12454
|
+
this.kind = 151 /* ModifierList */;
|
12506
12455
|
this.children = modifiers;
|
12507
12456
|
}
|
12508
12457
|
get modifiers() {
|
@@ -12518,7 +12467,7 @@ var ModifierList2 = class extends BaseNode2 {
|
|
12518
12467
|
var Modifier2 = class extends BaseNode2 {
|
12519
12468
|
constructor(value, openParenthesisToken, level, closeParenthesisToken) {
|
12520
12469
|
super();
|
12521
|
-
this.kind =
|
12470
|
+
this.kind = 152 /* Modifier */;
|
12522
12471
|
this.children = [value, openParenthesisToken, level, closeParenthesisToken];
|
12523
12472
|
}
|
12524
12473
|
get value() {
|
@@ -12543,7 +12492,7 @@ var Modifier2 = class extends BaseNode2 {
|
|
12543
12492
|
var ParameterClause2 = class extends BaseNode2 {
|
12544
12493
|
constructor(openParenthesisToken, parameterList, closeParenthesisToken) {
|
12545
12494
|
super();
|
12546
|
-
this.kind =
|
12495
|
+
this.kind = 153 /* ParameterClause */;
|
12547
12496
|
this.children = [openParenthesisToken, parameterList, closeParenthesisToken];
|
12548
12497
|
}
|
12549
12498
|
get openParenthesisToken() {
|
@@ -12565,7 +12514,7 @@ var ParameterClause2 = class extends BaseNode2 {
|
|
12565
12514
|
var ParameterList2 = class extends BaseNode2 {
|
12566
12515
|
constructor(elements) {
|
12567
12516
|
super();
|
12568
|
-
this.kind =
|
12517
|
+
this.kind = 154 /* ParameterList */;
|
12569
12518
|
this.children = elements;
|
12570
12519
|
}
|
12571
12520
|
get elements() {
|
@@ -12581,7 +12530,7 @@ var ParameterList2 = class extends BaseNode2 {
|
|
12581
12530
|
var TypeArgumentClause2 = class extends BaseNode2 {
|
12582
12531
|
constructor(lessThanToken, typeArgumentList, greaterThanToken) {
|
12583
12532
|
super();
|
12584
|
-
this.kind =
|
12533
|
+
this.kind = 155 /* TypeArgumentClause */;
|
12585
12534
|
this.children = [lessThanToken, typeArgumentList, greaterThanToken];
|
12586
12535
|
}
|
12587
12536
|
get lessThanToken() {
|
@@ -12603,7 +12552,7 @@ var TypeArgumentClause2 = class extends BaseNode2 {
|
|
12603
12552
|
var TypeArgumentList2 = class extends BaseNode2 {
|
12604
12553
|
constructor(elements) {
|
12605
12554
|
super();
|
12606
|
-
this.kind =
|
12555
|
+
this.kind = 156 /* TypeArgumentList */;
|
12607
12556
|
this.children = elements;
|
12608
12557
|
}
|
12609
12558
|
get elements() {
|
@@ -12619,7 +12568,7 @@ var TypeArgumentList2 = class extends BaseNode2 {
|
|
12619
12568
|
var TypeParameterClause2 = class extends BaseNode2 {
|
12620
12569
|
constructor(lessThanToken, typeParameterList, greaterThanToken) {
|
12621
12570
|
super();
|
12622
|
-
this.kind =
|
12571
|
+
this.kind = 157 /* TypeParameterClause */;
|
12623
12572
|
this.children = [lessThanToken, typeParameterList, greaterThanToken];
|
12624
12573
|
}
|
12625
12574
|
get lessThanToken() {
|
@@ -12641,7 +12590,7 @@ var TypeParameterClause2 = class extends BaseNode2 {
|
|
12641
12590
|
var TypeParameterList2 = class extends BaseNode2 {
|
12642
12591
|
constructor(elements) {
|
12643
12592
|
super();
|
12644
|
-
this.kind =
|
12593
|
+
this.kind = 158 /* TypeParameterList */;
|
12645
12594
|
this.children = elements;
|
12646
12595
|
}
|
12647
12596
|
get elements() {
|
@@ -12657,7 +12606,7 @@ var TypeParameterList2 = class extends BaseNode2 {
|
|
12657
12606
|
var TypeAnnotation2 = class extends BaseNode2 {
|
12658
12607
|
constructor(colonToken, typeSpecifier) {
|
12659
12608
|
super();
|
12660
|
-
this.kind =
|
12609
|
+
this.kind = 159 /* TypeAnnotation */;
|
12661
12610
|
this.children = [colonToken, typeSpecifier];
|
12662
12611
|
}
|
12663
12612
|
get colonToken() {
|
@@ -12991,19 +12940,15 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
|
|
12991
12940
|
DiagnosticCode2[DiagnosticCode2["TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1"] = 353] = "TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1";
|
12992
12941
|
DiagnosticCode2[DiagnosticCode2["EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral"] = 354] = "EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral";
|
12993
12942
|
DiagnosticCode2[DiagnosticCode2["OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral"] = 355] = "OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral";
|
12994
|
-
DiagnosticCode2[DiagnosticCode2["
|
12995
|
-
DiagnosticCode2[DiagnosticCode2["
|
12996
|
-
DiagnosticCode2[DiagnosticCode2["
|
12997
|
-
DiagnosticCode2[DiagnosticCode2["
|
12998
|
-
DiagnosticCode2[DiagnosticCode2["
|
12999
|
-
DiagnosticCode2[DiagnosticCode2["
|
13000
|
-
DiagnosticCode2[DiagnosticCode2["
|
13001
|
-
DiagnosticCode2[DiagnosticCode2["
|
13002
|
-
DiagnosticCode2[DiagnosticCode2["
|
13003
|
-
DiagnosticCode2[DiagnosticCode2["Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 365] = "Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
13004
|
-
DiagnosticCode2[DiagnosticCode2["Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 366] = "Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
13005
|
-
DiagnosticCode2[DiagnosticCode2["ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1"] = 367] = "ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1";
|
13006
|
-
DiagnosticCode2[DiagnosticCode2["ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType"] = 368] = "ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType";
|
12943
|
+
DiagnosticCode2[DiagnosticCode2["TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall"] = 356] = "TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall";
|
12944
|
+
DiagnosticCode2[DiagnosticCode2["ThisCallCausesOwnConstructorCallCycle"] = 357] = "ThisCallCausesOwnConstructorCallCycle";
|
12945
|
+
DiagnosticCode2[DiagnosticCode2["OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock"] = 358] = "OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock";
|
12946
|
+
DiagnosticCode2[DiagnosticCode2["BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock"] = 359] = "BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock";
|
12947
|
+
DiagnosticCode2[DiagnosticCode2["Field0HasNoInitializerAndMayNotBeAssignedInConstructor"] = 360] = "Field0HasNoInitializerAndMayNotBeAssignedInConstructor";
|
12948
|
+
DiagnosticCode2[DiagnosticCode2["Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 361] = "Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
12949
|
+
DiagnosticCode2[DiagnosticCode2["Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 362] = "Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
12950
|
+
DiagnosticCode2[DiagnosticCode2["ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1"] = 363] = "ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1";
|
12951
|
+
DiagnosticCode2[DiagnosticCode2["ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType"] = 364] = "ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType";
|
13007
12952
|
DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 401] = "CannotFindTsLibDirectoryBaseSearchPaths0";
|
13008
12953
|
DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 402] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
|
13009
12954
|
DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 403] = "ProgramWithoutMainPackageCannotBeCompiled";
|
@@ -13252,19 +13197,15 @@ var englishErrorMessages = {
|
|
13252
13197
|
[353 /* TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 */]: "The following base type members conflict because they have the same original name '{0}' and must be overridden:\n{1}",
|
13253
13198
|
[354 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */]: "Either identifiers or integer indexes are allowed as parameters of text template literal.",
|
13254
13199
|
[355 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */]: "Only index {0} is allowed here as parameter of text template literal.",
|
13255
|
-
[356 /*
|
13256
|
-
[357 /*
|
13257
|
-
[358 /*
|
13258
|
-
[359 /*
|
13259
|
-
[360 /*
|
13260
|
-
[361 /*
|
13261
|
-
[362 /*
|
13262
|
-
[363 /*
|
13263
|
-
[364 /*
|
13264
|
-
[365 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Field '{0}' has no initializer and may not be assigned in package constructor.",
|
13265
|
-
[366 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Variable '{0}' has no initializer and may not be assigned in package constructor.",
|
13266
|
-
[367 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "Expression of type '{0}' cannot be used in a for loop because the type does not implement the 'Enumerable' aspect and does not contain a method named '{1}' that returns the 'Enumerator' type.",
|
13267
|
-
[368 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "For an expression to be used in a for loop, method '{0}' must return the 'Enumerator' type.",
|
13200
|
+
[356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */]: "The first statement of constructor block must be either base or own constructor call.",
|
13201
|
+
[357 /* ThisCallCausesOwnConstructorCallCycle */]: "This call causes own constructor call cycle.",
|
13202
|
+
[358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "Own constructor call must be the first statement of constructor block.",
|
13203
|
+
[359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "Base constructor call must be the first statement of constructor block.",
|
13204
|
+
[360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */]: "Field '{0}' has no initializer and may not be assigned in constructor.",
|
13205
|
+
[361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Field '{0}' has no initializer and may not be assigned in package constructor.",
|
13206
|
+
[362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Variable '{0}' has no initializer and may not be assigned in package constructor.",
|
13207
|
+
[363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "Expression of type '{0}' cannot be used in a for loop because the type does not implement the 'Enumerable' aspect and does not contain a method named '{1}' that returns the 'Enumerator' type.",
|
13208
|
+
[364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "For an expression to be used in a for loop, method '{0}' must return the 'Enumerator' type.",
|
13268
13209
|
[401 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
|
13269
13210
|
[402 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
|
13270
13211
|
[403 /* ProgramWithoutMainPackageCannotBeCompiled */]: "Program without main package cannot be compiled.",
|
@@ -13466,19 +13407,15 @@ var russianErrorMessages = {
|
|
13466
13407
|
[353 /* TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 */]: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0447\u043B\u0435\u043D\u044B \u0431\u0430\u0437\u043E\u0432\u044B\u0445 \u0442\u0438\u043F\u043E\u0432 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0443\u044E\u0442 \u043C\u0435\u0436\u0434\u0443 \u0441\u043E\u0431\u043E\u0439, \u043F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u0438\u0445 \u0438\u043C\u0435\u043D\u0430 '{0}' \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442 \u043D\u0430 \u044F\u0437\u044B\u043A\u0435 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B\u0430, \u0438 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u044B:\n{1}",
|
13467
13408
|
[354 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */]: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043B\u0438\u0431\u043E \u0438\u043C\u0435\u043D\u0430, \u043B\u0438\u0431\u043E \u0446\u0435\u043B\u043E\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044B\u0435 \u0438\u043D\u0434\u0435\u043A\u0441\u044B.",
|
13468
13409
|
[355 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */]: "\u0417\u0434\u0435\u0441\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0435\u043B\u043E\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044B\u0439 \u0438\u043D\u0434\u0435\u043A\u0441 {0}.",
|
13469
|
-
[356 /*
|
13470
|
-
[357 /*
|
13471
|
-
[358 /*
|
13472
|
-
[359 /*
|
13473
|
-
[360 /*
|
13474
|
-
[361 /*
|
13475
|
-
[362 /*
|
13476
|
-
[363 /*
|
13477
|
-
[364 /*
|
13478
|
-
[365 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u043E\u043B\u0435 '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u043C\u0443 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13479
|
-
[366 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u0439 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13480
|
-
[367 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 '{0}' \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0435\u0433\u043E \u0442\u0438\u043F \u043D\u0435 \u0440\u0435\u0430\u043B\u0438\u0437\u0443\u0435\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 '\u041F\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0439' \u0438 \u043D\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u0435\u0442\u043E\u0434 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C '{1}', \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u044E\u0449\u0438\u0439 \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13481
|
-
[368 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "\u0427\u0442\u043E\u0431\u044B \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u043D\u043E \u0431\u044B\u043B\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043C\u0435\u0442\u043E\u0434 '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13410
|
+
[356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */]: "\u041F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0432\u044B\u0437\u043E\u0432\u0430 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u0438\u043B\u0438 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13411
|
+
[357 /* ThisCallCausesOwnConstructorCallCycle */]: "\u0414\u0430\u043D\u043D\u044B\u0439 \u0432\u044B\u0437\u043E\u0432 \u043F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043A \u0446\u0438\u043A\u043B\u0443 \u0432\u044B\u0437\u043E\u0432\u0430 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u043E\u0432.",
|
13412
|
+
[358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "\u0412\u044B\u0437\u043E\u0432 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13413
|
+
[359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "\u0412\u044B\u0437\u043E\u0432 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13414
|
+
[360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */]: "\u041F\u043E\u043B\u0435 '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u043C\u0443 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435.",
|
13415
|
+
[361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u043E\u043B\u0435 '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u043C\u0443 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13416
|
+
[362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u0439 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13417
|
+
[363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 '{0}' \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0435\u0433\u043E \u0442\u0438\u043F \u043D\u0435 \u0440\u0435\u0430\u043B\u0438\u0437\u0443\u0435\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 '\u041F\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0439' \u0438 \u043D\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u0435\u0442\u043E\u0434 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C '{1}', \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u044E\u0449\u0438\u0439 \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13418
|
+
[364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "\u0427\u0442\u043E\u0431\u044B \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u043D\u043E \u0431\u044B\u043B\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043C\u0435\u0442\u043E\u0434 '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13482
13419
|
[401 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043D\u0430\u0439\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0441\u043E \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E\u0439 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u043E\u0439 TypeScript. \u041F\u0443\u0442\u0438, \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043B\u044F\u043B\u0441\u044F \u043F\u043E\u0438\u0441\u043A: {0}.",
|
13483
13420
|
[402 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B '{0}' \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0447\u0430\u0441\u0442\u044C\u044E \u043F\u0430\u043A\u0435\u0442\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D.",
|
13484
13421
|
[403 /* ProgramWithoutMainPackageCannotBeCompiled */]: "\u041F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430 \u0431\u0435\u0437 \u0433\u043B\u0430\u0432\u043D\u043E\u0433\u043E \u043F\u0430\u043A\u0435\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0430.",
|
@@ -13644,6 +13581,8 @@ function getPackageContainingEntity(entity) {
|
|
13644
13581
|
Debug.never(container);
|
13645
13582
|
}
|
13646
13583
|
}
|
13584
|
+
case "text-template-parameter":
|
13585
|
+
return entity2.getContainer();
|
13647
13586
|
case "local":
|
13648
13587
|
return getPackageContainingEntity(entity2.getContainingEntity());
|
13649
13588
|
default:
|
@@ -13715,6 +13654,7 @@ function isComputedVariableEntity(entity) {
|
|
13715
13654
|
case "field":
|
13716
13655
|
return entity.getGetter() !== void 0 || entity.getSetter() !== void 0;
|
13717
13656
|
case "parameter":
|
13657
|
+
case "text-template-parameter":
|
13718
13658
|
case "local":
|
13719
13659
|
return false;
|
13720
13660
|
default:
|
@@ -14617,6 +14557,7 @@ var VariableDeclaration_entity = class {
|
|
14617
14557
|
case "field":
|
14618
14558
|
return createTypeMemberEntityContainer(this.value);
|
14619
14559
|
case "parameter":
|
14560
|
+
case "text-template-parameter":
|
14620
14561
|
case "local":
|
14621
14562
|
return void 0;
|
14622
14563
|
default:
|
@@ -20152,12 +20093,7 @@ var ExpressionParser = class {
|
|
20152
20093
|
let span;
|
20153
20094
|
do {
|
20154
20095
|
const spanStart = this.parser.tokenOrKeywordStartPosition();
|
20155
|
-
|
20156
|
-
if (this.parser.currentTokenOrKeyword.isToken(2 /* IntegerLiteral */)) {
|
20157
|
-
parameter = this.parser.parseExpectedToken(2 /* IntegerLiteral */);
|
20158
|
-
} else {
|
20159
|
-
parameter = this.parseTranslationTextTemplateParameter();
|
20160
|
-
}
|
20096
|
+
const parameter = this.parseTranslationTextTemplateParameter();
|
20161
20097
|
const text = this.parseTextTemplatePartOrTail();
|
20162
20098
|
span = this.parser.intern(new TranslationTextTemplateSpan2(parameter, text), spanStart);
|
20163
20099
|
spans.push(span);
|
@@ -21233,9 +21169,8 @@ var TranslationsDeclarationParser = class {
|
|
21233
21169
|
case 10 /* Identifier */:
|
21234
21170
|
return () => this.parsePackageVariableTranslation();
|
21235
21171
|
case 6 /* TextLiteral */:
|
21236
|
-
return () => this.parseTextLiteralTranslation();
|
21237
21172
|
case 7 /* TextTemplateHead */:
|
21238
|
-
return () => this.
|
21173
|
+
return () => this.parseTextTranslation();
|
21239
21174
|
}
|
21240
21175
|
} else {
|
21241
21176
|
switch (this.parser.currentTokenOrKeyword.keywordKind) {
|
@@ -21452,17 +21387,14 @@ var TranslationsDeclarationParser = class {
|
|
21452
21387
|
);
|
21453
21388
|
return this.parser.intern(result, translationStart);
|
21454
21389
|
}
|
21455
|
-
|
21456
|
-
const translationStart = this.parser.tokenOrKeywordStartPosition();
|
21457
|
-
const sourceText = this.parser.parseExpectedToken(6 /* TextLiteral */);
|
21458
|
-
const minusGreaterThanToken = this.parser.parseExpectedToken(43 /* MinusGreaterThan */);
|
21459
|
-
const translatedText = this.parser.parseExpectedToken(6 /* TextLiteral */);
|
21460
|
-
const result = new TextLiteralTranslation2(sourceText, minusGreaterThanToken, translatedText);
|
21461
|
-
return this.parser.intern(result, translationStart);
|
21462
|
-
}
|
21463
|
-
parseTextTemplateLiteralTranslation() {
|
21390
|
+
parseTextTranslation() {
|
21464
21391
|
const translationStart = this.parser.tokenOrKeywordStartPosition();
|
21465
|
-
|
21392
|
+
let sourceText;
|
21393
|
+
if (this.parser.currentTokenOrKeyword.isToken(6 /* TextLiteral */)) {
|
21394
|
+
sourceText = this.parser.parseExpectedToken(6 /* TextLiteral */);
|
21395
|
+
} else {
|
21396
|
+
sourceText = this.parser.expressionParser.parseTranslationTextTemplate();
|
21397
|
+
}
|
21466
21398
|
const minusGreaterThanToken = this.parser.parseExpectedToken(43 /* MinusGreaterThan */);
|
21467
21399
|
let translatedTextOrTranslationFunction;
|
21468
21400
|
if (this.parser.currentTokenOrKeyword.kind === "token") {
|
@@ -21484,16 +21416,13 @@ var TranslationsDeclarationParser = class {
|
|
21484
21416
|
translatedTextOrTranslationFunction = this.parser.expressionParser.parseFunctionLiteral();
|
21485
21417
|
}
|
21486
21418
|
if (translatedTextOrTranslationFunction === void 0) {
|
21487
|
-
if (this.parser.expressionParser.isStartOfExpression(false)) {
|
21488
|
-
this.parser.expressionParser.parseExpression(false);
|
21489
|
-
}
|
21490
21419
|
translatedTextOrTranslationFunction = new InvalidExpression2();
|
21491
21420
|
this.parser.tryReportDiagnosticAtCurrentRange(
|
21492
21421
|
133 /* TranslatedTextTemplateOrTranslationFunctionBlockExpected */
|
21493
21422
|
);
|
21494
21423
|
}
|
21495
|
-
const result = new
|
21496
|
-
|
21424
|
+
const result = new TextTranslation2(
|
21425
|
+
sourceText,
|
21497
21426
|
minusGreaterThanToken,
|
21498
21427
|
translatedTextOrTranslationFunction
|
21499
21428
|
);
|
@@ -26295,7 +26224,7 @@ var ModifierValidator = class _ModifierValidator {
|
|
26295
26224
|
[53 /* FieldGetterDeclaration */]: this.allowedTypeMemberHidingModifiers | 32 /* Static */ | 64 /* Abstract */ | 128 /* Basic */ | 256 /* Override */,
|
26296
26225
|
[54 /* FieldSetterDeclaration */]: this.allowedTypeMemberHidingModifiers | 32 /* Static */ | 64 /* Abstract */ | 128 /* Basic */ | 256 /* Override */,
|
26297
26226
|
[55 /* InvalidTypeMemberDeclaration */]: this.allowedTypeMemberModifiers,
|
26298
|
-
[
|
26227
|
+
[145 /* VariantDeclaration */]: 0 /* None */
|
26299
26228
|
};
|
26300
26229
|
}
|
26301
26230
|
static validatePackageVariableAccessorsHaveConsistentModifiers(analyzer, getterModifiers, setterModifiers, nodeForDiagnostic, diagnostics) {
|
@@ -26806,7 +26735,7 @@ var ModifierValidator = class _ModifierValidator {
|
|
26806
26735
|
break;
|
26807
26736
|
case 55 /* InvalidTypeMemberDeclaration */:
|
26808
26737
|
break;
|
26809
|
-
case
|
26738
|
+
case 145 /* VariantDeclaration */:
|
26810
26739
|
this.validateTypeMemberCanBePlacedInGroupWithModifiers(
|
26811
26740
|
declaration.kind,
|
26812
26741
|
declaration.name,
|
@@ -26829,7 +26758,7 @@ var ModifierValidator = class _ModifierValidator {
|
|
26829
26758
|
const flag = modifierToModifierFlag(modifier);
|
26830
26759
|
if ((flags & 31 /* AnyHiddenModifier */) !== 0) {
|
26831
26760
|
this.reportDuplicateHiddenModifier(modifier, parentGroupFlags);
|
26832
|
-
} else if (typeMemberDeclarationKind ===
|
26761
|
+
} else if (typeMemberDeclarationKind === 145 /* VariantDeclaration */) {
|
26833
26762
|
this._diagnostics.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
26834
26763
|
328 /* VariantDeclarationCannotHaveHiddenModifier */,
|
26835
26764
|
modifier
|
@@ -27110,7 +27039,7 @@ var NodeTypeUtils = class {
|
|
27110
27039
|
case 26 /* PackageFunctionTypeDeclaration */:
|
27111
27040
|
case 17 /* AnonymousFunctionTypeDeclaration */:
|
27112
27041
|
case 20 /* PackageAliasTypeDeclaration */:
|
27113
|
-
case
|
27042
|
+
case 146 /* TypeParameterDeclaration */:
|
27114
27043
|
return true;
|
27115
27044
|
default:
|
27116
27045
|
Debug.typeIsAssignableTo();
|
@@ -27124,7 +27053,7 @@ var NodeTypeUtils = class {
|
|
27124
27053
|
case 36 /* PackageVariantTypeDeclaration */:
|
27125
27054
|
case 26 /* PackageFunctionTypeDeclaration */:
|
27126
27055
|
case 20 /* PackageAliasTypeDeclaration */:
|
27127
|
-
case
|
27056
|
+
case 146 /* TypeParameterDeclaration */:
|
27128
27057
|
return true;
|
27129
27058
|
default:
|
27130
27059
|
Debug.typeIsAssignableTo();
|
@@ -27169,7 +27098,7 @@ var NodeTypeUtils = class {
|
|
27169
27098
|
case 46 /* IndexedElementSetterDeclaration */:
|
27170
27099
|
case 48 /* DereferencedVariableGetterDeclaration */:
|
27171
27100
|
case 49 /* DereferencedVariableSetterDeclaration */:
|
27172
|
-
case
|
27101
|
+
case 145 /* VariantDeclaration */:
|
27173
27102
|
case 42 /* TypeMemberGroupDeclaration */:
|
27174
27103
|
case 55 /* InvalidTypeMemberDeclaration */:
|
27175
27104
|
return true;
|
@@ -27299,9 +27228,9 @@ var NodeTypeUtils = class {
|
|
27299
27228
|
case 58 /* EnumerationVariableDeclaration */:
|
27300
27229
|
case 33 /* PackageVariableDeclaration */:
|
27301
27230
|
case 57 /* LocalVariableDeclaration */:
|
27302
|
-
case
|
27231
|
+
case 147 /* ParameterDeclaration */:
|
27303
27232
|
case 52 /* FieldDeclaration */:
|
27304
|
-
case
|
27233
|
+
case 145 /* VariantDeclaration */:
|
27305
27234
|
return true;
|
27306
27235
|
default:
|
27307
27236
|
Debug.typeIsAssignableTo();
|
@@ -27433,6 +27362,12 @@ var ImplicitFunctionBlockParameterSpecialVariableEntityInfo = class {
|
|
27433
27362
|
this.kind = "implicit-function-block-parameter";
|
27434
27363
|
}
|
27435
27364
|
};
|
27365
|
+
var TextTemplateFunctionTypeParameterSpecialVariableEntityInfo = class {
|
27366
|
+
constructor(textTemplateParameter) {
|
27367
|
+
this.textTemplateParameter = textTemplateParameter;
|
27368
|
+
this.kind = "text-template-function-type-parameter";
|
27369
|
+
}
|
27370
|
+
};
|
27436
27371
|
var PackageVariableDeclarationEntity = class {
|
27437
27372
|
constructor(_analyzer, _node) {
|
27438
27373
|
this._analyzer = _analyzer;
|
@@ -28606,6 +28541,66 @@ var IntrinsicLocalVariableEntity = class {
|
|
28606
28541
|
IntrinsicLocalVariableEntity = __decorateClass([
|
28607
28542
|
entityToStringDecorator
|
28608
28543
|
], IntrinsicLocalVariableEntity);
|
28544
|
+
var TranslationTextTemplateParameterDeclarationEntity = class {
|
28545
|
+
constructor(_analyzer, _node) {
|
28546
|
+
this._analyzer = _analyzer;
|
28547
|
+
this._node = _node;
|
28548
|
+
this.kind = 0 /* Variable */;
|
28549
|
+
this.subkind = "text-template-parameter";
|
28550
|
+
}
|
28551
|
+
getName() {
|
28552
|
+
return this._analyzer.createNameFromIdentifier(this._node.name);
|
28553
|
+
}
|
28554
|
+
getContainer() {
|
28555
|
+
return TreeQuery.fromNode(this._node).packageEntity(this._analyzer);
|
28556
|
+
}
|
28557
|
+
getType() {
|
28558
|
+
const node = this._node;
|
28559
|
+
if (node.typeAnnotation !== void 0) {
|
28560
|
+
return this._analyzer.type.ofTypeSpecifier(node.typeAnnotation.typeSpecifier);
|
28561
|
+
}
|
28562
|
+
return this._analyzer.includeNoneToType(
|
28563
|
+
this._analyzer.originalStandardTypes.refObject,
|
28564
|
+
this.getLocalization().locale
|
28565
|
+
);
|
28566
|
+
}
|
28567
|
+
getDefinition() {
|
28568
|
+
return { kind: 0 /* Source */, value: { kind: "single", node: this._node } };
|
28569
|
+
}
|
28570
|
+
getGetter() {
|
28571
|
+
return void 0;
|
28572
|
+
}
|
28573
|
+
getSetter() {
|
28574
|
+
return void 0;
|
28575
|
+
}
|
28576
|
+
isConstant() {
|
28577
|
+
return false;
|
28578
|
+
}
|
28579
|
+
isHidden() {
|
28580
|
+
return void 0;
|
28581
|
+
}
|
28582
|
+
isSpecial() {
|
28583
|
+
return void 0;
|
28584
|
+
}
|
28585
|
+
getTags() {
|
28586
|
+
return [];
|
28587
|
+
}
|
28588
|
+
isOptional() {
|
28589
|
+
return false;
|
28590
|
+
}
|
28591
|
+
isVariadic() {
|
28592
|
+
return false;
|
28593
|
+
}
|
28594
|
+
getLocalization() {
|
28595
|
+
return Localization.Original.ofEntity(this);
|
28596
|
+
}
|
28597
|
+
getOriginalEntity() {
|
28598
|
+
return this;
|
28599
|
+
}
|
28600
|
+
};
|
28601
|
+
TranslationTextTemplateParameterDeclarationEntity = __decorateClass([
|
28602
|
+
entityToStringDecorator
|
28603
|
+
], TranslationTextTemplateParameterDeclarationEntity);
|
28609
28604
|
|
28610
28605
|
// source/analysis/SourcePackageMembersCreator.ts
|
28611
28606
|
var SourcePackageMembersCreator = class {
|
@@ -34035,6 +34030,7 @@ var AnalyzedTranslationPackage2 = class {
|
|
34035
34030
|
}
|
34036
34031
|
case "parameter":
|
34037
34032
|
return getParameterVariableEntityName(entity2, translationPackage);
|
34033
|
+
case "text-template-parameter":
|
34038
34034
|
case "local":
|
34039
34035
|
return void 0;
|
34040
34036
|
default:
|
@@ -34168,9 +34164,7 @@ var AnalyzedTranslationPackage2 = class {
|
|
34168
34164
|
}
|
34169
34165
|
case 134 /* PackageImportTranslation */:
|
34170
34166
|
break;
|
34171
|
-
case 140 /*
|
34172
|
-
break;
|
34173
|
-
case 141 /* TextTemplateLiteralTranslation */:
|
34167
|
+
case 140 /* TextTranslation */:
|
34174
34168
|
break;
|
34175
34169
|
default:
|
34176
34170
|
Debug.never(translation);
|
@@ -35438,7 +35432,7 @@ var Resolver3 = class {
|
|
35438
35432
|
if (!(node.parent.kind === 104 /* ExpressionStatement */ && node.parent.parent.parent.kind === 92 /* FunctionBlock */ && node.parent.parent.elements[0] === node.parent)) {
|
35439
35433
|
diagnostics ??= [];
|
35440
35434
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
35441
|
-
|
35435
|
+
359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */,
|
35442
35436
|
this._node
|
35443
35437
|
));
|
35444
35438
|
}
|
@@ -37674,7 +37668,7 @@ var Resolver10 = class {
|
|
37674
37668
|
if (!(node.parent.kind === 104 /* ExpressionStatement */ && node.parent.parent.parent.kind === 92 /* FunctionBlock */ && node.parent.parent.elements[0] === node.parent)) {
|
37675
37669
|
diagnostics ??= [];
|
37676
37670
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37677
|
-
|
37671
|
+
358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */,
|
37678
37672
|
this._node
|
37679
37673
|
));
|
37680
37674
|
}
|
@@ -37823,7 +37817,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37823
37817
|
baseConstructorCalls.set(entity, baseConstructorWithoutParameters);
|
37824
37818
|
} else if (baseTypeHasAccessibleConstructors) {
|
37825
37819
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37826
|
-
|
37820
|
+
356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */,
|
37827
37821
|
constructorDeclaration.creationKeyword
|
37828
37822
|
));
|
37829
37823
|
}
|
@@ -37834,7 +37828,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37834
37828
|
addOwnConstructorCallOrReportCycleDiagnostic(constructorContainingCall, calledConstructor, ownConstructorCalls, nodeForDiagnostic, diagnostics) {
|
37835
37829
|
if (calledConstructor.getOriginalEntity() === constructorContainingCall.getOriginalEntity()) {
|
37836
37830
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37837
|
-
|
37831
|
+
357 /* ThisCallCausesOwnConstructorCallCycle */,
|
37838
37832
|
nodeForDiagnostic
|
37839
37833
|
));
|
37840
37834
|
} else {
|
@@ -37845,7 +37839,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37845
37839
|
break;
|
37846
37840
|
} else if (current === constructorContainingCall) {
|
37847
37841
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37848
|
-
|
37842
|
+
357 /* ThisCallCausesOwnConstructorCallCycle */,
|
37849
37843
|
nodeForDiagnostic
|
37850
37844
|
));
|
37851
37845
|
break;
|
@@ -38903,6 +38897,7 @@ function getReferenceAtNarrowableExpression(analyzer, node) {
|
|
38903
38897
|
switch (entity.subkind) {
|
38904
38898
|
case "local":
|
38905
38899
|
case "parameter":
|
38900
|
+
case "text-template-parameter":
|
38906
38901
|
return new NarrowableReference.LocalVariable(analyzer, entity);
|
38907
38902
|
case "package":
|
38908
38903
|
return new NarrowableReference.PackageVariable(analyzer, entity);
|
@@ -39149,7 +39144,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
|
|
39149
39144
|
reportNotInitialedVariableDiagnostic(entity) {
|
39150
39145
|
const location = this.getVariableDiagnosticLocationWithFallback(entity);
|
39151
39146
|
if (location !== void 0) {
|
39152
|
-
const code = entity.subkind === "package" ?
|
39147
|
+
const code = entity.subkind === "package" ? 362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */ : 361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */;
|
39153
39148
|
const argumentFactory = this._analyzer.createDiagnosticArgumentFactoryWithinPackage(
|
39154
39149
|
getPackageContainingEntity(entity)
|
39155
39150
|
);
|
@@ -41078,6 +41073,184 @@ var FieldWithInitializerSemanticContext = class extends SemanticContextWithParen
|
|
41078
41073
|
}
|
41079
41074
|
};
|
41080
41075
|
|
41076
|
+
// source/analysis/semantic-context/SemanticContextValidatingNameConflicts.ts
|
41077
|
+
var SemanticContextValidatingNameConflictsBase = class extends SemanticContextWithParent {
|
41078
|
+
constructor(analyzer) {
|
41079
|
+
super();
|
41080
|
+
this._memberEntities = new Cached();
|
41081
|
+
this._namedDeclarations = new Cached();
|
41082
|
+
this._typesOrContainerWithTypes = new Cached();
|
41083
|
+
this._namedDeclarationsByName = new Cached();
|
41084
|
+
this._typesOrContainerWithTypesByName = new Cached();
|
41085
|
+
this._analyzer = analyzer;
|
41086
|
+
}
|
41087
|
+
get memberEntities() {
|
41088
|
+
return this._memberEntities.getOrInsertWith(() => this.createMemberEntities());
|
41089
|
+
}
|
41090
|
+
get namedDeclarations() {
|
41091
|
+
return this._namedDeclarations.getOrInsertWith(() => this.createNamedDeclarations());
|
41092
|
+
}
|
41093
|
+
get typesOrContainerWithTypes() {
|
41094
|
+
return this._typesOrContainerWithTypes.getOrInsertWith(() => this.createTypesOrContainerWithTypes());
|
41095
|
+
}
|
41096
|
+
get namedDeclarationsByName() {
|
41097
|
+
return this._namedDeclarationsByName.getOrInsertWith(
|
41098
|
+
() => Query.from(this.namedDeclarations).groupByToMap((d) => d.getName().key, (d) => d)
|
41099
|
+
);
|
41100
|
+
}
|
41101
|
+
get typesOrContainerWithTypesByName() {
|
41102
|
+
return this._typesOrContainerWithTypesByName.getOrInsertWith(
|
41103
|
+
() => Query.from(this.typesOrContainerWithTypes).groupByToMap((d) => d.getName().key, (d) => d)
|
41104
|
+
);
|
41105
|
+
}
|
41106
|
+
getOwnTypesOrContainersWithTypes(_hidingMatcher) {
|
41107
|
+
return this.typesOrContainerWithTypes;
|
41108
|
+
}
|
41109
|
+
getOwnTypesOrContainersWithTypesByName(name, _hidingMatcher) {
|
41110
|
+
const declarations = this.typesOrContainerWithTypesByName.get(name.key);
|
41111
|
+
return declarations ?? [];
|
41112
|
+
}
|
41113
|
+
getOwnNamedDeclarations(_noInstanceMembers, _hidingMatcher) {
|
41114
|
+
return this.namedDeclarations;
|
41115
|
+
}
|
41116
|
+
getOwnNamedDeclarationsByName(name, _noInstanceMembers, _hidingMatcher) {
|
41117
|
+
const declarations = this.namedDeclarationsByName.get(name.key);
|
41118
|
+
return declarations ?? [];
|
41119
|
+
}
|
41120
|
+
validateNameConflicts(diagnostics) {
|
41121
|
+
const membersByNameKey = this.getMemberEntityDictionary();
|
41122
|
+
const sourceFile = TreeQuery.fromNode(this.node).projectSourceFile(this._analyzer);
|
41123
|
+
for (const members of membersByNameKey.values()) {
|
41124
|
+
if (members.length > 1) {
|
41125
|
+
if (members.every((m) => m.kind === 1 /* Function */)) {
|
41126
|
+
this.validateNestedFunctionsConflicts(members, sourceFile, diagnostics);
|
41127
|
+
} else {
|
41128
|
+
const diagnosticData = DiagnosticData.withCode(292 /* ScopeAlreadyContainsDeclarationWithTheSameName */);
|
41129
|
+
const preferSetterParameter = this.getContainingSubprogram()?.kind === "setter";
|
41130
|
+
for (const member of members) {
|
41131
|
+
const diagnosticRange = getDiagnosticRange(member, preferSetterParameter);
|
41132
|
+
if (diagnosticRange !== void 0) {
|
41133
|
+
diagnostics.addDiagnostic(new Diagnostic(
|
41134
|
+
diagnosticData,
|
41135
|
+
new DiagnosticLocation(diagnosticRange, sourceFile)
|
41136
|
+
));
|
41137
|
+
}
|
41138
|
+
}
|
41139
|
+
}
|
41140
|
+
}
|
41141
|
+
}
|
41142
|
+
}
|
41143
|
+
getMemberEntityDictionary() {
|
41144
|
+
if (this._memberEntitiesByNameKey === void 0) {
|
41145
|
+
this._memberEntitiesByNameKey = Query.from(this.memberEntities).groupByToMap((e) => e.getName().key, (d) => d);
|
41146
|
+
}
|
41147
|
+
return this._memberEntitiesByNameKey;
|
41148
|
+
}
|
41149
|
+
validateNestedFunctionsConflicts(entities, sourceFile, diagnostics) {
|
41150
|
+
for (const entity of entities) {
|
41151
|
+
for (const entityToCheckAgainst of entities) {
|
41152
|
+
if (entityToCheckAgainst === entity) {
|
41153
|
+
continue;
|
41154
|
+
}
|
41155
|
+
if (this._analyzer.conflictsCheck.doFunctionSignaturesConflict(entity, entityToCheckAgainst)) {
|
41156
|
+
const diagnosticRange = getDiagnosticRange(entity);
|
41157
|
+
if (diagnosticRange !== void 0) {
|
41158
|
+
const diagnosticData = DiagnosticData.withCode(
|
41159
|
+
293 /* ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes */
|
41160
|
+
);
|
41161
|
+
diagnostics.addDiagnostic(new Diagnostic(
|
41162
|
+
diagnosticData,
|
41163
|
+
new DiagnosticLocation(diagnosticRange, sourceFile)
|
41164
|
+
));
|
41165
|
+
}
|
41166
|
+
break;
|
41167
|
+
}
|
41168
|
+
}
|
41169
|
+
}
|
41170
|
+
}
|
41171
|
+
createNamedDeclarations() {
|
41172
|
+
return this.memberEntities.map((e) => {
|
41173
|
+
switch (e.kind) {
|
41174
|
+
case 0 /* Variable */:
|
41175
|
+
return new NamedDeclaration_variable(new NamedDeclarationVariable_entity(e));
|
41176
|
+
case 1 /* Function */:
|
41177
|
+
return new NamedDeclaration_function(new NamedDeclarationFunction_entity(e));
|
41178
|
+
case 2 /* Type */:
|
41179
|
+
return new NamedDeclaration_type(e);
|
41180
|
+
default:
|
41181
|
+
Debug.never(e);
|
41182
|
+
}
|
41183
|
+
});
|
41184
|
+
}
|
41185
|
+
createTypesOrContainerWithTypes() {
|
41186
|
+
return this.createMemberEntitiesForTypeLookup().map((e) => new NamedDeclaration_type(e));
|
41187
|
+
}
|
41188
|
+
};
|
41189
|
+
function getDiagnosticRange(entity, preferSetterParameter = false) {
|
41190
|
+
switch (entity.kind) {
|
41191
|
+
case 0 /* Variable */: {
|
41192
|
+
const definition = entity.getDefinition();
|
41193
|
+
if (definition.kind !== 0 /* Source */) {
|
41194
|
+
return void 0;
|
41195
|
+
}
|
41196
|
+
if (definition.value.kind === "single") {
|
41197
|
+
return definition.value.node.name.rangeWithoutTrivia;
|
41198
|
+
} else if (definition.value.kind === "multi") {
|
41199
|
+
if (definition.value.nodes.length === 1) {
|
41200
|
+
return definition.value.nodes[0].name.rangeWithoutTrivia;
|
41201
|
+
} else if (definition.value.nodes.length > 1) {
|
41202
|
+
if (definition.value.nodes.every((n) => n.kind === 147 /* ParameterDeclaration */)) {
|
41203
|
+
const getterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 45 /* IndexedElementGetterDeclaration */);
|
41204
|
+
const setterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 46 /* IndexedElementSetterDeclaration */);
|
41205
|
+
if (setterParameterDeclaration !== void 0 && preferSetterParameter) {
|
41206
|
+
return setterParameterDeclaration.name.rangeWithoutTrivia;
|
41207
|
+
}
|
41208
|
+
return getterParameterDeclaration?.name.rangeWithoutTrivia ?? setterParameterDeclaration?.name.rangeWithoutTrivia;
|
41209
|
+
}
|
41210
|
+
return definition.value.nodes[0].name.rangeWithTrivia;
|
41211
|
+
} else {
|
41212
|
+
return void 0;
|
41213
|
+
}
|
41214
|
+
} else {
|
41215
|
+
Debug.never(definition.value);
|
41216
|
+
}
|
41217
|
+
}
|
41218
|
+
case 1 /* Function */: {
|
41219
|
+
const definition = entity.getDefinition();
|
41220
|
+
if (definition.kind !== 0 /* Source */) {
|
41221
|
+
return void 0;
|
41222
|
+
}
|
41223
|
+
return definition.node.name.rangeWithoutTrivia;
|
41224
|
+
}
|
41225
|
+
case 2 /* Type */: {
|
41226
|
+
const definition = entity.getDefinition();
|
41227
|
+
if (definition.kind !== 0 /* Source */) {
|
41228
|
+
return void 0;
|
41229
|
+
}
|
41230
|
+
return definition.node.name.rangeWithoutTrivia;
|
41231
|
+
}
|
41232
|
+
default:
|
41233
|
+
Debug.never(entity);
|
41234
|
+
}
|
41235
|
+
}
|
41236
|
+
|
41237
|
+
// source/analysis/semantic-context/TranslationTextTemplateSemanticContext.ts
|
41238
|
+
var TranslationTextTemplateSemanticContext = class extends SemanticContextValidatingNameConflictsBase {
|
41239
|
+
constructor(analyzer, node, outer) {
|
41240
|
+
super(analyzer);
|
41241
|
+
this.kind = "translation-text-template";
|
41242
|
+
this.node = node;
|
41243
|
+
this.outer = outer;
|
41244
|
+
this.asContext = this;
|
41245
|
+
}
|
41246
|
+
createMemberEntities() {
|
41247
|
+
return this.node.spanList.spans.map((x) => this._analyzer.entity.ofTranslationTextTemplateParameterDeclaration(x.parameter));
|
41248
|
+
}
|
41249
|
+
createMemberEntitiesForTypeLookup() {
|
41250
|
+
return [];
|
41251
|
+
}
|
41252
|
+
};
|
41253
|
+
|
41081
41254
|
// source/analysis/semantic-context/SemanticContextBuilder.ts
|
41082
41255
|
var SemanticContextBuilder = class {
|
41083
41256
|
constructor(analyzer) {
|
@@ -41104,6 +41277,7 @@ var SemanticContextBuilder = class {
|
|
41104
41277
|
this._outermostContextsOfFunctionDeclaration = /* @__PURE__ */ new Map();
|
41105
41278
|
this._outermostContextsOfTypeDeclaration = /* @__PURE__ */ new Map();
|
41106
41279
|
this._typeExtensionDeclarationBodyContexts = /* @__PURE__ */ new Map();
|
41280
|
+
this._translationTextTemplateContexts = /* @__PURE__ */ new Map();
|
41107
41281
|
this._analyzer = analyzer;
|
41108
41282
|
}
|
41109
41283
|
/**
|
@@ -41573,6 +41747,15 @@ var SemanticContextBuilder = class {
|
|
41573
41747
|
}
|
41574
41748
|
return this.ofSourceFile(parent);
|
41575
41749
|
}
|
41750
|
+
ofTranslationTextTemplate(node) {
|
41751
|
+
let result = this._translationTextTemplateContexts.get(node);
|
41752
|
+
if (result === void 0) {
|
41753
|
+
const outer = this.containing(node.parent);
|
41754
|
+
result = new TranslationTextTemplateSemanticContext(this._analyzer, node, outer);
|
41755
|
+
this._translationTextTemplateContexts.set(node, result);
|
41756
|
+
}
|
41757
|
+
return result;
|
41758
|
+
}
|
41576
41759
|
containingInternal(node, offset) {
|
41577
41760
|
if (node.kind === 1 /* SourceFile */) {
|
41578
41761
|
return this.ofSourceFile(node);
|
@@ -41693,6 +41876,11 @@ var SemanticContextBuilder = class {
|
|
41693
41876
|
}
|
41694
41877
|
}
|
41695
41878
|
break;
|
41879
|
+
case 140 /* TextTranslation */:
|
41880
|
+
if (cursor.sourceText.kind === 141 /* TranslationTextTemplate */) {
|
41881
|
+
return this.ofTranslationTextTemplate(cursor.sourceText);
|
41882
|
+
}
|
41883
|
+
break;
|
41696
41884
|
}
|
41697
41885
|
cursor = cursor.parent;
|
41698
41886
|
}
|
@@ -41846,167 +42034,6 @@ var SemanticContextBuilder = class {
|
|
41846
42034
|
}
|
41847
42035
|
};
|
41848
42036
|
|
41849
|
-
// source/analysis/semantic-context/SemanticContextValidatingNameConflicts.ts
|
41850
|
-
var SemanticContextValidatingNameConflictsBase = class extends SemanticContextWithParent {
|
41851
|
-
constructor(analyzer) {
|
41852
|
-
super();
|
41853
|
-
this._memberEntities = new Cached();
|
41854
|
-
this._namedDeclarations = new Cached();
|
41855
|
-
this._typesOrContainerWithTypes = new Cached();
|
41856
|
-
this._namedDeclarationsByName = new Cached();
|
41857
|
-
this._typesOrContainerWithTypesByName = new Cached();
|
41858
|
-
this._analyzer = analyzer;
|
41859
|
-
}
|
41860
|
-
get memberEntities() {
|
41861
|
-
return this._memberEntities.getOrInsertWith(() => this.createMemberEntities());
|
41862
|
-
}
|
41863
|
-
get namedDeclarations() {
|
41864
|
-
return this._namedDeclarations.getOrInsertWith(() => this.createNamedDeclarations());
|
41865
|
-
}
|
41866
|
-
get typesOrContainerWithTypes() {
|
41867
|
-
return this._typesOrContainerWithTypes.getOrInsertWith(() => this.createTypesOrContainerWithTypes());
|
41868
|
-
}
|
41869
|
-
get namedDeclarationsByName() {
|
41870
|
-
return this._namedDeclarationsByName.getOrInsertWith(
|
41871
|
-
() => Query.from(this.namedDeclarations).groupByToMap((d) => d.getName().key, (d) => d)
|
41872
|
-
);
|
41873
|
-
}
|
41874
|
-
get typesOrContainerWithTypesByName() {
|
41875
|
-
return this._typesOrContainerWithTypesByName.getOrInsertWith(
|
41876
|
-
() => Query.from(this.typesOrContainerWithTypes).groupByToMap((d) => d.getName().key, (d) => d)
|
41877
|
-
);
|
41878
|
-
}
|
41879
|
-
getOwnTypesOrContainersWithTypes(_hidingMatcher) {
|
41880
|
-
return this.typesOrContainerWithTypes;
|
41881
|
-
}
|
41882
|
-
getOwnTypesOrContainersWithTypesByName(name, _hidingMatcher) {
|
41883
|
-
const declarations = this.typesOrContainerWithTypesByName.get(name.key);
|
41884
|
-
return declarations ?? [];
|
41885
|
-
}
|
41886
|
-
getOwnNamedDeclarations(_noInstanceMembers, _hidingMatcher) {
|
41887
|
-
return this.namedDeclarations;
|
41888
|
-
}
|
41889
|
-
getOwnNamedDeclarationsByName(name, _noInstanceMembers, _hidingMatcher) {
|
41890
|
-
const declarations = this.namedDeclarationsByName.get(name.key);
|
41891
|
-
return declarations ?? [];
|
41892
|
-
}
|
41893
|
-
validateNameConflicts(diagnostics) {
|
41894
|
-
const membersByNameKey = this.getMemberEntityDictionary();
|
41895
|
-
const sourceFile = TreeQuery.fromNode(this.node).projectSourceFile(this._analyzer);
|
41896
|
-
for (const members of membersByNameKey.values()) {
|
41897
|
-
if (members.length > 1) {
|
41898
|
-
if (members.every((m) => m.kind === 1 /* Function */)) {
|
41899
|
-
this.validateNestedFunctionsConflicts(members, sourceFile, diagnostics);
|
41900
|
-
} else {
|
41901
|
-
const diagnosticData = DiagnosticData.withCode(292 /* ScopeAlreadyContainsDeclarationWithTheSameName */);
|
41902
|
-
const preferSetterParameter = this.getContainingSubprogram()?.kind === "setter";
|
41903
|
-
for (const member of members) {
|
41904
|
-
const diagnosticRange = getDiagnosticRange(member, preferSetterParameter);
|
41905
|
-
if (diagnosticRange !== void 0) {
|
41906
|
-
diagnostics.addDiagnostic(new Diagnostic(
|
41907
|
-
diagnosticData,
|
41908
|
-
new DiagnosticLocation(diagnosticRange, sourceFile)
|
41909
|
-
));
|
41910
|
-
}
|
41911
|
-
}
|
41912
|
-
}
|
41913
|
-
}
|
41914
|
-
}
|
41915
|
-
}
|
41916
|
-
getMemberEntityDictionary() {
|
41917
|
-
if (this._memberEntitiesByNameKey === void 0) {
|
41918
|
-
this._memberEntitiesByNameKey = Query.from(this.memberEntities).groupByToMap((e) => e.getName().key, (d) => d);
|
41919
|
-
}
|
41920
|
-
return this._memberEntitiesByNameKey;
|
41921
|
-
}
|
41922
|
-
validateNestedFunctionsConflicts(entities, sourceFile, diagnostics) {
|
41923
|
-
for (const entity of entities) {
|
41924
|
-
for (const entityToCheckAgainst of entities) {
|
41925
|
-
if (entityToCheckAgainst === entity) {
|
41926
|
-
continue;
|
41927
|
-
}
|
41928
|
-
if (this._analyzer.conflictsCheck.doFunctionSignaturesConflict(entity, entityToCheckAgainst)) {
|
41929
|
-
const diagnosticRange = getDiagnosticRange(entity);
|
41930
|
-
if (diagnosticRange !== void 0) {
|
41931
|
-
const diagnosticData = DiagnosticData.withCode(
|
41932
|
-
293 /* ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes */
|
41933
|
-
);
|
41934
|
-
diagnostics.addDiagnostic(new Diagnostic(
|
41935
|
-
diagnosticData,
|
41936
|
-
new DiagnosticLocation(diagnosticRange, sourceFile)
|
41937
|
-
));
|
41938
|
-
}
|
41939
|
-
break;
|
41940
|
-
}
|
41941
|
-
}
|
41942
|
-
}
|
41943
|
-
}
|
41944
|
-
createNamedDeclarations() {
|
41945
|
-
return this.memberEntities.map((e) => {
|
41946
|
-
switch (e.kind) {
|
41947
|
-
case 0 /* Variable */:
|
41948
|
-
return new NamedDeclaration_variable(new NamedDeclarationVariable_entity(e));
|
41949
|
-
case 1 /* Function */:
|
41950
|
-
return new NamedDeclaration_function(new NamedDeclarationFunction_entity(e));
|
41951
|
-
case 2 /* Type */:
|
41952
|
-
return new NamedDeclaration_type(e);
|
41953
|
-
default:
|
41954
|
-
Debug.never(e);
|
41955
|
-
}
|
41956
|
-
});
|
41957
|
-
}
|
41958
|
-
createTypesOrContainerWithTypes() {
|
41959
|
-
return this.createMemberEntitiesForTypeLookup().map((e) => new NamedDeclaration_type(e));
|
41960
|
-
}
|
41961
|
-
};
|
41962
|
-
function getDiagnosticRange(entity, preferSetterParameter = false) {
|
41963
|
-
switch (entity.kind) {
|
41964
|
-
case 0 /* Variable */: {
|
41965
|
-
const definition = entity.getDefinition();
|
41966
|
-
if (definition.kind !== 0 /* Source */) {
|
41967
|
-
return void 0;
|
41968
|
-
}
|
41969
|
-
if (definition.value.kind === "single") {
|
41970
|
-
return definition.value.node.name.rangeWithoutTrivia;
|
41971
|
-
} else if (definition.value.kind === "multi") {
|
41972
|
-
if (definition.value.nodes.length === 1) {
|
41973
|
-
return definition.value.nodes[0].name.rangeWithoutTrivia;
|
41974
|
-
} else if (definition.value.nodes.length > 1) {
|
41975
|
-
if (definition.value.nodes.every((n) => n.kind === 148 /* ParameterDeclaration */)) {
|
41976
|
-
const getterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 45 /* IndexedElementGetterDeclaration */);
|
41977
|
-
const setterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 46 /* IndexedElementSetterDeclaration */);
|
41978
|
-
if (setterParameterDeclaration !== void 0 && preferSetterParameter) {
|
41979
|
-
return setterParameterDeclaration.name.rangeWithoutTrivia;
|
41980
|
-
}
|
41981
|
-
return getterParameterDeclaration?.name.rangeWithoutTrivia ?? setterParameterDeclaration?.name.rangeWithoutTrivia;
|
41982
|
-
}
|
41983
|
-
return definition.value.nodes[0].name.rangeWithTrivia;
|
41984
|
-
} else {
|
41985
|
-
return void 0;
|
41986
|
-
}
|
41987
|
-
} else {
|
41988
|
-
Debug.never(definition.value);
|
41989
|
-
}
|
41990
|
-
}
|
41991
|
-
case 1 /* Function */: {
|
41992
|
-
const definition = entity.getDefinition();
|
41993
|
-
if (definition.kind !== 0 /* Source */) {
|
41994
|
-
return void 0;
|
41995
|
-
}
|
41996
|
-
return definition.node.name.rangeWithoutTrivia;
|
41997
|
-
}
|
41998
|
-
case 2 /* Type */: {
|
41999
|
-
const definition = entity.getDefinition();
|
42000
|
-
if (definition.kind !== 0 /* Source */) {
|
42001
|
-
return void 0;
|
42002
|
-
}
|
42003
|
-
return definition.node.name.rangeWithoutTrivia;
|
42004
|
-
}
|
42005
|
-
default:
|
42006
|
-
Debug.never(entity);
|
42007
|
-
}
|
42008
|
-
}
|
42009
|
-
|
42010
42037
|
// source/analysis/semantic-context/SourceFileSemanticContext.ts
|
42011
42038
|
var SourceFileSemanticContext = class extends SemanticContextBase {
|
42012
42039
|
constructor(analyzer, node) {
|
@@ -42980,7 +43007,7 @@ var Analyzer = class _Analyzer {
|
|
42980
43007
|
if (member?.kind !== "method") {
|
42981
43008
|
const diagnosticArgumentFactory = semanticContext.getDiagnosticArgumentFactory();
|
42982
43009
|
const diagnostic = this.createNodeDiagnostic(
|
42983
|
-
|
43010
|
+
363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */,
|
42984
43011
|
node,
|
42985
43012
|
[diagnosticArgumentFactory.createDisplayableType(type), enumeratorMethodName]
|
42986
43013
|
);
|
@@ -42993,7 +43020,7 @@ var Analyzer = class _Analyzer {
|
|
42993
43020
|
} else {
|
42994
43021
|
const diagnosticArgumentFactory = semanticContext.getDiagnosticArgumentFactory();
|
42995
43022
|
const diagnostic = this.createNodeDiagnostic(
|
42996
|
-
|
43023
|
+
364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */,
|
42997
43024
|
node,
|
42998
43025
|
[diagnosticArgumentFactory.createDisplayableTypeMember(member)]
|
42999
43026
|
);
|
@@ -43235,7 +43262,7 @@ var Analyzer = class _Analyzer {
|
|
43235
43262
|
case 69 /* AutotypeCallExpression */:
|
43236
43263
|
matchResult = this.argumentToParameterMatchResult.ofAutotypeCallExpression(node.parent.parent);
|
43237
43264
|
break;
|
43238
|
-
case
|
43265
|
+
case 150 /* Tag */:
|
43239
43266
|
matchResult = this.argumentToParameterMatchResult.ofTag(node.parent.parent);
|
43240
43267
|
break;
|
43241
43268
|
case 70 /* IndexedAccessExpression */:
|
@@ -44088,9 +44115,11 @@ var Analyzer = class _Analyzer {
|
|
44088
44115
|
return __async(this, null, function* () {
|
44089
44116
|
let result = this._packageAndStaticVariablesInitializationDiagnostics.get(pkg);
|
44090
44117
|
if (result === void 0) {
|
44091
|
-
const usageCountResults =
|
44092
|
-
|
44093
|
-
|
44118
|
+
const usageCountResults = new Array();
|
44119
|
+
for (const sourceFile of pkg.sourceFiles) {
|
44120
|
+
const usageCountResult = yield this.getDeclarationsUsageCount(sourceFile.getSyntaxNode(), cancellationToken);
|
44121
|
+
usageCountResults.push(usageCountResult);
|
44122
|
+
}
|
44094
44123
|
const diagnostics = new AccumulatingDiagnosticAcceptor();
|
44095
44124
|
const validator = new PackageAndStaticVariablesInitializationValidator(this, pkg, usageCountResults, diagnostics);
|
44096
44125
|
validator.validate();
|
@@ -44258,7 +44287,7 @@ var Analyzer = class _Analyzer {
|
|
44258
44287
|
}
|
44259
44288
|
break;
|
44260
44289
|
}
|
44261
|
-
case
|
44290
|
+
case 145 /* VariantDeclaration */: {
|
44262
44291
|
variables.push(this.entity.ofVariantDeclaration(member));
|
44263
44292
|
break;
|
44264
44293
|
}
|
@@ -44526,7 +44555,7 @@ var Analyzer = class _Analyzer {
|
|
44526
44555
|
case 36 /* PackageVariantTypeDeclaration */:
|
44527
44556
|
semanticContext = this.semanticContext.outermostSemanticContextOfTypeDeclaration(node);
|
44528
44557
|
break;
|
44529
|
-
case
|
44558
|
+
case 146 /* TypeParameterDeclaration */:
|
44530
44559
|
semanticContext = this.semanticContext.containing(node);
|
44531
44560
|
break;
|
44532
44561
|
default:
|
@@ -44568,7 +44597,7 @@ var Analyzer = class _Analyzer {
|
|
44568
44597
|
}
|
44569
44598
|
determineUnderlyingTypeOfSourceVariantType(memberList) {
|
44570
44599
|
let result;
|
44571
|
-
const variants = Query.from(flattenTypeMemberDeclarationList(memberList)).filter((m) => m.kind ===
|
44600
|
+
const variants = Query.from(flattenTypeMemberDeclarationList(memberList)).filter((m) => m.kind === 145 /* VariantDeclaration */);
|
44572
44601
|
const standardTypes = this.getLocalizedStandardTypes(TreeQuery.fromNode(memberList).locale(this));
|
44573
44602
|
for (const variant of variants) {
|
44574
44603
|
if (variant.value !== void 0) {
|
@@ -44888,7 +44917,7 @@ var Type = class {
|
|
44888
44917
|
case 74 /* ConditionalExpression */:
|
44889
44918
|
return this.ofConditionalExpression(node, targetTypeHint);
|
44890
44919
|
case 79 /* TextTemplateLiteral */:
|
44891
|
-
return this.ofTextTemplateLiteral(node);
|
44920
|
+
return this.ofTextTemplateLiteral(node, targetTypeHint);
|
44892
44921
|
case 86 /* IdentifierExpression */:
|
44893
44922
|
return this.ofIdentifierExpression(node, targetTypeHint);
|
44894
44923
|
case 82 /* TokenExpression */:
|
@@ -45211,8 +45240,33 @@ var Type = class {
|
|
45211
45240
|
}
|
45212
45241
|
return this._analyzer.typeFactory.getUnionType([firstExpressionType, secondExpressionType], true);
|
45213
45242
|
}
|
45214
|
-
|
45215
|
-
|
45243
|
+
/**
|
45244
|
+
* По умолчанию литерал шаблона текста имеет тип Текст.
|
45245
|
+
*
|
45246
|
+
* Литерал шаблона текста имеет тип ШаблонТекста в следующих случаях:
|
45247
|
+
* - если он присваивается в переменную, имеющую тип ШаблонТекста;
|
45248
|
+
* - если он присваивается в переменную, имеющую союзный тип, содержащий тип ШаблонТекста
|
45249
|
+
* и не содержащий тип Текст.
|
45250
|
+
*/
|
45251
|
+
ofTextTemplateLiteral(node, targetTypeHint) {
|
45252
|
+
const standardTypes = this._analyzer.getLocalizedStandardTypes(
|
45253
|
+
TreeQuery.fromNode(node).locale(this._analyzer)
|
45254
|
+
);
|
45255
|
+
let targetType = this._analyzer.getTargetTypeOfExpression(node, targetTypeHint);
|
45256
|
+
if (targetType !== void 0) {
|
45257
|
+
targetType = unaliasType(targetType);
|
45258
|
+
}
|
45259
|
+
let nodeIsTemplateNotText;
|
45260
|
+
if (targetType === void 0) {
|
45261
|
+
nodeIsTemplateNotText = false;
|
45262
|
+
} else if (targetType.equals(standardTypes.textTemplate)) {
|
45263
|
+
nodeIsTemplateNotText = true;
|
45264
|
+
} else if (targetType.kind === "union") {
|
45265
|
+
nodeIsTemplateNotText = targetType.unaliasedFlattenedTypes.some((t) => t.equals(standardTypes.textTemplate)) && !targetType.unaliasedFlattenedTypes.some((t) => t.equals(standardTypes.text));
|
45266
|
+
} else {
|
45267
|
+
nodeIsTemplateNotText = false;
|
45268
|
+
}
|
45269
|
+
return nodeIsTemplateNotText ? standardTypes.textTemplate : standardTypes.text;
|
45216
45270
|
}
|
45217
45271
|
ofIdentifierExpression(node, targetTypeHint) {
|
45218
45272
|
const meaning = this._analyzer.resolveIdentifierExpression(node, targetTypeHint).meaning;
|
@@ -45520,7 +45574,7 @@ var TargetType = class {
|
|
45520
45574
|
return this.getTargetTypeOfChildOfAssignmentStatement(node.parent, node);
|
45521
45575
|
case 64 /* BinaryExpression */:
|
45522
45576
|
return this.getTargetTypeOfChildOfBinaryExpression(node.parent, node);
|
45523
|
-
case
|
45577
|
+
case 148 /* Argument */:
|
45524
45578
|
return this.getTargetTypeOfChildOfArgument(node.parent, node);
|
45525
45579
|
case 68 /* CallExpression */:
|
45526
45580
|
return this.getTargetTypeOfChildOfCallExpression(node.parent, node);
|
@@ -45544,7 +45598,7 @@ var TargetType = class {
|
|
45544
45598
|
return this.getTargetTypeOfChildOfIsExpression(node.parent, node);
|
45545
45599
|
case 57 /* LocalVariableDeclaration */:
|
45546
45600
|
return this.getTargetTypeOfChildOfLocalVariableDeclaration(node.parent, node);
|
45547
|
-
case
|
45601
|
+
case 147 /* ParameterDeclaration */:
|
45548
45602
|
return this.getTargetTypeOfChildOfParameterDeclaration(node.parent, node);
|
45549
45603
|
case 73 /* ParenthesizedExpression */:
|
45550
45604
|
return this.getTargetTypeOfChildOfParenthesizedExpression(node.parent, node);
|
@@ -45570,7 +45624,7 @@ var TargetType = class {
|
|
45570
45624
|
return this.getTargetTypeOfChildOfSwitchStatement(node.parent, node);
|
45571
45625
|
case 118 /* MatchExpressionList */:
|
45572
45626
|
return this.getTargetTypeOfChildOfMatchExpressionList(node.parent, node);
|
45573
|
-
case
|
45627
|
+
case 145 /* VariantDeclaration */:
|
45574
45628
|
return this.getTargetTypeOfChildOfVariantDeclaration(node.parent, node);
|
45575
45629
|
case 120 /* WhileStatement */:
|
45576
45630
|
return this.getTargetTypeOfChildOfWhileStatement(node.parent, node);
|
@@ -45582,7 +45636,7 @@ var TargetType = class {
|
|
45582
45636
|
return this.getTargetTypeOfChildOfElseIfClause(node.parent, node);
|
45583
45637
|
case 92 /* FunctionBlock */:
|
45584
45638
|
return this.getTargetTypeOfChildOfFunctionBlock(node.parent, node);
|
45585
|
-
case
|
45639
|
+
case 140 /* TextTranslation */:
|
45586
45640
|
return this.getTargetTypeOfChildOfTextTemplateLiteralTranslation(node.parent, node);
|
45587
45641
|
default:
|
45588
45642
|
Debug.never(node.parent);
|
@@ -45813,8 +45867,8 @@ var TargetType = class {
|
|
45813
45867
|
createTranslationFunctionTypeFromTextTemplate(node) {
|
45814
45868
|
if (node.translatedTextOrTranslationFunction.kind === 65 /* FunctionLiteral */ || node.translatedTextOrTranslationFunction.kind === 66 /* FunctionBlockLiteral */) {
|
45815
45869
|
const parameters = [];
|
45816
|
-
const
|
45817
|
-
const standardTypes = this._analyzer.getLocalizedStandardTypes(
|
45870
|
+
const locale = TreeQuery.fromNode(node).locale(this._analyzer);
|
45871
|
+
const standardTypes = this._analyzer.getLocalizedStandardTypes(locale);
|
45818
45872
|
const returnType = standardTypes.text;
|
45819
45873
|
const containingPackage = TreeQuery.fromNode(node).packageEntity(this._analyzer);
|
45820
45874
|
const isAsync = false;
|
@@ -45831,27 +45885,26 @@ var TargetType = class {
|
|
45831
45885
|
)
|
45832
45886
|
)
|
45833
45887
|
);
|
45834
|
-
|
45835
|
-
const
|
45836
|
-
|
45837
|
-
|
45838
|
-
const
|
45839
|
-
|
45840
|
-
|
45841
|
-
|
45842
|
-
|
45843
|
-
|
45888
|
+
if (node.sourceText.kind === 141 /* TranslationTextTemplate */) {
|
45889
|
+
const templateSpans = node.sourceText.spanList.spans;
|
45890
|
+
for (let i = 0; i < templateSpans.length; i++) {
|
45891
|
+
const span = templateSpans[i];
|
45892
|
+
const parameter = span.parameter;
|
45893
|
+
if (parameter.kind === 144 /* TranslationTextTemplateParameterDeclaration */) {
|
45894
|
+
const parameterEntity = this._analyzer.entity.ofTranslationTextTemplateParameterDeclaration(parameter);
|
45895
|
+
const name = parameterEntity.getName();
|
45896
|
+
const parameterType = parameterEntity.getType();
|
45897
|
+
parameters.push(
|
45898
|
+
new IntrinsicParameterVariableEntity(
|
45899
|
+
name,
|
45900
|
+
parameterType,
|
45901
|
+
new ParameterVariableEntityContainer.Entity(unfinishedEntity.unfinishedValue),
|
45902
|
+
false,
|
45903
|
+
false,
|
45904
|
+
new TextTemplateFunctionTypeParameterSpecialVariableEntityInfo(parameterEntity)
|
45905
|
+
)
|
45906
|
+
);
|
45844
45907
|
}
|
45845
|
-
parameters.push(
|
45846
|
-
new IntrinsicParameterVariableEntity(
|
45847
|
-
name,
|
45848
|
-
parameterType,
|
45849
|
-
new ParameterVariableEntityContainer.Entity(unfinishedEntity.unfinishedValue),
|
45850
|
-
false,
|
45851
|
-
false,
|
45852
|
-
void 0
|
45853
|
-
)
|
45854
|
-
);
|
45855
45908
|
}
|
45856
45909
|
}
|
45857
45910
|
const entity = unfinishedEntity.finish([], parameters);
|
@@ -45929,6 +45982,7 @@ var Entity6 = class {
|
|
45929
45982
|
this._setterEntities = /* @__PURE__ */ new Map();
|
45930
45983
|
this._typeExtensionEntities = /* @__PURE__ */ new Map();
|
45931
45984
|
this._packageAliasEntities = /* @__PURE__ */ new Map();
|
45985
|
+
this._translationTextTemplateParameterDeclarationEntities = /* @__PURE__ */ new Map();
|
45932
45986
|
}
|
45933
45987
|
ofPackage(pkg) {
|
45934
45988
|
let result = this._packageEntities.get(pkg);
|
@@ -46331,6 +46385,14 @@ var Entity6 = class {
|
|
46331
46385
|
Debug.never(node);
|
46332
46386
|
}
|
46333
46387
|
}
|
46388
|
+
ofTranslationTextTemplateParameterDeclaration(node) {
|
46389
|
+
let result = this._translationTextTemplateParameterDeclarationEntities.get(node);
|
46390
|
+
if (result === void 0) {
|
46391
|
+
result = new TranslationTextTemplateParameterDeclarationEntity(this._analyzer, node);
|
46392
|
+
this._translationTextTemplateParameterDeclarationEntities.set(node, result);
|
46393
|
+
}
|
46394
|
+
return result;
|
46395
|
+
}
|
46334
46396
|
getContainingPackageLoadedFromDts(node) {
|
46335
46397
|
const pkg = TreeQuery.fromNode(node).projectSourceFile(this._analyzer).package;
|
46336
46398
|
if (pkg.kind === "program" && pkg.configuration.targetPlatform?.kind === "javascript" && pkg.configuration.targetPlatform.interfacePackageImplementation?.loadFromDts === true) {
|
@@ -48857,7 +48919,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48857
48919
|
const diagnosticArgumentFactory = this.semanticContext.getDiagnosticArgumentFactory();
|
48858
48920
|
for (const field of fields) {
|
48859
48921
|
const data = DiagnosticData.withCode(
|
48860
|
-
|
48922
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48861
48923
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48862
48924
|
);
|
48863
48925
|
const location = this.getFieldDiagnosticLocationWithFallback(field);
|
@@ -48894,7 +48956,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48894
48956
|
for (const field of fields) {
|
48895
48957
|
if (!initializedFields.has(field.getOriginalEntity())) {
|
48896
48958
|
const data = DiagnosticData.withCode(
|
48897
|
-
|
48959
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48898
48960
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48899
48961
|
);
|
48900
48962
|
const location = this.getFieldDiagnosticLocationWithFallback(field);
|
@@ -48921,7 +48983,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48921
48983
|
const assignmentChecker = new AssignmentChecker(this._analyzer, reference, controlFlowNodeEndingConstructor);
|
48922
48984
|
if (!assignmentChecker.checkVariableIsAssigned()) {
|
48923
48985
|
this._diagnostics.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
48924
|
-
|
48986
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48925
48987
|
node.creationKeyword,
|
48926
48988
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48927
48989
|
));
|
@@ -49246,7 +49308,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
49246
49308
|
this.checkDereferenceExpression(node);
|
49247
49309
|
break;
|
49248
49310
|
}
|
49249
|
-
case
|
49311
|
+
case 150 /* Tag */: {
|
49250
49312
|
const { diagnostic } = this._analyzer.resolveTag(node);
|
49251
49313
|
this.addDiagnostic(diagnostic);
|
49252
49314
|
const matchResult = this._analyzer.argumentToParameterMatchResult.ofTag(node);
|
@@ -49348,87 +49410,10 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
49348
49410
|
case 134 /* PackageImportTranslation */: {
|
49349
49411
|
break;
|
49350
49412
|
}
|
49351
|
-
case
|
49352
|
-
|
49353
|
-
|
49354
|
-
|
49355
|
-
if (parametersAreNames) {
|
49356
|
-
const names = sourceSpans.map((span) => {
|
49357
|
-
Debug.assert(span.parameter.kind === 145 /* TranslationTextTemplateParameterDeclaration */);
|
49358
|
-
return span.parameter.name.value;
|
49359
|
-
});
|
49360
|
-
switch (node.translatedTextOrTranslationFunction.kind) {
|
49361
|
-
case 0 /* Token */:
|
49362
|
-
break;
|
49363
|
-
case 79 /* TextTemplateLiteral */: {
|
49364
|
-
const targetSpans = node.translatedTextOrTranslationFunction.spanList.spans;
|
49365
|
-
targetSpans.forEach((span) => {
|
49366
|
-
if (span.expression.kind === 86 /* IdentifierExpression */) {
|
49367
|
-
if (!names.includes(span.expression.identifier.value)) {
|
49368
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49369
|
-
359 /* UnknownParameterOfTextTemplateTranslation */,
|
49370
|
-
span.expression
|
49371
|
-
));
|
49372
|
-
}
|
49373
|
-
} else {
|
49374
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49375
|
-
357 /* OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral */,
|
49376
|
-
span.expression
|
49377
|
-
));
|
49378
|
-
}
|
49379
|
-
});
|
49380
|
-
break;
|
49381
|
-
}
|
49382
|
-
case 66 /* FunctionBlockLiteral */:
|
49383
|
-
case 65 /* FunctionLiteral */: {
|
49384
|
-
break;
|
49385
|
-
}
|
49386
|
-
}
|
49387
|
-
} else {
|
49388
|
-
if (parametersAreIndexes) {
|
49389
|
-
sourceSpans.forEach((span, i) => {
|
49390
|
-
Debug.assert(span.parameter.kind === 0 /* Token */ && span.parameter.tokenKind === 2 /* IntegerLiteral */);
|
49391
|
-
if (Number.parseInt(span.parameter.value) !== i) {
|
49392
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49393
|
-
355 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */,
|
49394
|
-
span.parameter,
|
49395
|
-
[i.toString()]
|
49396
|
-
));
|
49397
|
-
}
|
49398
|
-
});
|
49399
|
-
switch (node.translatedTextOrTranslationFunction.kind) {
|
49400
|
-
case 0 /* Token */:
|
49401
|
-
break;
|
49402
|
-
case 79 /* TextTemplateLiteral */: {
|
49403
|
-
const targetSpans = node.translatedTextOrTranslationFunction.spanList.spans;
|
49404
|
-
targetSpans.forEach((span, i) => {
|
49405
|
-
if (!(span.expression.kind === 82 /* TokenExpression */ && span.expression.token.tokenKind === 2 /* IntegerLiteral */ && isNumberInRange(Number.parseInt(span.expression.token.value), 0, sourceSpans.length))) {
|
49406
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49407
|
-
356 /* OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral */,
|
49408
|
-
span.expression,
|
49409
|
-
[sourceSpans.length - 1]
|
49410
|
-
));
|
49411
|
-
}
|
49412
|
-
});
|
49413
|
-
break;
|
49414
|
-
}
|
49415
|
-
case 66 /* FunctionBlockLiteral */:
|
49416
|
-
case 65 /* FunctionLiteral */: {
|
49417
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49418
|
-
358 /* TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate */,
|
49419
|
-
node.translatedTextOrTranslationFunction
|
49420
|
-
));
|
49421
|
-
break;
|
49422
|
-
}
|
49423
|
-
}
|
49424
|
-
} else {
|
49425
|
-
sourceSpans.forEach((span) => {
|
49426
|
-
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49427
|
-
354 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */,
|
49428
|
-
span.parameter
|
49429
|
-
));
|
49430
|
-
});
|
49431
|
-
}
|
49413
|
+
case 140 /* TextTranslation */: {
|
49414
|
+
if (node.sourceText.kind === 141 /* TranslationTextTemplate */) {
|
49415
|
+
const semanticContext = this._analyzer.semanticContext.ofTranslationTextTemplate(node.sourceText);
|
49416
|
+
semanticContext.validateNameConflicts(this._diagnosticAcceptor);
|
49432
49417
|
}
|
49433
49418
|
break;
|
49434
49419
|
}
|
@@ -49676,7 +49661,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
49676
49661
|
const underlyingType = this._analyzer.entity.ofVariantTypeDeclaration(node.parent).getUnderlyingType();
|
49677
49662
|
const isIntegerVariant = underlyingType.equals(this._analyzer.originalStandardTypes.integer);
|
49678
49663
|
for (const member of node.memberBlock.memberList.members) {
|
49679
|
-
if (member.kind ===
|
49664
|
+
if (member.kind === 145 /* VariantDeclaration */) {
|
49680
49665
|
if (member.value === void 0 && !isIntegerVariant) {
|
49681
49666
|
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
49682
49667
|
240 /* VariantMustHaveAssociatedValue */,
|
@@ -49753,7 +49738,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
49753
49738
|
).validate();
|
49754
49739
|
break;
|
49755
49740
|
}
|
49756
|
-
case
|
49741
|
+
case 146 /* TypeParameterDeclaration */: {
|
49757
49742
|
const entity = this._analyzer.entity.ofTypeParameterDeclaration(node);
|
49758
49743
|
if (entity.getConstraint().causesCycle) {
|
49759
49744
|
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
@@ -49786,7 +49771,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
49786
49771
|
this.checkIfVariableIsUnused(entity, node.name);
|
49787
49772
|
break;
|
49788
49773
|
}
|
49789
|
-
case
|
49774
|
+
case 147 /* ParameterDeclaration */: {
|
49790
49775
|
this.checkParameterDeclaration(node);
|
49791
49776
|
break;
|
49792
49777
|
}
|
@@ -50818,6 +50803,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
50818
50803
|
this.checkAssignmentToField(entity, assignmentNode, nodeForDiagnostic, void 0);
|
50819
50804
|
break;
|
50820
50805
|
case "parameter":
|
50806
|
+
case "text-template-parameter":
|
50821
50807
|
case "local": {
|
50822
50808
|
if (entity.isConstant()) {
|
50823
50809
|
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
@@ -51327,9 +51313,6 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
51327
51313
|
}
|
51328
51314
|
}
|
51329
51315
|
};
|
51330
|
-
function isNumberInRange(num, inclusiveLowerBound, exclusiveUpperBound) {
|
51331
|
-
return num >= inclusiveLowerBound && num < exclusiveUpperBound;
|
51332
|
-
}
|
51333
51316
|
var requiredParameterCountBySyntacticalOperatorKind = {
|
51334
51317
|
[0 /* Plus */]: 1 /* ZeroOrOne */,
|
51335
51318
|
[1 /* Minus */]: 1 /* ZeroOrOne */,
|
@@ -64497,7 +64480,7 @@ var IrBuilder = class {
|
|
64497
64480
|
buildPackageVariantTypeDeclaration(declaration) {
|
64498
64481
|
const modifiers = new Modifiers();
|
64499
64482
|
const underlyingTypeKind = this.getUnderlyingTypeKind(this._analyzer.entity.ofPackageVariantTypeDeclaration(declaration));
|
64500
|
-
const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind ===
|
64483
|
+
const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 145 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
|
64501
64484
|
const originalEntity = this._analyzer.entity.ofPackageVariantTypeDeclaration(declaration);
|
64502
64485
|
const entity = this._entityMap.getVariantTypeEntity(originalEntity);
|
64503
64486
|
return new PackageVariantTypeDeclaration3(
|
@@ -64570,7 +64553,7 @@ var IrBuilder = class {
|
|
64570
64553
|
case 55 /* InvalidTypeMemberDeclaration */:
|
64571
64554
|
Logger.errorAtNode("Unexpected invalid structured type member.", member);
|
64572
64555
|
break;
|
64573
|
-
case
|
64556
|
+
case 145 /* VariantDeclaration */:
|
64574
64557
|
break;
|
64575
64558
|
case 53 /* FieldGetterDeclaration */:
|
64576
64559
|
case 54 /* FieldSetterDeclaration */: {
|
@@ -65276,13 +65259,13 @@ var IrBuilder = class {
|
|
65276
65259
|
}
|
65277
65260
|
applyImplicitConversionIfRequired(expression, expressionIr) {
|
65278
65261
|
if (this.expressionCanBeImplicitlyConverted(expression)) {
|
65262
|
+
if (expression.kind === 79 /* TextTemplateLiteral */ && this._analyzer.type.ofExpression(expression).equals(this._analyzer.originalStandardTypes.text)) {
|
65263
|
+
return this.convertTextTemplateToText(expressionIr);
|
65264
|
+
}
|
65279
65265
|
let targetType = this._analyzer.getTargetTypeOfExpression(expression);
|
65280
65266
|
if (targetType !== void 0) {
|
65281
65267
|
targetType = unaliasType(this._analyzer.excludeNoneFromType(targetType));
|
65282
65268
|
}
|
65283
|
-
if (expression.kind === 79 /* TextTemplateLiteral */ && targetType === void 0) {
|
65284
|
-
return this.convertTextTemplateToText(expressionIr);
|
65285
|
-
}
|
65286
65269
|
if (targetType !== void 0) {
|
65287
65270
|
const expressionType = this._analyzer.type.ofExpression(expression);
|
65288
65271
|
if (expressionType.equals(this._analyzer.originalStandardTypes.textTemplate)) {
|
@@ -66304,7 +66287,7 @@ var IrBuilder = class {
|
|
66304
66287
|
buildAnonymousVariantTypeDeclaration(declaration) {
|
66305
66288
|
const modifiers = new Modifiers();
|
66306
66289
|
const underlyingTypeKind = this.getUnderlyingTypeKind(this._analyzer.entity.ofAnonymousVariantTypeDeclaration(declaration));
|
66307
|
-
const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind ===
|
66290
|
+
const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 145 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
|
66308
66291
|
const originalEntity = this._analyzer.entity.ofAnonymousVariantTypeDeclaration(declaration);
|
66309
66292
|
const entity = this._entityMap.getVariantTypeEntity(originalEntity);
|
66310
66293
|
return new PackageVariantTypeDeclaration3(
|
@@ -69054,6 +69037,7 @@ export {
|
|
69054
69037
|
ValueSpecialVariableEntityInfo,
|
69055
69038
|
BackingSpecialVariableEntityInfo,
|
69056
69039
|
ImplicitFunctionBlockParameterSpecialVariableEntityInfo,
|
69040
|
+
TextTemplateFunctionTypeParameterSpecialVariableEntityInfo,
|
69057
69041
|
PackageVariableDeclarationEntity,
|
69058
69042
|
ComputedPackageVariableDeclarationEntity,
|
69059
69043
|
FieldDeclarationEntity,
|
@@ -69069,6 +69053,7 @@ export {
|
|
69069
69053
|
IntrinsicFieldEntity,
|
69070
69054
|
IntrinsicParameterVariableEntity,
|
69071
69055
|
IntrinsicLocalVariableEntity,
|
69056
|
+
TranslationTextTemplateParameterDeclarationEntity,
|
69072
69057
|
PackageVariantTypeDeclarationEntity,
|
69073
69058
|
AnonymousVariantTypeDeclarationEntity,
|
69074
69059
|
DefinitionKind,
|