@artel/artc 0.6.25241 → 0.6.25243

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.
@@ -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.25241" : "";
623
+ var ArtelVersion = true ? "0.6.25243" : "";
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");
@@ -1172,6 +1172,10 @@ __export(green_exports, {
1172
1172
  TopLevelTranslationList: () => TopLevelTranslationList2,
1173
1173
  TranslationParameterClause: () => TranslationParameterClause2,
1174
1174
  TranslationParameterList: () => TranslationParameterList2,
1175
+ TranslationTextTemplate: () => TranslationTextTemplate2,
1176
+ TranslationTextTemplateParameter: () => TranslationTextTemplateParameter2,
1177
+ TranslationTextTemplateSpan: () => TranslationTextTemplateSpan2,
1178
+ TranslationTextTemplateSpanList: () => TranslationTextTemplateSpanList2,
1175
1179
  TranslationTypeParameterClause: () => TranslationTypeParameterClause2,
1176
1180
  TranslationTypeParameterList: () => TranslationTypeParameterList2,
1177
1181
  TranslationsDeclaration: () => TranslationsDeclaration2,
@@ -1415,21 +1419,25 @@ var NodeKind = /* @__PURE__ */ ((NodeKind3) => {
1415
1419
  NodeKind3[NodeKind3["TypeTranslation"] = 139] = "TypeTranslation";
1416
1420
  NodeKind3[NodeKind3["TextLiteralTranslation"] = 140] = "TextLiteralTranslation";
1417
1421
  NodeKind3[NodeKind3["TextTemplateLiteralTranslation"] = 141] = "TextTemplateLiteralTranslation";
1418
- NodeKind3[NodeKind3["VariantDeclaration"] = 142] = "VariantDeclaration";
1419
- NodeKind3[NodeKind3["TypeParameterDeclaration"] = 143] = "TypeParameterDeclaration";
1420
- NodeKind3[NodeKind3["ParameterDeclaration"] = 144] = "ParameterDeclaration";
1421
- NodeKind3[NodeKind3["Argument"] = 145] = "Argument";
1422
- NodeKind3[NodeKind3["TagList"] = 146] = "TagList";
1423
- NodeKind3[NodeKind3["Tag"] = 147] = "Tag";
1424
- NodeKind3[NodeKind3["ModifierList"] = 148] = "ModifierList";
1425
- NodeKind3[NodeKind3["Modifier"] = 149] = "Modifier";
1426
- NodeKind3[NodeKind3["ParameterClause"] = 150] = "ParameterClause";
1427
- NodeKind3[NodeKind3["ParameterList"] = 151] = "ParameterList";
1428
- NodeKind3[NodeKind3["TypeArgumentClause"] = 152] = "TypeArgumentClause";
1429
- NodeKind3[NodeKind3["TypeArgumentList"] = 153] = "TypeArgumentList";
1430
- NodeKind3[NodeKind3["TypeParameterClause"] = 154] = "TypeParameterClause";
1431
- NodeKind3[NodeKind3["TypeParameterList"] = 155] = "TypeParameterList";
1432
- NodeKind3[NodeKind3["TypeAnnotation"] = 156] = "TypeAnnotation";
1422
+ NodeKind3[NodeKind3["TranslationTextTemplate"] = 142] = "TranslationTextTemplate";
1423
+ NodeKind3[NodeKind3["TranslationTextTemplateSpanList"] = 143] = "TranslationTextTemplateSpanList";
1424
+ NodeKind3[NodeKind3["TranslationTextTemplateSpan"] = 144] = "TranslationTextTemplateSpan";
1425
+ NodeKind3[NodeKind3["TranslationTextTemplateParameter"] = 145] = "TranslationTextTemplateParameter";
1426
+ NodeKind3[NodeKind3["VariantDeclaration"] = 146] = "VariantDeclaration";
1427
+ NodeKind3[NodeKind3["TypeParameterDeclaration"] = 147] = "TypeParameterDeclaration";
1428
+ NodeKind3[NodeKind3["ParameterDeclaration"] = 148] = "ParameterDeclaration";
1429
+ NodeKind3[NodeKind3["Argument"] = 149] = "Argument";
1430
+ NodeKind3[NodeKind3["TagList"] = 150] = "TagList";
1431
+ NodeKind3[NodeKind3["Tag"] = 151] = "Tag";
1432
+ NodeKind3[NodeKind3["ModifierList"] = 152] = "ModifierList";
1433
+ NodeKind3[NodeKind3["Modifier"] = 153] = "Modifier";
1434
+ NodeKind3[NodeKind3["ParameterClause"] = 154] = "ParameterClause";
1435
+ NodeKind3[NodeKind3["ParameterList"] = 155] = "ParameterList";
1436
+ NodeKind3[NodeKind3["TypeArgumentClause"] = 156] = "TypeArgumentClause";
1437
+ NodeKind3[NodeKind3["TypeArgumentList"] = 157] = "TypeArgumentList";
1438
+ NodeKind3[NodeKind3["TypeParameterClause"] = 158] = "TypeParameterClause";
1439
+ NodeKind3[NodeKind3["TypeParameterList"] = 159] = "TypeParameterList";
1440
+ NodeKind3[NodeKind3["TypeAnnotation"] = 160] = "TypeAnnotation";
1433
1441
  return NodeKind3;
1434
1442
  })(NodeKind || {});
1435
1443
 
@@ -1826,6 +1834,10 @@ __export(tree_exports, {
1826
1834
  TopLevelTranslationList: () => TopLevelTranslationList,
1827
1835
  TranslationParameterClause: () => TranslationParameterClause,
1828
1836
  TranslationParameterList: () => TranslationParameterList,
1837
+ TranslationTextTemplate: () => TranslationTextTemplate,
1838
+ TranslationTextTemplateParameter: () => TranslationTextTemplateParameter,
1839
+ TranslationTextTemplateSpan: () => TranslationTextTemplateSpan,
1840
+ TranslationTextTemplateSpanList: () => TranslationTextTemplateSpanList,
1829
1841
  TranslationTypeParameterClause: () => TranslationTypeParameterClause,
1830
1842
  TranslationTypeParameterList: () => TranslationTypeParameterList,
1831
1843
  TranslationsDeclaration: () => TranslationsDeclaration,
@@ -4015,9 +4027,9 @@ var TreeQuery = class {
4015
4027
  return analyzer.entity.ofEnumerationVariableDeclaration(parent);
4016
4028
  case 99 /* ErrorVariableDeclaration */:
4017
4029
  return analyzer.entity.ofErrorVariableDeclaration(parent);
4018
- case 144 /* ParameterDeclaration */:
4030
+ case 148 /* ParameterDeclaration */:
4019
4031
  return analyzer.entity.ofParameterDeclaration(parent);
4020
- case 143 /* TypeParameterDeclaration */:
4032
+ case 147 /* TypeParameterDeclaration */:
4021
4033
  return analyzer.entity.ofTypeParameterDeclaration(parent);
4022
4034
  case 31 /* PackageStructuredTypeDeclaration */:
4023
4035
  return analyzer.entity.ofPackageStructuredTypeDeclaration(parent);
@@ -4043,7 +4055,7 @@ var TreeQuery = class {
4043
4055
  return analyzer.entity.ofConstructorDeclaration(parent);
4044
4056
  case 44 /* DestructorDeclaration */:
4045
4057
  return analyzer.entity.ofDestructorDeclaration(parent);
4046
- case 142 /* VariantDeclaration */:
4058
+ case 146 /* VariantDeclaration */:
4047
4059
  return analyzer.entity.ofVariantDeclaration(parent);
4048
4060
  case 38 /* TypeExtensionDeclaration */:
4049
4061
  return analyzer.entity.ofTypeExtensionDeclaration(parent);
@@ -8518,10 +8530,100 @@ var TextTemplateLiteralTranslation = class extends BaseNode {
8518
8530
  ];
8519
8531
  }
8520
8532
  };
8533
+ var TranslationTextTemplate = class extends BaseNode {
8534
+ constructor(green, rangeStart, parent) {
8535
+ super(green, rangeStart, parent);
8536
+ this.kind = 142 /* TranslationTextTemplate */;
8537
+ }
8538
+ get children() {
8539
+ return this._children ??= this.createChildren();
8540
+ }
8541
+ get head() {
8542
+ return this.children[0];
8543
+ }
8544
+ get spanList() {
8545
+ return this.children[1];
8546
+ }
8547
+ get thisAsNode() {
8548
+ return this;
8549
+ }
8550
+ createChildren() {
8551
+ return [
8552
+ this.green.head.toRed(childRangeStart(this, 0), this),
8553
+ this.green.spanList.toRed(childRangeStart(this, 1), this)
8554
+ ];
8555
+ }
8556
+ };
8557
+ var TranslationTextTemplateSpanList = class extends BaseNode {
8558
+ constructor(green, rangeStart, parent) {
8559
+ super(green, rangeStart, parent);
8560
+ this.kind = 143 /* TranslationTextTemplateSpanList */;
8561
+ }
8562
+ get children() {
8563
+ return this._children ??= this.createChildren();
8564
+ }
8565
+ get spans() {
8566
+ return this.children;
8567
+ }
8568
+ get thisAsNode() {
8569
+ return this;
8570
+ }
8571
+ createChildren() {
8572
+ return this.green.spans.map((e, i) => e.toRed(childRangeStart(this, i), this));
8573
+ }
8574
+ };
8575
+ var TranslationTextTemplateSpan = class extends BaseNode {
8576
+ constructor(green, rangeStart, parent) {
8577
+ super(green, rangeStart, parent);
8578
+ this.kind = 144 /* TranslationTextTemplateSpan */;
8579
+ }
8580
+ get children() {
8581
+ return this._children ??= this.createChildren();
8582
+ }
8583
+ get parameter() {
8584
+ return this.children[0];
8585
+ }
8586
+ get text() {
8587
+ return this.children[1];
8588
+ }
8589
+ get thisAsNode() {
8590
+ return this;
8591
+ }
8592
+ createChildren() {
8593
+ return [
8594
+ this.green.parameter.toRed(childRangeStart(this, 0), this),
8595
+ this.green.text.toRed(childRangeStart(this, 1), this)
8596
+ ];
8597
+ }
8598
+ };
8599
+ var TranslationTextTemplateParameter = class extends BaseNode {
8600
+ constructor(green, rangeStart, parent) {
8601
+ super(green, rangeStart, parent);
8602
+ this.kind = 145 /* TranslationTextTemplateParameter */;
8603
+ }
8604
+ get children() {
8605
+ return this._children ??= this.createChildren();
8606
+ }
8607
+ get name() {
8608
+ return this.children[0];
8609
+ }
8610
+ get typeAnnotation() {
8611
+ return this.children[1];
8612
+ }
8613
+ get thisAsNode() {
8614
+ return this;
8615
+ }
8616
+ createChildren() {
8617
+ return [
8618
+ this.green.name.toRed(childRangeStart(this, 0), this),
8619
+ this.green.typeAnnotation?.toRed(childRangeStart(this, 1), this)
8620
+ ];
8621
+ }
8622
+ };
8521
8623
  var VariantDeclaration = class extends BaseNode {
8522
8624
  constructor(green, rangeStart, parent) {
8523
8625
  super(green, rangeStart, parent);
8524
- this.kind = 142 /* VariantDeclaration */;
8626
+ this.kind = 146 /* VariantDeclaration */;
8525
8627
  }
8526
8628
  get children() {
8527
8629
  return this._children ??= this.createChildren();
@@ -8557,7 +8659,7 @@ var VariantDeclaration = class extends BaseNode {
8557
8659
  var TypeParameterDeclaration = class extends BaseNode {
8558
8660
  constructor(green, rangeStart, parent) {
8559
8661
  super(green, rangeStart, parent);
8560
- this.kind = 143 /* TypeParameterDeclaration */;
8662
+ this.kind = 147 /* TypeParameterDeclaration */;
8561
8663
  }
8562
8664
  get children() {
8563
8665
  return this._children ??= this.createChildren();
@@ -8593,7 +8695,7 @@ var TypeParameterDeclaration = class extends BaseNode {
8593
8695
  var ParameterDeclaration = class extends BaseNode {
8594
8696
  constructor(green, rangeStart, parent) {
8595
8697
  super(green, rangeStart, parent);
8596
- this.kind = 144 /* ParameterDeclaration */;
8698
+ this.kind = 148 /* ParameterDeclaration */;
8597
8699
  }
8598
8700
  get children() {
8599
8701
  return this._children ??= this.createChildren();
@@ -8629,7 +8731,7 @@ var ParameterDeclaration = class extends BaseNode {
8629
8731
  var Argument = class extends BaseNode {
8630
8732
  constructor(green, rangeStart, parent) {
8631
8733
  super(green, rangeStart, parent);
8632
- this.kind = 145 /* Argument */;
8734
+ this.kind = 149 /* Argument */;
8633
8735
  }
8634
8736
  get children() {
8635
8737
  return this._children ??= this.createChildren();
@@ -8657,7 +8759,7 @@ var Argument = class extends BaseNode {
8657
8759
  var TagList = class extends BaseNode {
8658
8760
  constructor(green, rangeStart, parent) {
8659
8761
  super(green, rangeStart, parent);
8660
- this.kind = 146 /* TagList */;
8762
+ this.kind = 150 /* TagList */;
8661
8763
  }
8662
8764
  get children() {
8663
8765
  return this._children ??= this.createChildren();
@@ -8675,7 +8777,7 @@ var TagList = class extends BaseNode {
8675
8777
  var Tag = class extends BaseNode {
8676
8778
  constructor(green, rangeStart, parent) {
8677
8779
  super(green, rangeStart, parent);
8678
- this.kind = 147 /* Tag */;
8780
+ this.kind = 151 /* Tag */;
8679
8781
  }
8680
8782
  get children() {
8681
8783
  return this._children ??= this.createChildren();
@@ -8715,7 +8817,7 @@ var Tag = class extends BaseNode {
8715
8817
  var ModifierList = class extends BaseNode {
8716
8818
  constructor(green, rangeStart, parent) {
8717
8819
  super(green, rangeStart, parent);
8718
- this.kind = 148 /* ModifierList */;
8820
+ this.kind = 152 /* ModifierList */;
8719
8821
  }
8720
8822
  get children() {
8721
8823
  return this._children ??= this.createChildren();
@@ -8733,7 +8835,7 @@ var ModifierList = class extends BaseNode {
8733
8835
  var Modifier = class extends BaseNode {
8734
8836
  constructor(green, rangeStart, parent) {
8735
8837
  super(green, rangeStart, parent);
8736
- this.kind = 149 /* Modifier */;
8838
+ this.kind = 153 /* Modifier */;
8737
8839
  }
8738
8840
  get children() {
8739
8841
  return this._children ??= this.createChildren();
@@ -8765,7 +8867,7 @@ var Modifier = class extends BaseNode {
8765
8867
  var ParameterClause = class extends BaseNode {
8766
8868
  constructor(green, rangeStart, parent) {
8767
8869
  super(green, rangeStart, parent);
8768
- this.kind = 150 /* ParameterClause */;
8870
+ this.kind = 154 /* ParameterClause */;
8769
8871
  }
8770
8872
  get children() {
8771
8873
  return this._children ??= this.createChildren();
@@ -8793,7 +8895,7 @@ var ParameterClause = class extends BaseNode {
8793
8895
  var ParameterList = class extends BaseNode {
8794
8896
  constructor(green, rangeStart, parent) {
8795
8897
  super(green, rangeStart, parent);
8796
- this.kind = 151 /* ParameterList */;
8898
+ this.kind = 155 /* ParameterList */;
8797
8899
  }
8798
8900
  get children() {
8799
8901
  return this._children ??= this.createChildren();
@@ -8814,7 +8916,7 @@ var ParameterList = class extends BaseNode {
8814
8916
  var TypeArgumentClause = class extends BaseNode {
8815
8917
  constructor(green, rangeStart, parent) {
8816
8918
  super(green, rangeStart, parent);
8817
- this.kind = 152 /* TypeArgumentClause */;
8919
+ this.kind = 156 /* TypeArgumentClause */;
8818
8920
  }
8819
8921
  get children() {
8820
8922
  return this._children ??= this.createChildren();
@@ -8842,7 +8944,7 @@ var TypeArgumentClause = class extends BaseNode {
8842
8944
  var TypeArgumentList = class extends BaseNode {
8843
8945
  constructor(green, rangeStart, parent) {
8844
8946
  super(green, rangeStart, parent);
8845
- this.kind = 153 /* TypeArgumentList */;
8947
+ this.kind = 157 /* TypeArgumentList */;
8846
8948
  }
8847
8949
  get children() {
8848
8950
  return this._children ??= this.createChildren();
@@ -8863,7 +8965,7 @@ var TypeArgumentList = class extends BaseNode {
8863
8965
  var TypeParameterClause = class extends BaseNode {
8864
8966
  constructor(green, rangeStart, parent) {
8865
8967
  super(green, rangeStart, parent);
8866
- this.kind = 154 /* TypeParameterClause */;
8968
+ this.kind = 158 /* TypeParameterClause */;
8867
8969
  }
8868
8970
  get children() {
8869
8971
  return this._children ??= this.createChildren();
@@ -8891,7 +8993,7 @@ var TypeParameterClause = class extends BaseNode {
8891
8993
  var TypeParameterList = class extends BaseNode {
8892
8994
  constructor(green, rangeStart, parent) {
8893
8995
  super(green, rangeStart, parent);
8894
- this.kind = 155 /* TypeParameterList */;
8996
+ this.kind = 159 /* TypeParameterList */;
8895
8997
  }
8896
8998
  get children() {
8897
8999
  return this._children ??= this.createChildren();
@@ -8912,7 +9014,7 @@ var TypeParameterList = class extends BaseNode {
8912
9014
  var TypeAnnotation = class extends BaseNode {
8913
9015
  constructor(green, rangeStart, parent) {
8914
9016
  super(green, rangeStart, parent);
8915
- this.kind = 156 /* TypeAnnotation */;
9017
+ this.kind = 160 /* TypeAnnotation */;
8916
9018
  }
8917
9019
  get children() {
8918
9020
  return this._children ??= this.createChildren();
@@ -12176,10 +12278,83 @@ var TextTemplateLiteralTranslation2 = class extends BaseNode2 {
12176
12278
  return new TextTemplateLiteralTranslation(this, rangeStart, parent);
12177
12279
  }
12178
12280
  };
12281
+ var TranslationTextTemplate2 = class extends BaseNode2 {
12282
+ constructor(head, spanList) {
12283
+ super();
12284
+ this.kind = 142 /* TranslationTextTemplate */;
12285
+ this.children = [head, spanList];
12286
+ }
12287
+ get head() {
12288
+ return this.children[0];
12289
+ }
12290
+ get spanList() {
12291
+ return this.children[1];
12292
+ }
12293
+ get thisAsNode() {
12294
+ return this;
12295
+ }
12296
+ toRed(rangeStart, parent) {
12297
+ return new TranslationTextTemplate(this, rangeStart, parent);
12298
+ }
12299
+ };
12300
+ var TranslationTextTemplateSpanList2 = class extends BaseNode2 {
12301
+ constructor(spans) {
12302
+ super();
12303
+ this.kind = 143 /* TranslationTextTemplateSpanList */;
12304
+ this.children = spans;
12305
+ }
12306
+ get spans() {
12307
+ return this.children;
12308
+ }
12309
+ get thisAsNode() {
12310
+ return this;
12311
+ }
12312
+ toRed(rangeStart, parent) {
12313
+ return new TranslationTextTemplateSpanList(this, rangeStart, parent);
12314
+ }
12315
+ };
12316
+ var TranslationTextTemplateSpan2 = class extends BaseNode2 {
12317
+ constructor(parameter, text) {
12318
+ super();
12319
+ this.kind = 144 /* TranslationTextTemplateSpan */;
12320
+ this.children = [parameter, text];
12321
+ }
12322
+ get parameter() {
12323
+ return this.children[0];
12324
+ }
12325
+ get text() {
12326
+ return this.children[1];
12327
+ }
12328
+ get thisAsNode() {
12329
+ return this;
12330
+ }
12331
+ toRed(rangeStart, parent) {
12332
+ return new TranslationTextTemplateSpan(this, rangeStart, parent);
12333
+ }
12334
+ };
12335
+ var TranslationTextTemplateParameter2 = class extends BaseNode2 {
12336
+ constructor(name, typeAnnotation) {
12337
+ super();
12338
+ this.kind = 145 /* TranslationTextTemplateParameter */;
12339
+ this.children = [name, typeAnnotation];
12340
+ }
12341
+ get name() {
12342
+ return this.children[0];
12343
+ }
12344
+ get typeAnnotation() {
12345
+ return this.children[1];
12346
+ }
12347
+ get thisAsNode() {
12348
+ return this;
12349
+ }
12350
+ toRed(rangeStart, parent) {
12351
+ return new TranslationTextTemplateParameter(this, rangeStart, parent);
12352
+ }
12353
+ };
12179
12354
  var VariantDeclaration2 = class extends BaseNode2 {
12180
12355
  constructor(tagList, modifierList, name, equalsToken, value) {
12181
12356
  super();
12182
- this.kind = 142 /* VariantDeclaration */;
12357
+ this.kind = 146 /* VariantDeclaration */;
12183
12358
  this.children = [tagList, modifierList, name, equalsToken, value];
12184
12359
  }
12185
12360
  get tagList() {
@@ -12207,7 +12382,7 @@ var VariantDeclaration2 = class extends BaseNode2 {
12207
12382
  var TypeParameterDeclaration2 = class extends BaseNode2 {
12208
12383
  constructor(name, colonToken, constraint, equalsToken, defaultType) {
12209
12384
  super();
12210
- this.kind = 143 /* TypeParameterDeclaration */;
12385
+ this.kind = 147 /* TypeParameterDeclaration */;
12211
12386
  this.children = [name, colonToken, constraint, equalsToken, defaultType];
12212
12387
  }
12213
12388
  get name() {
@@ -12235,7 +12410,7 @@ var TypeParameterDeclaration2 = class extends BaseNode2 {
12235
12410
  var ParameterDeclaration2 = class extends BaseNode2 {
12236
12411
  constructor(tagList, name, typeAnnotation, equalsToken, defaultValue) {
12237
12412
  super();
12238
- this.kind = 144 /* ParameterDeclaration */;
12413
+ this.kind = 148 /* ParameterDeclaration */;
12239
12414
  this.children = [tagList, name, typeAnnotation, equalsToken, defaultValue];
12240
12415
  }
12241
12416
  get tagList() {
@@ -12263,7 +12438,7 @@ var ParameterDeclaration2 = class extends BaseNode2 {
12263
12438
  var Argument2 = class extends BaseNode2 {
12264
12439
  constructor(name, equalsToken, value) {
12265
12440
  super();
12266
- this.kind = 145 /* Argument */;
12441
+ this.kind = 149 /* Argument */;
12267
12442
  this.children = [name, equalsToken, value];
12268
12443
  }
12269
12444
  get name() {
@@ -12285,7 +12460,7 @@ var Argument2 = class extends BaseNode2 {
12285
12460
  var TagList2 = class extends BaseNode2 {
12286
12461
  constructor(tags) {
12287
12462
  super();
12288
- this.kind = 146 /* TagList */;
12463
+ this.kind = 150 /* TagList */;
12289
12464
  this.children = tags;
12290
12465
  }
12291
12466
  get tags() {
@@ -12301,7 +12476,7 @@ var TagList2 = class extends BaseNode2 {
12301
12476
  var Tag2 = class extends BaseNode2 {
12302
12477
  constructor(hashSignToken, name, typeArgumentClause, openParenthesisToken, argumentList, closeParenthesisToken) {
12303
12478
  super();
12304
- this.kind = 147 /* Tag */;
12479
+ this.kind = 151 /* Tag */;
12305
12480
  this.children = [hashSignToken, name, typeArgumentClause, openParenthesisToken, argumentList, closeParenthesisToken];
12306
12481
  }
12307
12482
  get hashSignToken() {
@@ -12332,7 +12507,7 @@ var Tag2 = class extends BaseNode2 {
12332
12507
  var ModifierList2 = class extends BaseNode2 {
12333
12508
  constructor(modifiers) {
12334
12509
  super();
12335
- this.kind = 148 /* ModifierList */;
12510
+ this.kind = 152 /* ModifierList */;
12336
12511
  this.children = modifiers;
12337
12512
  }
12338
12513
  get modifiers() {
@@ -12348,7 +12523,7 @@ var ModifierList2 = class extends BaseNode2 {
12348
12523
  var Modifier2 = class extends BaseNode2 {
12349
12524
  constructor(value, openParenthesisToken, level, closeParenthesisToken) {
12350
12525
  super();
12351
- this.kind = 149 /* Modifier */;
12526
+ this.kind = 153 /* Modifier */;
12352
12527
  this.children = [value, openParenthesisToken, level, closeParenthesisToken];
12353
12528
  }
12354
12529
  get value() {
@@ -12373,7 +12548,7 @@ var Modifier2 = class extends BaseNode2 {
12373
12548
  var ParameterClause2 = class extends BaseNode2 {
12374
12549
  constructor(openParenthesisToken, parameterList, closeParenthesisToken) {
12375
12550
  super();
12376
- this.kind = 150 /* ParameterClause */;
12551
+ this.kind = 154 /* ParameterClause */;
12377
12552
  this.children = [openParenthesisToken, parameterList, closeParenthesisToken];
12378
12553
  }
12379
12554
  get openParenthesisToken() {
@@ -12395,7 +12570,7 @@ var ParameterClause2 = class extends BaseNode2 {
12395
12570
  var ParameterList2 = class extends BaseNode2 {
12396
12571
  constructor(elements) {
12397
12572
  super();
12398
- this.kind = 151 /* ParameterList */;
12573
+ this.kind = 155 /* ParameterList */;
12399
12574
  this.children = elements;
12400
12575
  }
12401
12576
  get elements() {
@@ -12411,7 +12586,7 @@ var ParameterList2 = class extends BaseNode2 {
12411
12586
  var TypeArgumentClause2 = class extends BaseNode2 {
12412
12587
  constructor(lessThanToken, typeArgumentList, greaterThanToken) {
12413
12588
  super();
12414
- this.kind = 152 /* TypeArgumentClause */;
12589
+ this.kind = 156 /* TypeArgumentClause */;
12415
12590
  this.children = [lessThanToken, typeArgumentList, greaterThanToken];
12416
12591
  }
12417
12592
  get lessThanToken() {
@@ -12433,7 +12608,7 @@ var TypeArgumentClause2 = class extends BaseNode2 {
12433
12608
  var TypeArgumentList2 = class extends BaseNode2 {
12434
12609
  constructor(elements) {
12435
12610
  super();
12436
- this.kind = 153 /* TypeArgumentList */;
12611
+ this.kind = 157 /* TypeArgumentList */;
12437
12612
  this.children = elements;
12438
12613
  }
12439
12614
  get elements() {
@@ -12449,7 +12624,7 @@ var TypeArgumentList2 = class extends BaseNode2 {
12449
12624
  var TypeParameterClause2 = class extends BaseNode2 {
12450
12625
  constructor(lessThanToken, typeParameterList, greaterThanToken) {
12451
12626
  super();
12452
- this.kind = 154 /* TypeParameterClause */;
12627
+ this.kind = 158 /* TypeParameterClause */;
12453
12628
  this.children = [lessThanToken, typeParameterList, greaterThanToken];
12454
12629
  }
12455
12630
  get lessThanToken() {
@@ -12471,7 +12646,7 @@ var TypeParameterClause2 = class extends BaseNode2 {
12471
12646
  var TypeParameterList2 = class extends BaseNode2 {
12472
12647
  constructor(elements) {
12473
12648
  super();
12474
- this.kind = 155 /* TypeParameterList */;
12649
+ this.kind = 159 /* TypeParameterList */;
12475
12650
  this.children = elements;
12476
12651
  }
12477
12652
  get elements() {
@@ -12487,7 +12662,7 @@ var TypeParameterList2 = class extends BaseNode2 {
12487
12662
  var TypeAnnotation2 = class extends BaseNode2 {
12488
12663
  constructor(colonToken, typeSpecifier) {
12489
12664
  super();
12490
- this.kind = 156 /* TypeAnnotation */;
12665
+ this.kind = 160 /* TypeAnnotation */;
12491
12666
  this.children = [colonToken, typeSpecifier];
12492
12667
  }
12493
12668
  get colonToken() {
@@ -12823,7 +12998,12 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
12823
12998
  DiagnosticCode2[DiagnosticCode2["CannotAccessAbstractMemberOfBaseType"] = 354] = "CannotAccessAbstractMemberOfBaseType";
12824
12999
  DiagnosticCode2[DiagnosticCode2["TheFollowingBaseTypeMembersConflictAndMustBeOverridden0"] = 355] = "TheFollowingBaseTypeMembersConflictAndMustBeOverridden0";
12825
13000
  DiagnosticCode2[DiagnosticCode2["TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1"] = 356] = "TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1";
12826
- DiagnosticCode2[DiagnosticCode2["OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations"] = 357] = "OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations";
13001
+ DiagnosticCode2[DiagnosticCode2["EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral"] = 357] = "EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral";
13002
+ DiagnosticCode2[DiagnosticCode2["OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral"] = 358] = "OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral";
13003
+ DiagnosticCode2[DiagnosticCode2["OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral"] = 359] = "OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral";
13004
+ DiagnosticCode2[DiagnosticCode2["OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral"] = 360] = "OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral";
13005
+ DiagnosticCode2[DiagnosticCode2["TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate"] = 361] = "TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate";
13006
+ DiagnosticCode2[DiagnosticCode2["UnknownParameterOfTextTemplateTranslation"] = 362] = "UnknownParameterOfTextTemplateTranslation";
12827
13007
  DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 401] = "CannotFindTsLibDirectoryBaseSearchPaths0";
12828
13008
  DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 402] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
12829
13009
  DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 403] = "ProgramWithoutMainPackageCannotBeCompiled";
@@ -13064,7 +13244,12 @@ var englishErrorMessages = {
13064
13244
  [354 /* CannotAccessAbstractMemberOfBaseType */]: "Can not access abstract member of base type.",
13065
13245
  [355 /* TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 */]: "The following base type members conflict and must be overridden:{0}",
13066
13246
  [356 /* TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 */]: "The following base type members conflict because they have the same original name '{0}' and must be overridden:{1}",
13067
- [357 /* OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations */]: "Only identifier or integer literal is allowed as parameter of text template literal in translations.",
13247
+ [357 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */]: "Either identifiers or integer indexes are allowed as parameters of text template literal.",
13248
+ [358 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */]: "Only index {0} is allowed here as parameter of text template literal.",
13249
+ [359 /* OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral */]: "Only integer literal in range from 0 to {0} is allowed here as parameter of text template literal.",
13250
+ [360 /* OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral */]: "Only identifier is allowed here as parameter of text template literal.",
13251
+ [361 /* TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate */]: "Translation function is not allowed when indexes are used as parameters in source text template.",
13252
+ [362 /* UnknownParameterOfTextTemplateTranslation */]: "Unknown parameter of text template translation.",
13068
13253
  [401 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
13069
13254
  [402 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
13070
13255
  [403 /* ProgramWithoutMainPackageCannotBeCompiled */]: "Program without main package cannot be compiled.",
@@ -13267,7 +13452,12 @@ var russianErrorMessages = {
13267
13452
  [354 /* CannotAccessAbstractMemberOfBaseType */]: "\u041D\u0435\u043B\u044C\u0437\u044F \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u044C\u0441\u044F \u043A \u0430\u0431\u0441\u0442\u0440\u0430\u043A\u0442\u043D\u043E\u043C\u0443 \u0447\u043B\u0435\u043D\u0443 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u0442\u0438\u043F\u0430.",
13268
13453
  [355 /* TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 */]: "\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 \u0438 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u044B:{0}",
13269
13454
  [356 /* 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:{1}",
13270
- [357 /* OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations */]: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0430\u0445 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0438\u043C\u044F \u0438\u043B\u0438 \u0431\u0443\u043A\u0432\u0430\u043B\u044C\u043D\u043E \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E.",
13455
+ [357 /* 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.",
13456
+ [358 /* 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}.",
13457
+ [359 /* OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral */]: "\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 \u0431\u0443\u043A\u0432\u0430\u043B\u044C\u043D\u043E \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0432 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0435 \u043E\u0442 0 \u0434\u043E {0}.",
13458
+ [360 /* OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral */]: "\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 \u0438\u043C\u044F.",
13459
+ [361 /* TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate */]: "\u0414\u043B\u044F \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0430 \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043E \u043D\u043E\u043C\u0435\u0440\u0430 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432, \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u044F.",
13460
+ [362 /* UnknownParameterOfTextTemplateTranslation */]: "\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0438\u043C\u043E\u0433\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430.",
13271
13461
  [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}.",
13272
13462
  [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.",
13273
13463
  [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.",
@@ -22237,6 +22427,40 @@ var ExpressionParser = class {
22237
22427
  }
22238
22428
  return result;
22239
22429
  }
22430
+ parseTranslationTextTemplate() {
22431
+ const literalStart = this.parser.tokenOrKeywordStartPosition();
22432
+ const head = this.parser.parseExpectedToken(7 /* TextTemplateHead */);
22433
+ const spanListStart = this.parser.tokenOrKeywordStartPosition();
22434
+ const spans = new Array();
22435
+ if (!head.isMissing) {
22436
+ let span;
22437
+ do {
22438
+ const spanStart = this.parser.tokenOrKeywordStartPosition();
22439
+ let parameter;
22440
+ if (this.parser.currentTokenOrKeyword.isToken(2 /* IntegerLiteral */)) {
22441
+ parameter = this.parser.parseExpectedToken(2 /* IntegerLiteral */);
22442
+ } else {
22443
+ parameter = this.parseTranslationTextTemplateParameter();
22444
+ }
22445
+ const text = this.parseTextTemplatePartOrTail();
22446
+ span = this.parser.intern(new TranslationTextTemplateSpan2(parameter, text), spanStart);
22447
+ spans.push(span);
22448
+ } while (span.text.tokenKind === 8 /* TextTemplatePart */);
22449
+ }
22450
+ const spanList = this.parser.intern(new TranslationTextTemplateSpanList2(spans), spanListStart);
22451
+ const result = new TranslationTextTemplate2(head, spanList);
22452
+ return this.parser.intern(result, literalStart);
22453
+ }
22454
+ parseTranslationTextTemplateParameter() {
22455
+ const parameterStart = this.parser.tokenOrKeywordStartPosition();
22456
+ const name = this.parser.parseIdentifier(4 /* Other */);
22457
+ let typeAnnotation;
22458
+ if (this.parser.typeAnnotationParser.isStartOfTypeAnnotation()) {
22459
+ typeAnnotation = this.parser.typeAnnotationParser.parseTypeAnnotation();
22460
+ }
22461
+ const result = new TranslationTextTemplateParameter2(name, typeAnnotation);
22462
+ return this.parser.intern(result, parameterStart);
22463
+ }
22240
22464
  parseFunctionBlockLiteral() {
22241
22465
  const functionBlockLiteralStart = this.parser.tokenOrKeywordStartPosition();
22242
22466
  const block = this.parser.statementParser.parseFunctionBlock();
@@ -23522,11 +23746,15 @@ var TranslationsDeclarationParser = class {
23522
23746
  }
23523
23747
  parseTextTemplateLiteralTranslation() {
23524
23748
  const translationStart = this.parser.tokenOrKeywordStartPosition();
23525
- const sourceTextTemplateLiteral = this.parser.expressionParser.parseTextTemplateLiteral();
23749
+ const sourceTextTemplateLiteral = this.parser.expressionParser.parseTranslationTextTemplate();
23526
23750
  const minusGreaterThanToken = this.parser.parseExpectedToken(43 /* MinusGreaterThan */);
23527
23751
  let translatedTextOrTranslationFunction;
23528
23752
  if (this.parser.currentTokenOrKeyword.kind === "token") {
23529
23753
  switch (this.parser.currentTokenOrKeyword.tokenKind) {
23754
+ case 6 /* TextLiteral */: {
23755
+ translatedTextOrTranslationFunction = this.parser.parseExpectedToken(6 /* TextLiteral */);
23756
+ break;
23757
+ }
23530
23758
  case 7 /* TextTemplateHead */: {
23531
23759
  translatedTextOrTranslationFunction = this.parser.expressionParser.parseTextTemplateLiteral();
23532
23760
  break;
@@ -23540,6 +23768,9 @@ var TranslationsDeclarationParser = class {
23540
23768
  translatedTextOrTranslationFunction = this.parser.expressionParser.parseFunctionLiteral();
23541
23769
  }
23542
23770
  if (translatedTextOrTranslationFunction === void 0) {
23771
+ if (this.parser.expressionParser.isStartOfExpression(false)) {
23772
+ this.parser.expressionParser.parseExpression(false);
23773
+ }
23543
23774
  translatedTextOrTranslationFunction = new InvalidExpression2();
23544
23775
  this.parser.tryReportDiagnosticAtCurrentRange(
23545
23776
  133 /* TranslatedTextTemplateOrTranslationFunctionBlockExpected */
@@ -28430,7 +28661,7 @@ var ModifierValidator = class _ModifierValidator {
28430
28661
  [53 /* FieldGetterDeclaration */]: this.allowedTypeMemberHidingModifiers | 32 /* Static */ | 64 /* Abstract */ | 128 /* Basic */ | 256 /* Override */,
28431
28662
  [54 /* FieldSetterDeclaration */]: this.allowedTypeMemberHidingModifiers | 32 /* Static */ | 64 /* Abstract */ | 128 /* Basic */ | 256 /* Override */,
28432
28663
  [55 /* InvalidTypeMemberDeclaration */]: this.allowedTypeMemberModifiers,
28433
- [142 /* VariantDeclaration */]: 0 /* None */
28664
+ [146 /* VariantDeclaration */]: 0 /* None */
28434
28665
  };
28435
28666
  }
28436
28667
  static validatePackageVariableAccessorsHaveConsistentModifiers(analyzer, getterModifiers, setterModifiers, nodeForDiagnostic, diagnostics) {
@@ -28941,7 +29172,7 @@ var ModifierValidator = class _ModifierValidator {
28941
29172
  break;
28942
29173
  case 55 /* InvalidTypeMemberDeclaration */:
28943
29174
  break;
28944
- case 142 /* VariantDeclaration */:
29175
+ case 146 /* VariantDeclaration */:
28945
29176
  this.validateTypeMemberCanBePlacedInGroupWithModifiers(
28946
29177
  declaration.kind,
28947
29178
  declaration.name,
@@ -28964,7 +29195,7 @@ var ModifierValidator = class _ModifierValidator {
28964
29195
  const flag = modifierToModifierFlag(modifier);
28965
29196
  if ((flags & 31 /* AnyHiddenModifier */) !== 0) {
28966
29197
  this.reportDuplicateHiddenModifier(modifier, parentGroupFlags);
28967
- } else if (typeMemberDeclarationKind === 142 /* VariantDeclaration */) {
29198
+ } else if (typeMemberDeclarationKind === 146 /* VariantDeclaration */) {
28968
29199
  this._diagnostics.addDiagnostic(this._analyzer.createNodeDiagnostic(
28969
29200
  331 /* VariantDeclarationCannotHaveHiddenModifier */,
28970
29201
  modifier
@@ -29245,7 +29476,7 @@ var NodeTypeUtils = class {
29245
29476
  case 26 /* PackageFunctionTypeDeclaration */:
29246
29477
  case 17 /* AnonymousFunctionTypeDeclaration */:
29247
29478
  case 20 /* PackageAliasTypeDeclaration */:
29248
- case 143 /* TypeParameterDeclaration */:
29479
+ case 147 /* TypeParameterDeclaration */:
29249
29480
  return true;
29250
29481
  default:
29251
29482
  Debug.typeIsAssignableTo();
@@ -29259,7 +29490,7 @@ var NodeTypeUtils = class {
29259
29490
  case 36 /* PackageVariantTypeDeclaration */:
29260
29491
  case 26 /* PackageFunctionTypeDeclaration */:
29261
29492
  case 20 /* PackageAliasTypeDeclaration */:
29262
- case 143 /* TypeParameterDeclaration */:
29493
+ case 147 /* TypeParameterDeclaration */:
29263
29494
  return true;
29264
29495
  default:
29265
29496
  Debug.typeIsAssignableTo();
@@ -29304,7 +29535,7 @@ var NodeTypeUtils = class {
29304
29535
  case 46 /* IndexedElementSetterDeclaration */:
29305
29536
  case 48 /* DereferencedVariableGetterDeclaration */:
29306
29537
  case 49 /* DereferencedVariableSetterDeclaration */:
29307
- case 142 /* VariantDeclaration */:
29538
+ case 146 /* VariantDeclaration */:
29308
29539
  case 42 /* TypeMemberGroupDeclaration */:
29309
29540
  case 55 /* InvalidTypeMemberDeclaration */:
29310
29541
  return true;
@@ -29434,9 +29665,9 @@ var NodeTypeUtils = class {
29434
29665
  case 58 /* EnumerationVariableDeclaration */:
29435
29666
  case 33 /* PackageVariableDeclaration */:
29436
29667
  case 57 /* LocalVariableDeclaration */:
29437
- case 144 /* ParameterDeclaration */:
29668
+ case 148 /* ParameterDeclaration */:
29438
29669
  case 52 /* FieldDeclaration */:
29439
- case 142 /* VariantDeclaration */:
29670
+ case 146 /* VariantDeclaration */:
29440
29671
  return true;
29441
29672
  default:
29442
29673
  Debug.typeIsAssignableTo();
@@ -39292,7 +39523,7 @@ function getDiagnosticRange(entity, preferSetterParameter = false) {
39292
39523
  if (definition.value.nodes.length === 1) {
39293
39524
  return definition.value.nodes[0].name.rangeWithoutTrivia;
39294
39525
  } else if (definition.value.nodes.length > 1) {
39295
- if (definition.value.nodes.every((n) => n.kind === 144 /* ParameterDeclaration */)) {
39526
+ if (definition.value.nodes.every((n) => n.kind === 148 /* ParameterDeclaration */)) {
39296
39527
  const getterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 45 /* IndexedElementGetterDeclaration */);
39297
39528
  const setterParameterDeclaration = definition.value.nodes.find((n) => n.parent.parent.parent.kind === 46 /* IndexedElementSetterDeclaration */);
39298
39529
  if (setterParameterDeclaration !== void 0 && preferSetterParameter) {
@@ -40537,7 +40768,7 @@ var Analyzer = class _Analyzer {
40537
40768
  case 69 /* AutotypeCallExpression */:
40538
40769
  matchResult = this.argumentToParameterMatchResult.ofAutotypeCallExpression(node.parent.parent);
40539
40770
  break;
40540
- case 147 /* Tag */:
40771
+ case 151 /* Tag */:
40541
40772
  matchResult = this.argumentToParameterMatchResult.ofTag(node.parent.parent);
40542
40773
  break;
40543
40774
  case 70 /* IndexedAccessExpression */:
@@ -41386,60 +41617,6 @@ var Analyzer = class _Analyzer {
41386
41617
  return result;
41387
41618
  });
41388
41619
  }
41389
- isFunctionResultNone(node) {
41390
- const returnType = this.semanticContext.ofFunctionBlock(node).getContainingSubprogram()?.getReturnType();
41391
- return returnType === void 0 || returnType.equals(this.standardTypes.none);
41392
- }
41393
- isExpressionImplicitlyReturnedFromSubprogram(node) {
41394
- const isSingle = node.parent.statements.single((s) => s.kind !== 101 /* EmptyStatement */) !== void 0;
41395
- if (!isSingle) {
41396
- return false;
41397
- }
41398
- let isInTopLevelStatementBlockOfSubprogram;
41399
- const parent = node.parent.parent.parent;
41400
- switch (parent.kind) {
41401
- case 23 /* PackageConstructorDeclaration */:
41402
- case 24 /* PackageEntryPointDeclaration */:
41403
- case 25 /* PackageFunctionDeclaration */:
41404
- case 34 /* PackageVariableGetterDeclaration */:
41405
- case 35 /* PackageVariableSetterDeclaration */:
41406
- case 43 /* ConstructorDeclaration */:
41407
- case 44 /* DestructorDeclaration */:
41408
- case 45 /* IndexedElementGetterDeclaration */:
41409
- case 46 /* IndexedElementSetterDeclaration */:
41410
- case 48 /* DereferencedVariableGetterDeclaration */:
41411
- case 49 /* DereferencedVariableSetterDeclaration */:
41412
- case 50 /* MethodDeclaration */:
41413
- case 51 /* OperatorDeclaration */:
41414
- case 53 /* FieldGetterDeclaration */:
41415
- case 54 /* FieldSetterDeclaration */:
41416
- case 56 /* NestedFunctionDeclaration */:
41417
- case 66 /* FunctionBlockLiteral */:
41418
- case 65 /* FunctionLiteral */:
41419
- isInTopLevelStatementBlockOfSubprogram = true;
41420
- break;
41421
- case 96 /* RunStatement */:
41422
- case 97 /* TryStatement */:
41423
- case 98 /* CatchClause */:
41424
- case 100 /* FinallyClause */:
41425
- case 106 /* ForStatement */:
41426
- case 107 /* IfStatement */:
41427
- case 109 /* ElseIfClause */:
41428
- case 110 /* ElseClause */:
41429
- case 114 /* LoopStatement */:
41430
- case 119 /* CaseClause */:
41431
- case 120 /* WhileStatement */:
41432
- isInTopLevelStatementBlockOfSubprogram = false;
41433
- break;
41434
- default:
41435
- Debug.never(parent);
41436
- }
41437
- if (!isInTopLevelStatementBlockOfSubprogram) {
41438
- return false;
41439
- }
41440
- const returnType = this.semanticContext.containing(node).getContainingSubprogram()?.getReturnType();
41441
- return returnType !== void 0 && !returnType.equals(this.standardTypes.none);
41442
- }
41443
41620
  createBackingPackageVariables(declaredMembers, pkg) {
41444
41621
  const declarationNames = Query.from(declaredMembers).map((d) => d.getName().key).uniqueToSet();
41445
41622
  const result = new Array();
@@ -41576,7 +41753,7 @@ var Analyzer = class _Analyzer {
41576
41753
  }
41577
41754
  break;
41578
41755
  }
41579
- case 142 /* VariantDeclaration */: {
41756
+ case 146 /* VariantDeclaration */: {
41580
41757
  variables.push(this.entity.ofVariantDeclaration(member));
41581
41758
  break;
41582
41759
  }
@@ -41860,7 +42037,7 @@ var Analyzer = class _Analyzer {
41860
42037
  case 36 /* PackageVariantTypeDeclaration */:
41861
42038
  semanticContext = this.semanticContext.outermostSemanticContextOfTypeDeclaration(node);
41862
42039
  break;
41863
- case 143 /* TypeParameterDeclaration */:
42040
+ case 147 /* TypeParameterDeclaration */:
41864
42041
  semanticContext = this.semanticContext.containing(node);
41865
42042
  break;
41866
42043
  default:
@@ -41872,9 +42049,13 @@ var Analyzer = class _Analyzer {
41872
42049
  if (node.expressionOrStatementList.kind === 90 /* StatementList */) {
41873
42050
  return false;
41874
42051
  }
41875
- if (node.expressionOrStatementList.kind === 68 /* CallExpression */) {
41876
- const returnType = this.semanticContext.ofFunctionBlock(node).getContainingSubprogram()?.getReturnType();
41877
- if (returnType === void 0 || returnType.equals(this.standardTypes.none)) {
42052
+ const functionContext = this.semanticContext.ofFunctionBlock(node);
42053
+ const returnType = functionContext.getContainingSubprogram()?.getReturnType();
42054
+ if (returnType === void 0 || returnType.equals(this.standardTypes.none)) {
42055
+ if (node.expressionOrStatementList.kind === 68 /* CallExpression */) {
42056
+ return false;
42057
+ }
42058
+ if (functionContext.getContainingPackage().getDialect() !== 1 /* ArtelA */) {
41878
42059
  return false;
41879
42060
  }
41880
42061
  }
@@ -42630,10 +42811,10 @@ var Type4 = class {
42630
42811
  ).finish([], []);
42631
42812
  return this._analyzer.typeFactory.getFunctionType(entity, Substitutions.empty(this._analyzer));
42632
42813
  }
42633
- // Данный метод не должен получать получать entity параметров и вызывать у них getType(), поскольку получение типа
42814
+ // Данный метод не должен получать объект entity параметров и вызывать у них getType(), поскольку получение типа
42634
42815
  // реализовано через получение сигнатуры, что приведёт к рекурсии.
42635
42816
  // Выведение типа через значение по умолчанию пока не поддерживается, поскольку может привести к рекурсии, если в
42636
- // качестве значения по умолчанию указан параметр этой же безымянной операции.
42817
+ // качестве значения по умолчанию указан параметр этой же безымянной функции.
42637
42818
  inferFunctionLiteralTypeFromNodeWithFallbackToTargetType(node, targetType) {
42638
42819
  const isAsync = node.asyncKeyword !== void 0;
42639
42820
  const parameters = [];
@@ -42684,10 +42865,10 @@ var Type4 = class {
42684
42865
  const entity = unfinishedEntity.finish([], parameters);
42685
42866
  return this._analyzer.typeFactory.getFunctionType(entity, Substitutions.empty(this._analyzer));
42686
42867
  }
42687
- // Данный метод не должен получать получать entity параметров и вызывать у них getType(), поскольку получение типа
42868
+ // Данный метод не должен получать объект entity параметров и вызывать у них getType(), поскольку получение типа
42688
42869
  // реализовано через получение сигнатуры, что приведёт к рекурсии.
42689
42870
  // Выведение типа через значение по умолчанию пока не поддерживается, поскольку может привести к рекурсии, если в
42690
- // качестве значения по умолчанию указан параметр этой же безымянной операции.
42871
+ // качестве значения по умолчанию указан параметр этой же безымянной функции.
42691
42872
  inferFunctionLiteralTypeFromNode(node) {
42692
42873
  const isAsync = node.asyncKeyword !== void 0;
42693
42874
  let returnType;
@@ -42750,6 +42931,7 @@ var TargetType = class {
42750
42931
  constructor(_analyzer) {
42751
42932
  this._analyzer = _analyzer;
42752
42933
  this._targetErrorType = new Cached();
42934
+ this._translationFunctionTypes = /* @__PURE__ */ new Map();
42753
42935
  }
42754
42936
  get targetErrorType() {
42755
42937
  return this._targetErrorType.getOrInsertWith(() => this._analyzer.typeFactory.getUnionType([this._analyzer.standardTypes.error, this._analyzer.standardTypes.text]));
@@ -42768,7 +42950,7 @@ var TargetType = class {
42768
42950
  return this.getTargetTypeOfChildOfAssignmentStatement(node.parent, node);
42769
42951
  case 64 /* BinaryExpression */:
42770
42952
  return this.getTargetTypeOfChildOfBinaryExpression(node.parent, node);
42771
- case 145 /* Argument */:
42953
+ case 149 /* Argument */:
42772
42954
  return this.getTargetTypeOfChildOfArgument(node.parent, node);
42773
42955
  case 68 /* CallExpression */:
42774
42956
  return this.getTargetTypeOfChildOfCallExpression(node.parent, node);
@@ -42792,7 +42974,7 @@ var TargetType = class {
42792
42974
  return this.getTargetTypeOfChildOfIsExpression(node.parent, node);
42793
42975
  case 57 /* LocalVariableDeclaration */:
42794
42976
  return this.getTargetTypeOfChildOfLocalVariableDeclaration(node.parent, node);
42795
- case 144 /* ParameterDeclaration */:
42977
+ case 148 /* ParameterDeclaration */:
42796
42978
  return this.getTargetTypeOfChildOfParameterDeclaration(node.parent, node);
42797
42979
  case 73 /* ParenthesizedExpression */:
42798
42980
  return this.getTargetTypeOfChildOfParenthesizedExpression(node.parent, node);
@@ -42818,7 +43000,7 @@ var TargetType = class {
42818
43000
  return this.getTargetTypeOfChildOfSwitchStatement(node.parent, node);
42819
43001
  case 118 /* MatchExpressionList */:
42820
43002
  return this.getTargetTypeOfChildOfMatchExpressionList(node.parent, node);
42821
- case 142 /* VariantDeclaration */:
43003
+ case 146 /* VariantDeclaration */:
42822
43004
  return this.getTargetTypeOfChildOfVariantDeclaration(node.parent, node);
42823
43005
  case 120 /* WhileStatement */:
42824
43006
  return this.getTargetTypeOfChildOfWhileStatement(node.parent, node);
@@ -42828,10 +43010,10 @@ var TargetType = class {
42828
43010
  return this.getTargetTypeOfChildOfGenericSpecializationExpression(node.parent, node);
42829
43011
  case 109 /* ElseIfClause */:
42830
43012
  return this.getTargetTypeOfChildOfElseIfClause(node.parent, node);
42831
- case 141 /* TextTemplateLiteralTranslation */:
42832
- return this.getTargetTypeOfChildOfTextTemplateLiteralTranslation(node.parent, node);
42833
43013
  case 92 /* FunctionBlock */:
42834
43014
  return this.getTargetTypeOfChildOfFunctionBlock(node.parent, node);
43015
+ case 141 /* TextTemplateLiteralTranslation */:
43016
+ return this.getTargetTypeOfChildOfTextTemplateLiteralTranslation(node.parent, node);
42835
43017
  default:
42836
43018
  Debug.never(node.parent);
42837
43019
  }
@@ -42914,12 +43096,7 @@ var TargetType = class {
42914
43096
  }
42915
43097
  getTargetTypeOfChildOfExpressionStatement(parent, child) {
42916
43098
  Debug.assert(child === parent.expression);
42917
- if (this._analyzer.isExpressionImplicitlyReturnedFromSubprogram(parent)) {
42918
- const semanticContext = this._analyzer.semanticContext.containing(parent);
42919
- return semanticContext.getContainingSubprogram()?.getReturnType();
42920
- } else {
42921
- return void 0;
42922
- }
43099
+ return void 0;
42923
43100
  }
42924
43101
  getTargetTypeOfChildOfForStatement(parent, child) {
42925
43102
  Debug.assert(child === parent.enumeratedExpression);
@@ -43045,9 +43222,6 @@ var TargetType = class {
43045
43222
  Debug.assert(child === parent.expression);
43046
43223
  return this.ofExpression(parent);
43047
43224
  }
43048
- getTargetTypeOfChildOfTextTemplateLiteralTranslation(_parent, _child) {
43049
- return void 0;
43050
- }
43051
43225
  getTargetTypeOfChildOfFunctionBlock(parent, child) {
43052
43226
  Debug.assert(child === parent.expressionOrStatementList);
43053
43227
  if (this._analyzer.isFunctionBlockWithImplicitlyReturnedExpression(parent)) {
@@ -43056,6 +43230,58 @@ var TargetType = class {
43056
43230
  return void 0;
43057
43231
  }
43058
43232
  }
43233
+ getTargetTypeOfChildOfTextTemplateLiteralTranslation(parent, child) {
43234
+ Debug.assert(child === parent.translatedTextOrTranslationFunction);
43235
+ let result = this._translationFunctionTypes.get(parent);
43236
+ if (result === void 0) {
43237
+ result = this.createTranslationFunctionTypeFromTextTemplate(parent);
43238
+ this._translationFunctionTypes.set(parent, result);
43239
+ }
43240
+ return void 0;
43241
+ }
43242
+ createTranslationFunctionTypeFromTextTemplate(node) {
43243
+ if (node.translatedTextOrTranslationFunction.kind === 65 /* FunctionLiteral */ || node.translatedTextOrTranslationFunction.kind === 66 /* FunctionBlockLiteral */) {
43244
+ const parameters = [];
43245
+ const templateSpans = node.sourceText.spanList.spans;
43246
+ const returnType = this._analyzer.standardTypes.text;
43247
+ const containingPackage = TreeQuery.fromNode(node).packageEntity(this._analyzer);
43248
+ const isAsync = false;
43249
+ const unfinishedEntity = new UnfinishedIntrinsicAnonymousFunctionTypeEntity(
43250
+ this._analyzer,
43251
+ returnType,
43252
+ isAsync,
43253
+ 0 /* SubstituteOwnSubstitutions */,
43254
+ containingPackage,
43255
+ void 0,
43256
+ EntityContext.fromSemanticContext(
43257
+ this._analyzer.semanticContext.outermostSemanticContextOfRegularOrBlockFunctionLiteral(
43258
+ node.translatedTextOrTranslationFunction
43259
+ )
43260
+ )
43261
+ );
43262
+ for (let i = 0; i < templateSpans.length; i++) {
43263
+ const span = templateSpans[i];
43264
+ const parameter = span.parameter;
43265
+ if (parameter.kind === 145 /* TranslationTextTemplateParameter */) {
43266
+ const name = this._analyzer.createNameFromIdentifier(parameter.name);
43267
+ const parameterType = this._analyzer.standardTypes.refObject;
43268
+ parameters.push(
43269
+ new IntrinsicParameterVariableEntity(
43270
+ name,
43271
+ parameterType,
43272
+ new ParameterVariableEntityContainer.Entity(unfinishedEntity.unfinishedValue),
43273
+ false,
43274
+ false,
43275
+ void 0
43276
+ )
43277
+ );
43278
+ }
43279
+ }
43280
+ const entity = unfinishedEntity.finish([], parameters);
43281
+ return this._analyzer.typeFactory.getFunctionType(entity, Substitutions.empty(this._analyzer));
43282
+ }
43283
+ return void 0;
43284
+ }
43059
43285
  };
43060
43286
  var ReturnType = class {
43061
43287
  constructor(_analyzer) {
@@ -46516,7 +46742,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
46516
46742
  this.checkDereferenceExpression(node);
46517
46743
  break;
46518
46744
  }
46519
- case 147 /* Tag */: {
46745
+ case 151 /* Tag */: {
46520
46746
  const { diagnostic } = this._analyzer.resolveTag(node);
46521
46747
  this.addMaybeLazyDiagnostic(diagnostic);
46522
46748
  const matchResult = this._analyzer.argumentToParameterMatchResult.ofTag(node);
@@ -46620,24 +46846,85 @@ var DiagnosticCollector = class _DiagnosticCollector {
46620
46846
  }
46621
46847
  case 141 /* TextTemplateLiteralTranslation */: {
46622
46848
  const sourceSpans = node.sourceText.spanList.spans;
46623
- sourceSpans.forEach((span, i) => {
46624
- if (!(span.expression.kind === 86 /* IdentifierExpression */ || span.expression.kind === 82 /* TokenExpression */ && span.expression.token.tokenKind === 2 /* IntegerLiteral */)) {
46625
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46626
- 357 /* OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations */,
46627
- span.expression
46628
- ));
46849
+ const parametersAreNames = sourceSpans.every((span) => span.parameter.kind === 145 /* TranslationTextTemplateParameter */ && span.parameter.name.isMissing === false);
46850
+ const parametersAreIndexes = !parametersAreNames && sourceSpans.every((span) => span.parameter.kind === 0 /* Token */ && span.parameter.tokenKind === 2 /* IntegerLiteral */ && span.parameter.isMissing === false);
46851
+ if (parametersAreNames) {
46852
+ const names = sourceSpans.map((span) => {
46853
+ Debug.assert(span.parameter.kind === 145 /* TranslationTextTemplateParameter */);
46854
+ return span.parameter.name.value;
46855
+ });
46856
+ switch (node.translatedTextOrTranslationFunction.kind) {
46857
+ case 0 /* Token */:
46858
+ break;
46859
+ case 79 /* TextTemplateLiteral */: {
46860
+ const targetSpans = node.translatedTextOrTranslationFunction.spanList.spans;
46861
+ targetSpans.forEach((span) => {
46862
+ if (span.expression.kind === 86 /* IdentifierExpression */) {
46863
+ if (!names.includes(span.expression.identifier.value)) {
46864
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46865
+ 362 /* UnknownParameterOfTextTemplateTranslation */,
46866
+ span.expression
46867
+ ));
46868
+ }
46869
+ } else {
46870
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46871
+ 360 /* OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral */,
46872
+ span.expression
46873
+ ));
46874
+ }
46875
+ });
46876
+ break;
46877
+ }
46878
+ case 66 /* FunctionBlockLiteral */:
46879
+ case 65 /* FunctionLiteral */: {
46880
+ break;
46881
+ }
46629
46882
  }
46630
- });
46631
- if (node.translatedTextOrTranslationFunction.kind === 79 /* TextTemplateLiteral */) {
46632
- const translatedSpans = node.translatedTextOrTranslationFunction.spanList.spans;
46633
- translatedSpans.forEach((span, i) => {
46634
- if (!(span.expression.kind === 86 /* IdentifierExpression */ || span.expression.kind === 82 /* TokenExpression */ && span.expression.token.tokenKind === 2 /* IntegerLiteral */)) {
46883
+ } else {
46884
+ if (parametersAreIndexes) {
46885
+ sourceSpans.forEach((span, i) => {
46886
+ Debug.assert(span.parameter.kind === 0 /* Token */ && span.parameter.tokenKind === 2 /* IntegerLiteral */);
46887
+ if (Number.parseInt(span.parameter.value) !== i) {
46888
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46889
+ 358 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */,
46890
+ span.parameter,
46891
+ [i.toString()]
46892
+ ));
46893
+ }
46894
+ });
46895
+ switch (node.translatedTextOrTranslationFunction.kind) {
46896
+ case 0 /* Token */:
46897
+ break;
46898
+ case 79 /* TextTemplateLiteral */: {
46899
+ const targetSpans = node.translatedTextOrTranslationFunction.spanList.spans;
46900
+ targetSpans.forEach((span, i) => {
46901
+ if (!(span.expression.kind === 82 /* TokenExpression */ && span.expression.token.tokenKind === 2 /* IntegerLiteral */ && isNumberInRange(Number.parseInt(span.expression.token.value), 0, sourceSpans.length))) {
46902
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46903
+ 359 /* OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral */,
46904
+ span.expression,
46905
+ [(sourceSpans.length - 1).toString()]
46906
+ ));
46907
+ }
46908
+ });
46909
+ break;
46910
+ }
46911
+ case 66 /* FunctionBlockLiteral */:
46912
+ case 65 /* FunctionLiteral */: {
46913
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46914
+ 361 /* TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate */,
46915
+ node.translatedTextOrTranslationFunction
46916
+ ));
46917
+ break;
46918
+ }
46919
+ }
46920
+ } else {
46921
+ sourceSpans.forEach((span) => {
46635
46922
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46636
- 357 /* OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations */,
46637
- span.expression
46923
+ 357 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */,
46924
+ span.parameter
46638
46925
  ));
46639
- }
46640
- });
46926
+ });
46927
+ }
46641
46928
  }
46642
46929
  break;
46643
46930
  }
@@ -46882,7 +47169,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
46882
47169
  const underlyingType = this._analyzer.entity.ofVariantTypeDeclaration(node.parent).getUnderlyingType();
46883
47170
  const isIntegerVariant = underlyingType.equals(this._analyzer.standardTypes.integer);
46884
47171
  for (const member of node.memberBlock.memberList.members) {
46885
- if (member.kind === 142 /* VariantDeclaration */) {
47172
+ if (member.kind === 146 /* VariantDeclaration */) {
46886
47173
  if (member.value === void 0 && !isIntegerVariant) {
46887
47174
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
46888
47175
  241 /* VariantMustHaveAssociatedValue */,
@@ -46963,7 +47250,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
46963
47250
  ).validate();
46964
47251
  break;
46965
47252
  }
46966
- case 143 /* TypeParameterDeclaration */: {
47253
+ case 147 /* TypeParameterDeclaration */: {
46967
47254
  const entity = this._analyzer.entity.ofTypeParameterDeclaration(node);
46968
47255
  if (entity.getConstraint().causesCycle) {
46969
47256
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
@@ -46996,7 +47283,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
46996
47283
  this.checkIfVariableIsUnused(entity, node.name);
46997
47284
  break;
46998
47285
  }
46999
- case 144 /* ParameterDeclaration */: {
47286
+ case 148 /* ParameterDeclaration */: {
47000
47287
  this.checkParameterDeclaration(node);
47001
47288
  break;
47002
47289
  }
@@ -48537,6 +48824,9 @@ var DiagnosticCollector = class _DiagnosticCollector {
48537
48824
  }
48538
48825
  }
48539
48826
  };
48827
+ function isNumberInRange(num, inclusiveLowerBound, exclusiveUpperBound) {
48828
+ return num >= inclusiveLowerBound && num < exclusiveUpperBound;
48829
+ }
48540
48830
  var requiredParameterCountBySyntacticalOperatorKind = {
48541
48831
  [0 /* Plus */]: 1 /* ZeroOrOne */,
48542
48832
  [1 /* Minus */]: 1 /* ZeroOrOne */,
@@ -51743,7 +52033,7 @@ var PackageVariantTypeDeclarationEntity = class {
51743
52033
  getUnderlyingType() {
51744
52034
  return this._underlyingType.getOrInsertWith(() => {
51745
52035
  let result;
51746
- const variants = Query.from(flattenTypeMemberDeclarationList(this._node.body.memberBlock.memberList)).filter((m) => m.kind === 142 /* VariantDeclaration */);
52036
+ const variants = Query.from(flattenTypeMemberDeclarationList(this._node.body.memberBlock.memberList)).filter((m) => m.kind === 146 /* VariantDeclaration */);
51747
52037
  for (const variant of variants) {
51748
52038
  if (variant.value !== void 0) {
51749
52039
  const value = unwrapParenthesizedExpressions(variant.value);
@@ -51838,7 +52128,7 @@ var AnonymousVariantTypeDeclarationEntity = class {
51838
52128
  }
51839
52129
  getUnderlyingType() {
51840
52130
  return this._underlyingType.getOrInsertWith(() => {
51841
- const firstVariant = this._node.body.memberBlock.memberList.members.first((m) => m.kind === 142 /* VariantDeclaration */);
52131
+ const firstVariant = this._node.body.memberBlock.memberList.members.first((m) => m.kind === 146 /* VariantDeclaration */);
51842
52132
  if (firstVariant?.value !== void 0) {
51843
52133
  const type = this._analyzer.type.ofExpression(firstVariant.value);
51844
52134
  if (type.equals(this._analyzer.standardTypes.integer) || type.equals(this._analyzer.standardTypes.number) || type.equals(this._analyzer.standardTypes.text)) {
@@ -61369,7 +61659,7 @@ var IrBuilder = class {
61369
61659
  buildPackageVariantTypeDeclaration(declaration) {
61370
61660
  const modifiers = new Modifiers();
61371
61661
  const underlyingTypeKind = this.getUnderlyingTypeKind(this._analyzer.entity.ofPackageVariantTypeDeclaration(declaration));
61372
- const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 142 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
61662
+ const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 146 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
61373
61663
  const originalEntity = this._analyzer.entity.ofPackageVariantTypeDeclaration(declaration);
61374
61664
  const entity = this._entityMap.getVariantTypeEntity(originalEntity);
61375
61665
  return new PackageVariantTypeDeclaration4(
@@ -61442,7 +61732,7 @@ var IrBuilder = class {
61442
61732
  case 55 /* InvalidTypeMemberDeclaration */:
61443
61733
  Logger.errorAtNode("Unexpected invalid structured type member.", member);
61444
61734
  break;
61445
- case 142 /* VariantDeclaration */:
61735
+ case 146 /* VariantDeclaration */:
61446
61736
  break;
61447
61737
  case 53 /* FieldGetterDeclaration */:
61448
61738
  case 54 /* FieldSetterDeclaration */: {
@@ -61870,13 +62160,7 @@ var IrBuilder = class {
61870
62160
  }
61871
62161
  buildExpressionStatement(statement) {
61872
62162
  const expression = this.buildExpression(statement.expression);
61873
- let result;
61874
- if (this._analyzer.isExpressionImplicitlyReturnedFromSubprogram(statement)) {
61875
- result = new ReturnStatement3(expression, this.getSourceLocation(statement));
61876
- } else {
61877
- result = new ExpressionStatement3(expression, this.getSourceLocation(statement));
61878
- }
61879
- return result;
62163
+ return new ExpressionStatement3(expression, this.getSourceLocation(statement));
61880
62164
  }
61881
62165
  buildForStatement(statement) {
61882
62166
  const saveLoopLabel = this._currentLoopLabel;
@@ -63146,7 +63430,7 @@ var IrBuilder = class {
63146
63430
  buildAnonymousVariantTypeDeclaration(declaration) {
63147
63431
  const modifiers = new Modifiers();
63148
63432
  const underlyingTypeKind = this.getUnderlyingTypeKind(this._analyzer.entity.ofAnonymousVariantTypeDeclaration(declaration));
63149
- const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 142 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
63433
+ const variants = Query.from(declaration.body.memberBlock.memberList.members).mapAndFilter((m) => m.kind === 146 /* VariantDeclaration */ ? this.buildVariantDeclaration(m) : void 0).toArray();
63150
63434
  const originalEntity = this._analyzer.entity.ofAnonymousVariantTypeDeclaration(declaration);
63151
63435
  const entity = this._entityMap.getVariantTypeEntity(originalEntity);
63152
63436
  return new PackageVariantTypeDeclaration4(