@artel/artc 0.6.26016 → 0.6.26017

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.
Files changed (65) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +3 -7
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +64 -253
  5. package/build/{chunk-R55UIINW.js → chunk-65XBWCU7.js} +2 -2
  6. package/build/{chunk-46EEXYHP.js → chunk-SJFIPH42.js} +2133 -3888
  7. package/build/{chunk-6YO3VB2X.js → chunk-UCBPXOLW.js} +1 -1
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +0 -1
  9. package/build/types/analysis/Analyzer.d.ts +8 -29
  10. package/build/types/analysis/BaseExpressionMeaning.d.ts +2 -14
  11. package/build/types/analysis/CallExpressionMeaning.d.ts +1 -11
  12. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +2 -19
  13. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -17
  14. package/build/types/analysis/ReductionSourceMemberFinder.d.ts +0 -1
  15. package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -3
  16. package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -1
  17. package/build/types/analysis/SpecialNameKey.d.ts +32 -0
  18. package/build/types/analysis/TypeMemberConflictsValidator.d.ts +0 -1
  19. package/build/types/analysis/TypeMemberLookup.d.ts +1 -5
  20. package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
  21. package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +2 -2
  22. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +1 -6
  23. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -30
  24. package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -5
  25. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +2 -6
  26. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +2 -6
  27. package/build/types/analysis/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +0 -1
  28. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +2 -17
  29. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +1 -9
  30. package/build/types/common/Name.d.ts +3 -7
  31. package/build/types/diagnostic/DiagnosticCode.d.ts +110 -109
  32. package/build/types/emitter/EntityMap.d.ts +0 -1
  33. package/build/types/emitter/IrBuilder.d.ts +1 -2
  34. package/build/types/emitter/ir/Nodes.d.ts +24 -26
  35. package/build/types/entities/Entity.d.ts +2 -3
  36. package/build/types/entities/EntityLocalizationContext.d.ts +2 -3
  37. package/build/types/entities/OperatorKind.d.ts +20 -20
  38. package/build/types/entities/TypeEntityMembers.d.ts +2 -10
  39. package/build/types/entities/interfaces/FunctionEntity.d.ts +2 -1
  40. package/build/types/entities/interfaces/VariableEntity.d.ts +2 -2
  41. package/build/types/entities/interfaces/index.d.ts +0 -1
  42. package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +4 -2
  43. package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
  44. package/build/types/entities/source/SourceFunctionEntity.d.ts +4 -1
  45. package/build/types/entities/source/index.d.ts +0 -1
  46. package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +2 -1
  47. package/build/types/entities/translated/index.d.ts +0 -1
  48. package/build/types/parser/TokenKind.d.ts +1 -2
  49. package/build/types/services/DisplayService.d.ts +5 -27
  50. package/build/types/services/NodeSemanticInfo.d.ts +1 -6
  51. package/build/types/services/signature-help/SignatureWithParameters.d.ts +1 -8
  52. package/build/types/tree/BaseNode.d.ts +5 -5
  53. package/build/types/tree/Nodes.d.ts +7 -31
  54. package/build/types/tree/OperatorKind.d.ts +16 -17
  55. package/build/types/tree/SyntaxFactory.d.ts +0 -1
  56. package/build/types/tree/SyntaxToCode.d.ts +0 -1
  57. package/build/types/tree/TokenKind.d.ts +1 -2
  58. package/build/types/tree/index.d.ts +5 -5
  59. package/build/types/ts-interop/Entities.d.ts +3 -1
  60. package/build/types/types/TypeMembers.d.ts +3 -24
  61. package/package.json +1 -1
  62. package/build/types/analysis/OperatorAccessResolver.d.ts +0 -10
  63. package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -25
  64. package/build/types/entities/source/SourceOperatorEntity.d.ts +0 -42
  65. package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +0 -54
@@ -55,7 +55,7 @@ import {
55
55
  IntersectionTypeSpecifier,
56
56
  JavaScriptInterfacePackageImplementationConfig,
57
57
  JsonConfigurationFileNameSet,
58
- Keyword,
58
+ Keyword2 as Keyword,
59
59
  KeywordExpression,
60
60
  LocaleByConfigurationDirectoryName,
61
61
  LocaleByJsonConfigurationFileName,
@@ -76,8 +76,6 @@ import {
76
76
  NodePath,
77
77
  NodeTypeUtils,
78
78
  NullableTypeSpecifier,
79
- OperatorDeclaration,
80
- OperatorDeclaration_typeMember,
81
79
  Option,
82
80
  PackageAliasTypeDeclaration,
83
81
  PackageAspectDeclaration,
@@ -186,7 +184,7 @@ import {
186
184
  unwrapParenthesizedExpressions,
187
185
  visitChildren,
188
186
  yieldTask
189
- } from "../chunk-46EEXYHP.js";
187
+ } from "../chunk-SJFIPH42.js";
190
188
 
191
189
  // source/services/CustomRequests.ts
192
190
  import * as ls from "vscode-languageserver";
@@ -541,25 +539,6 @@ var SyntaxFactory = class {
541
539
  void 0
542
540
  );
543
541
  }
544
- static operatorDeclaration(tags, modifiers, name, parameters, returnTypeSpecifier, body, operatorKind) {
545
- const tagList = tags instanceof Array ? new TagList(tags, void 0) : tags;
546
- const modifierList = modifiers instanceof Array ? new ModifierList(modifiers, void 0) : modifiers;
547
- const functionKeyword = this.keyword(16 /* Function */);
548
- const nameIdentifier = this.identifier(name);
549
- const parameterClause = this.parameterClause(parameters);
550
- const returnTypeAnnotation = this.createTypeAnnotation(returnTypeSpecifier);
551
- return new OperatorDeclaration(
552
- tagList,
553
- modifierList,
554
- functionKeyword,
555
- nameIdentifier,
556
- parameterClause,
557
- returnTypeAnnotation,
558
- body,
559
- operatorKind,
560
- void 0
561
- );
562
- }
563
542
  static constructorDeclaration(tags, modifiers, parameters, body) {
564
543
  const tagList = tags instanceof Array ? new TagList(tags, void 0) : tags;
565
544
  const modifierList = modifiers instanceof Array ? new ModifierList(modifiers, void 0) : modifiers;
@@ -1053,16 +1032,6 @@ var SyntaxFactory = class {
1053
1032
  node.returnTypeAnnotation?.typeSpecifier,
1054
1033
  node.block
1055
1034
  );
1056
- case 48 /* OperatorDeclaration */:
1057
- return this.operatorDeclaration(
1058
- node.tagList,
1059
- modifierList,
1060
- node.name,
1061
- node.parameterClause.parameterList,
1062
- node.returnTypeAnnotation?.typeSpecifier,
1063
- node.block,
1064
- node.operatorKind
1065
- );
1066
1035
  case 49 /* FieldDeclaration */:
1067
1036
  return this.fieldDeclaration(
1068
1037
  node.tagList,
@@ -1465,20 +1434,6 @@ var SyntaxToCode = class _SyntaxToCode {
1465
1434
  this.writeDeclarationBody(node.block);
1466
1435
  }
1467
1436
  }
1468
- writeOperatorDeclaration(node) {
1469
- this.writeDeclarationTags(node.tagList);
1470
- this.writeDeclarationModifiers(node.modifierList);
1471
- this.writeKeyword(node.functionKeyword);
1472
- this.writeWhitespace();
1473
- this.writeToken(node.name);
1474
- this.writeParameterClause(node.parameterClause);
1475
- if (node.returnTypeAnnotation !== void 0) {
1476
- this.writeTypeAnnotation(node.returnTypeAnnotation, true);
1477
- }
1478
- if (node.block !== void 0) {
1479
- this.writeDeclarationBody(node.block);
1480
- }
1481
- }
1482
1437
  writeConstructorDeclaration(node) {
1483
1438
  this.writeDeclarationTags(node.tagList);
1484
1439
  this.writeDeclarationModifiers(node.modifierList);
@@ -2071,7 +2026,6 @@ var SyntaxToCode = class _SyntaxToCode {
2071
2026
  case 43 /* IndexedElementSetterDeclaration */:
2072
2027
  case 46 /* DereferencedVariableSetterDeclaration */:
2073
2028
  case 47 /* MethodDeclaration */:
2074
- case 48 /* OperatorDeclaration */:
2075
2029
  case 22 /* PackageEntryPointDeclaration */:
2076
2030
  return 3155970 /* SingularFemNoun */;
2077
2031
  case 19 /* PackageAliasTypeDeclaration */:
@@ -2198,7 +2152,6 @@ var SyntaxToCode = class _SyntaxToCode {
2198
2152
  [45 /* DereferencedVariableGetterDeclaration */]: this.prototype.writeDereferencedVariableGetterDeclaration,
2199
2153
  [46 /* DereferencedVariableSetterDeclaration */]: this.prototype.writeDereferencedVariableSetterDeclaration,
2200
2154
  [47 /* MethodDeclaration */]: this.prototype.writeMethodDeclaration,
2201
- [48 /* OperatorDeclaration */]: this.prototype.writeOperatorDeclaration,
2202
2155
  [49 /* FieldDeclaration */]: this.prototype.writeFieldDeclaration,
2203
2156
  [50 /* FieldGetterDeclaration */]: this.prototype.writeFieldGetterDeclaration,
2204
2157
  [51 /* FieldSetterDeclaration */]: this.prototype.writeFieldSetterDeclaration,
@@ -2862,8 +2815,6 @@ var TranslationsGenerator = class _TranslationsGenerator {
2862
2815
  return this.createConstructorTranslation(entity);
2863
2816
  case 5 /* Indexer */:
2864
2817
  return this.createIndexerTranslation(entity);
2865
- case 9 /* Operator */:
2866
- return this.createOperatorTranslation(entity);
2867
2818
  case 6 /* DereferenceOperator */:
2868
2819
  case 8 /* Destructor */:
2869
2820
  return void 0;
@@ -2876,7 +2827,13 @@ var TranslationsGenerator = class _TranslationsGenerator {
2876
2827
  return SyntaxFactory.fieldOrVariantTranslation(name, name);
2877
2828
  }
2878
2829
  createMethodTranslation(entity) {
2879
- const name = this.getNameText(entity.getName());
2830
+ let name;
2831
+ const operatorKind = entity.getOperatorKind();
2832
+ if (operatorKind === void 0) {
2833
+ name = this.getNameText(entity.getName());
2834
+ } else {
2835
+ name = `'${LocalizationHelper.localizeOperatorKind(operatorKind, this.locale, this.dialect)}'`;
2836
+ }
2880
2837
  const typeParameters = entity.getTypeParameters().map((p) => this.getNameText(p.getName()));
2881
2838
  const parameters = this.createParameters(entity.getParameters());
2882
2839
  return SyntaxFactory.methodTranslation(name, typeParameters, parameters, name, typeParameters, parameters);
@@ -2889,17 +2846,11 @@ var TranslationsGenerator = class _TranslationsGenerator {
2889
2846
  const parameters = this.createParameters(entity.getParameters());
2890
2847
  return SyntaxFactory.indexerTranslation(parameters, parameters);
2891
2848
  }
2892
- createOperatorTranslation(entity) {
2893
- const name = `'${LocalizationHelper.localizeOperatorKind(entity.getOperatorKind(), this.locale, this.dialect)}'`;
2894
- const parameters = this.createParameters(entity.getParameters());
2895
- return SyntaxFactory.methodTranslation(name, [], parameters, name, [], parameters);
2896
- }
2897
2849
  createParameters(parameters) {
2898
2850
  return parameters.map((p) => {
2899
- const name = p.getName();
2900
2851
  const nameText = this.getNameText(p.getName());
2901
2852
  let flags = 0 /* None */;
2902
- if ((name.flags & 64 /* ObjectParameterName */) !== 0) {
2853
+ if (p.isObjectParameter()) {
2903
2854
  flags |= 2048 /* ObjectParameterName */;
2904
2855
  }
2905
2856
  return SyntaxFactory.identifier(nameText, flags);
@@ -3119,15 +3070,6 @@ var SignatureForNode = class _SignatureForNode {
3119
3070
  });
3120
3071
  return new SignaturesWithSingleSuitable(signatures, suitableSignatureIndex);
3121
3072
  }
3122
- case "operator-call": {
3123
- let suitableSignatureIndex;
3124
- const singleOperator = meaning.singleOperator;
3125
- if (singleOperator !== void 0) {
3126
- suitableSignatureIndex = meaning.candidates.findIndex((c) => c.equals(singleOperator));
3127
- }
3128
- const signatures = meaning.candidates.map((c) => new OperatorSignature(c));
3129
- return new SignaturesWithSingleSuitable(signatures, suitableSignatureIndex);
3130
- }
3131
3073
  case "object-function-call": {
3132
3074
  const signature = new FunctionTypeSignature(meaning.type);
3133
3075
  return new SignaturesWithSingleSuitable([signature], 0);
@@ -3353,16 +3295,6 @@ var AccessedFunctionSignature = class {
3353
3295
  return this.parameters.getOrInsertWith(() => this.func.getParameters().map((p) => new UniversalParameter(p.type, p.entity)));
3354
3296
  }
3355
3297
  };
3356
- var OperatorSignature = class {
3357
- constructor(operator) {
3358
- this.kind = "operator";
3359
- this.parameters = new Cached();
3360
- this.operator = operator;
3361
- }
3362
- getParameters() {
3363
- return this.parameters.getOrInsertWith(() => this.operator.getParameters().map((p) => new UniversalParameter(p.getType(), p.getEntity())));
3364
- }
3365
- };
3366
3298
  var FunctionTypeSignature = class {
3367
3299
  constructor(functionType) {
3368
3300
  this.kind = "function-type";
@@ -3501,7 +3433,7 @@ var CompletionService = class {
3501
3433
  if (syntaxContext.isInComment || syntaxContext.isInText) {
3502
3434
  return { kind: "none" };
3503
3435
  }
3504
- if (syntaxContext.isInQuotedIdentifier !== void 0 && (syntaxContext.isInQuotedIdentifier.parent.kind === 48 /* OperatorDeclaration */ || syntaxContext.isInQuotedIdentifier.parent.kind === 47 /* MethodDeclaration */)) {
3436
+ if (syntaxContext.isInQuotedIdentifier !== void 0 && syntaxContext.isInQuotedIdentifier.parent.kind === 47 /* MethodDeclaration */) {
3505
3437
  return new OperatorNameCompletionContext(syntaxContext.isInQuotedIdentifier);
3506
3438
  }
3507
3439
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
@@ -3910,14 +3842,16 @@ var CompletionService = class {
3910
3842
  if (syntaxContext.isExpressionContext !== void 0) {
3911
3843
  kinds.add(47 /* Not */).add(56 /* Yes */).add(57 /* No */).add(61 /* Null */).add(44 /* Async */).add(16 /* Function */).add(58 /* Reference */).add(2 /* Autotype */).add(34 /* Cond */).add(35 /* Creation */);
3912
3844
  const objectVariableInfo = semanticContext.getObjectVariableInfo();
3913
- if (objectVariableInfo !== void 0) {
3845
+ if (objectVariableInfo !== void 0 && !(objectVariableInfo.kind === "containing-type-context" && semanticContext.isStatic())) {
3914
3846
  kinds.add(7 /* Object */);
3915
3847
  }
3916
- const container = semanticContext.getContainingTypeOrTypeExtension();
3917
- if (container !== void 0 && container.kind === "type") {
3918
- const typeEntity = container.value;
3919
- if (typeEntity?.typeEntityKind === 1 /* Structured */ && typeEntity.getBaseObjectType() !== void 0 || typeEntity?.typeEntityKind === 3 /* Variant */ || typeEntity?.typeEntityKind === 4 /* Alias */) {
3920
- kinds.add(60 /* Base */);
3848
+ if (!semanticContext.isStatic()) {
3849
+ const container = semanticContext.getContainingTypeOrTypeExtension();
3850
+ if (container !== void 0 && container.kind === "type") {
3851
+ const typeEntity = container.value;
3852
+ if (typeEntity?.typeEntityKind === 1 /* Structured */ && typeEntity.getBaseObjectType() !== void 0 || typeEntity?.typeEntityKind === 3 /* Variant */ || typeEntity?.typeEntityKind === 4 /* Alias */) {
3853
+ kinds.add(60 /* Base */);
3854
+ }
3921
3855
  }
3922
3856
  }
3923
3857
  }
@@ -4080,12 +4014,13 @@ var CompletionService = class {
4080
4014
  }
4081
4015
  getScopeCompletionItemInfos(semanticContext) {
4082
4016
  return Query.from(semanticContext.getNamedDeclarations()).mapAndFilter((d) => {
4083
- if ((d.getName().flags & 64 /* ObjectParameterName */) !== 0) {
4084
- return void 0;
4085
- }
4086
4017
  switch (d.kind) {
4087
4018
  case "variable": {
4088
4019
  if (d.value.kind === "entity") {
4020
+ const entity = d.value.value;
4021
+ if (entity.subkind === "parameter" && entity.isObjectParameter()) {
4022
+ return void 0;
4023
+ }
4089
4024
  return new VariableEntityCompletionItemInfo(this.completionItemInfoContext, d.value.value);
4090
4025
  } else {
4091
4026
  return new FieldCompletionItemInfo(this.completionItemInfoContext, d.value.value);
@@ -4108,9 +4043,7 @@ var CompletionService = class {
4108
4043
  default:
4109
4044
  Debug.never(d);
4110
4045
  }
4111
- }).chain(
4112
- Query.from(semanticContext.getOperators()).map((o) => new OperatorCompletionItemInfo(this.completionItemInfoContext, o))
4113
- );
4046
+ });
4114
4047
  }
4115
4048
  getTypeCompletionItemInfos(ctx) {
4116
4049
  let result;
@@ -4271,7 +4204,7 @@ var CompletionService = class {
4271
4204
  default:
4272
4205
  Debug.never(m);
4273
4206
  }
4274
- }).concat(memberLookup.getOperators(ctx.lookupContext, ctx.lookupOptions).map((o) => new OperatorCompletionItemInfo(this.completionItemInfoContext, o)));
4207
+ });
4275
4208
  }
4276
4209
  getPackageImportCompletionItemInfos(ctx) {
4277
4210
  const result = this.analyzer.packageImports.getPackagesAvailableForImport(this.sourceFile.package).map((p) => p.getName()).filter((n) => {
@@ -4420,8 +4353,7 @@ var CompletionService = class {
4420
4353
  for (const itemInfo of completionItemInfos) {
4421
4354
  switch (itemInfo.kind) {
4422
4355
  case "method":
4423
- case "function-entity":
4424
- case "operator": {
4356
+ case "function-entity": {
4425
4357
  const label = itemInfo.getLabel();
4426
4358
  const functionInfo = functionInfoByLabel.get(label);
4427
4359
  if (functionInfo !== void 0) {
@@ -4775,10 +4707,17 @@ var MethodCompletionItemInfo = class {
4775
4707
  this.kind = "method";
4776
4708
  }
4777
4709
  getLabel() {
4778
- return this.ctx.getInsertTextForName(this.method.getName());
4710
+ let result;
4711
+ const operatorKind = this.method.getOperatorKind();
4712
+ if (operatorKind === void 0) {
4713
+ result = this.ctx.getInsertTextForName(this.method.getName());
4714
+ } else {
4715
+ result = `'${this.ctx.displayService.displayOperatorKind(operatorKind)}'`;
4716
+ }
4717
+ return result;
4779
4718
  }
4780
4719
  getCompletionItemKind() {
4781
- return 3 /* Method */;
4720
+ return this.method.getOperatorKind() === void 0 ? 3 /* Method */ : 4 /* Operator */;
4782
4721
  }
4783
4722
  getDetails() {
4784
4723
  return this.ctx.displayService.displayTypeMember(this.method);
@@ -4793,31 +4732,6 @@ var MethodCompletionItemInfo = class {
4793
4732
  return void 0;
4794
4733
  }
4795
4734
  };
4796
- var OperatorCompletionItemInfo = class {
4797
- constructor(ctx, operator) {
4798
- this.ctx = ctx;
4799
- this.operator = operator;
4800
- this.kind = "operator";
4801
- }
4802
- getLabel() {
4803
- return `'${this.ctx.displayService.displayOperatorKind(this.operator.getOperatorKind())}'`;
4804
- }
4805
- getCompletionItemKind() {
4806
- return 4 /* Operator */;
4807
- }
4808
- getDetails() {
4809
- return this.ctx.displayService.displayTypeMember(this.operator);
4810
- }
4811
- getInsertText() {
4812
- return void 0;
4813
- }
4814
- getSortText() {
4815
- return void 0;
4816
- }
4817
- getEditRange() {
4818
- return void 0;
4819
- }
4820
- };
4821
4735
  var VariableEntityCompletionItemInfo = class {
4822
4736
  constructor(ctx, entity) {
4823
4737
  this.ctx = ctx;
@@ -4861,14 +4775,21 @@ var FunctionEntityCompletionItemInfo = class {
4861
4775
  this.kind = "function-entity";
4862
4776
  }
4863
4777
  getLabel() {
4864
- return this.ctx.getInsertTextForName(this.entity.getName());
4778
+ let result;
4779
+ const operatorKind = this.entity.subkind === "method" ? this.entity.getOperatorKind() : void 0;
4780
+ if (operatorKind === void 0) {
4781
+ result = this.ctx.getInsertTextForName(this.entity.getName());
4782
+ } else {
4783
+ result = `'${this.ctx.displayService.displayOperatorKind(operatorKind)}'`;
4784
+ }
4785
+ return result;
4865
4786
  }
4866
4787
  getCompletionItemKind() {
4867
4788
  switch (this.entity.subkind) {
4868
4789
  case "package":
4869
4790
  return 8 /* PackageFunction */;
4870
4791
  case "method":
4871
- return 3 /* Method */;
4792
+ return this.entity.subkind === "method" && this.entity.getOperatorKind() !== void 0 ? 4 /* Operator */ : 3 /* Method */;
4872
4793
  case "nested":
4873
4794
  return 11 /* NestedFunction */;
4874
4795
  default:
@@ -5614,7 +5535,7 @@ var SyntaxContextFactory = class {
5614
5535
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5615
5536
  tokenOrKeyword,
5616
5537
  46 /* DereferencedVariableSetterDeclaration */
5617
- ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 47 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 48 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 40 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 41 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 145 /* VariantValueDeclaration */)) {
5538
+ ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 47 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 40 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 41 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 145 /* VariantValueDeclaration */)) {
5618
5539
  return true;
5619
5540
  }
5620
5541
  if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 152 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
@@ -6055,9 +5976,6 @@ var NodeSemanticInfoService = class {
6055
5976
  case 47 /* MethodDeclaration */:
6056
5977
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofMethodDeclaration(parent));
6057
5978
  break;
6058
- case 48 /* OperatorDeclaration */:
6059
- result = new DefinitionNodeSemanticInfo(analyzer.entity.ofOperatorDeclaration(parent));
6060
- break;
6061
5979
  case 49 /* FieldDeclaration */:
6062
5980
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofFieldDeclaration(parent));
6063
5981
  break;
@@ -6145,14 +6063,6 @@ var NodeSemanticInfoService = class {
6145
6063
  }
6146
6064
  break;
6147
6065
  }
6148
- case "operator-access": {
6149
- if (isNonEmptyArray(meaning.suitableOperators)) {
6150
- result = createOperatorsReference(meaning.suitableOperators, meaning.suitableOperators.length > 1);
6151
- } else if (isNonEmptyArray(meaning.candidates)) {
6152
- result = createOperatorsReference(meaning.candidates, true);
6153
- }
6154
- break;
6155
- }
6156
6066
  case "package-function-access": {
6157
6067
  let functions;
6158
6068
  if (meaning.singleNotSuitableSubstitutedCandidate !== void 0) {
@@ -6215,10 +6125,6 @@ var NodeSemanticInfoService = class {
6215
6125
  result = this.getBetterReferenceTargetsOrPreserve(result);
6216
6126
  }
6217
6127
  return result;
6218
- function createOperatorsReference(operators, isAmbiguous) {
6219
- const targets = operators.map((o) => new OperatorReferenceTarget(o));
6220
- return new ReferenceNodeSemanticInfo(createNonEmptyArray(targets), isAmbiguous);
6221
- }
6222
6128
  }
6223
6129
  static ofQualifiedNameQualifier(analyzer, node, qualifier, options7) {
6224
6130
  switch (node.parent.kind) {
@@ -6415,14 +6321,6 @@ var NodeSemanticInfoService = class {
6415
6321
  }
6416
6322
  break;
6417
6323
  }
6418
- case "operator-access": {
6419
- if (isNonEmptyArray(meaning.suitableOperators)) {
6420
- result = createOperatorsReference(meaning.suitableOperators, meaning.suitableOperators.length > 1);
6421
- } else if (isNonEmptyArray(meaning.candidates)) {
6422
- result = createOperatorsReference(meaning.candidates, true);
6423
- }
6424
- break;
6425
- }
6426
6324
  case "variable-access": {
6427
6325
  let narrowedType;
6428
6326
  if (isNarrowableReferenceExpression(node)) {
@@ -6480,10 +6378,6 @@ var NodeSemanticInfoService = class {
6480
6378
  result = this.getBetterReferenceTargetsOrPreserve(result);
6481
6379
  }
6482
6380
  return result;
6483
- function createOperatorsReference(operators, isAmbiguous) {
6484
- const targets = operators.map((o) => new OperatorReferenceTarget(o));
6485
- return new ReferenceNodeSemanticInfo(createNonEmptyArray(targets), isAmbiguous);
6486
- }
6487
6381
  }
6488
6382
  static ofConstructorDeclaration(analyzer, node) {
6489
6383
  const entity = analyzer.entity.ofConstructorDeclaration(node);
@@ -6522,7 +6416,7 @@ var NodeSemanticInfoService = class {
6522
6416
  if (operatorKind !== void 0) {
6523
6417
  const operator = analyzer.resolveCompoundAssignmentStatementOperator(node, operatorKind);
6524
6418
  if (operator !== void 0) {
6525
- const target = new OperatorReferenceTarget(operator);
6419
+ const target = new AccessedFunctionReferenceTarget(new AccessedFunction_typeMember(operator));
6526
6420
  let result = new ReferenceNodeSemanticInfo([target], false);
6527
6421
  if (options7.includeBetterReferenceTargets) {
6528
6422
  result = this.getBetterReferenceTargetsOrPreserve(result);
@@ -6537,7 +6431,7 @@ var NodeSemanticInfoService = class {
6537
6431
  if (classificationResult.kind === "user-definable") {
6538
6432
  const operator = analyzer.resolveBinaryExpressionUserDefinableOperator(node, classificationResult.operatorKind);
6539
6433
  if (operator !== void 0) {
6540
- const target = new OperatorReferenceTarget(operator);
6434
+ const target = new AccessedFunctionReferenceTarget(new AccessedFunction_typeMember(operator));
6541
6435
  let result = new ReferenceNodeSemanticInfo([target], false);
6542
6436
  if (options7.includeBetterReferenceTargets) {
6543
6437
  result = this.getBetterReferenceTargetsOrPreserve(result);
@@ -6550,7 +6444,7 @@ var NodeSemanticInfoService = class {
6550
6444
  static ofPrefixUnaryExpressionOperator(analyzer, node, options7) {
6551
6445
  const operator = analyzer.resolvePrefixUnaryExpressionUserDefinableOperator(node);
6552
6446
  if (operator !== void 0) {
6553
- const target = new OperatorReferenceTarget(operator);
6447
+ const target = new AccessedFunctionReferenceTarget(new AccessedFunction_typeMember(operator));
6554
6448
  let result = new ReferenceNodeSemanticInfo([target], false);
6555
6449
  if (options7.includeBetterReferenceTargets) {
6556
6450
  result = this.getBetterReferenceTargetsOrPreserve(result);
@@ -6663,11 +6557,6 @@ var NodeSemanticInfoService = class {
6663
6557
  case "overridden-method-access": {
6664
6558
  return this.ofAccessedFunctions([meaning.method]);
6665
6559
  }
6666
- case "overridden-operator-access": {
6667
- const target = new OperatorReferenceTarget(meaning.operator);
6668
- result = new ReferenceNodeSemanticInfo([target], false);
6669
- break;
6670
- }
6671
6560
  case "unresolved":
6672
6561
  break;
6673
6562
  default:
@@ -7024,12 +6913,6 @@ var AccessedFunctionReferenceTarget = class {
7024
6913
  this.kind = "accessed-function";
7025
6914
  }
7026
6915
  };
7027
- var OperatorReferenceTarget = class {
7028
- constructor(operator) {
7029
- this.operator = operator;
7030
- this.kind = "operator";
7031
- }
7032
- };
7033
6916
  var MatchResultParameterReferenceTarget = class {
7034
6917
  constructor(parameter, accessKind) {
7035
6918
  this.parameter = parameter;
@@ -7134,7 +7017,6 @@ function getEntitySourceLocations(analyzer, entity) {
7134
7017
  case 53 /* NestedFunctionDeclaration */:
7135
7018
  case 47 /* MethodDeclaration */:
7136
7019
  case 146 /* TypeParameterDeclaration */:
7137
- case 48 /* OperatorDeclaration */:
7138
7020
  case 27 /* PackageClassDeclaration */:
7139
7021
  case 28 /* PackageStructureDeclaration */:
7140
7022
  case 29 /* PackageAspectDeclaration */:
@@ -7361,8 +7243,6 @@ var DefinitionService = class {
7361
7243
  return getEntitySourceLocations(analyzer, target.constructor_.getEntity());
7362
7244
  case "accessed-function":
7363
7245
  return getEntitySourceLocations(analyzer, target.func.getEntity());
7364
- case "operator":
7365
- return getEntitySourceLocations(analyzer, target.operator.getEntity());
7366
7246
  case "type-dereference-operator":
7367
7247
  return getEntitySourceLocations(analyzer, target.operator.getEntity());
7368
7248
  case "match-result-value-parameter":
@@ -7399,8 +7279,6 @@ var DefinitionService = class {
7399
7279
  return target.parameter.getEntity();
7400
7280
  case "type-constructor":
7401
7281
  return target.constructor_.getEntity();
7402
- case "operator":
7403
- return target.operator.getEntity();
7404
7282
  case "type-dereference-operator":
7405
7283
  return target.operator.getEntity();
7406
7284
  case "accessed-function":
@@ -7475,9 +7353,6 @@ var DefinitionService = class {
7475
7353
  case 46 /* DereferencedVariableSetterDeclaration */:
7476
7354
  range = node.caretToken.rangeWithoutTrivia;
7477
7355
  break;
7478
- case 48 /* OperatorDeclaration */:
7479
- range = node.name.rangeWithoutTrivia;
7480
- break;
7481
7356
  case 63 /* FunctionBlockLiteral */:
7482
7357
  range = node.block.openBraceToken.rangeWithoutTrivia;
7483
7358
  break;
@@ -7519,7 +7394,6 @@ var DefinitionService = class {
7519
7394
  result.push(target.type);
7520
7395
  break;
7521
7396
  case "type-constructor":
7522
- case "operator":
7523
7397
  case "type-dereference-operator":
7524
7398
  case "accessed-function":
7525
7399
  case "type-indexer":
@@ -7955,8 +7829,6 @@ var ReferencesService = class {
7955
7829
  return new DefinitionInfo(t.parameter.getEntity(), accessKindToReferenceKind(t.accessKind));
7956
7830
  case "type-constructor":
7957
7831
  return new DefinitionInfo(t.constructor_.getEntity(), 0 /* Read */);
7958
- case "operator":
7959
- return new DefinitionInfo(t.operator.getEntity(), 0 /* Read */);
7960
7832
  case "type-dereference-operator":
7961
7833
  return new DefinitionInfo(t.operator.getEntity(), accessKindToReferenceKind(t.accessKind));
7962
7834
  case "accessed-function":
@@ -8003,15 +7875,6 @@ var ReferencesService = class {
8003
7875
  result.canBeAutotypeCall = true;
8004
7876
  result.canBeConstructorDeclaration = true;
8005
7877
  }
8006
- if (definition.value.kind === 9 /* Operator */) {
8007
- const operatorKind = definition.value.getOperatorKind();
8008
- if (isUnaryOperator(operatorKind)) {
8009
- result.canBePrefixUnaryOperator = true;
8010
- } else {
8011
- result.canBeBinaryExpressionOperator = true;
8012
- result.canBeAssignmentStatementOperator = true;
8013
- }
8014
- }
8015
7878
  if (definition.value.kind === 6 /* DereferenceOperator */) {
8016
7879
  result.canBeDereferenceOperator = true;
8017
7880
  }
@@ -8027,6 +7890,17 @@ var ReferencesService = class {
8027
7890
  if (definition.value.kind === 0 /* Variable */ && definition.value.subkind === "parameter" && definition.value.isObjectParameter()) {
8028
7891
  result.canBeObjectParameter = true;
8029
7892
  }
7893
+ if (definition.value.kind === 1 /* Function */ && definition.value.subkind === "method") {
7894
+ const operatorKind = definition.value.getOperatorKind();
7895
+ if (operatorKind !== void 0) {
7896
+ if (isUnaryOperator(operatorKind)) {
7897
+ result.canBePrefixUnaryOperator = true;
7898
+ } else {
7899
+ result.canBeBinaryExpressionOperator = true;
7900
+ result.canBeAssignmentStatementOperator = true;
7901
+ }
7902
+ }
7903
+ }
8030
7904
  return result;
8031
7905
  }
8032
7906
  ifReferenceToSomeOfDefinitionsThenKind(definitions, potentialReferenceSemanticInfo, allowAmbiguous, isForRename) {
@@ -8140,7 +8014,6 @@ var ReferencesService = class {
8140
8014
  case 6 /* DereferenceOperator */:
8141
8015
  case 12 /* Package */:
8142
8016
  case 11 /* TypeExtension */:
8143
- case 9 /* Operator */:
8144
8017
  case 13 /* TextTranslation */:
8145
8018
  return void 0;
8146
8019
  default:
@@ -8333,7 +8206,6 @@ var EvaluatableExpressionService = class {
8333
8206
  case 34 /* PackageVariableSetterDeclaration */:
8334
8207
  case 50 /* FieldGetterDeclaration */:
8335
8208
  case 51 /* FieldSetterDeclaration */:
8336
- case 48 /* OperatorDeclaration */:
8337
8209
  case 144 /* TranslationTextTemplateParameter */:
8338
8210
  case 27 /* PackageClassDeclaration */:
8339
8211
  case 28 /* PackageStructureDeclaration */:
@@ -8471,10 +8343,6 @@ var HoverService = class {
8471
8343
  const declaration = new ConstructorDeclaration_typeMember(firstTarget.constructor_);
8472
8344
  return new Hover(this.displayService.displayConstructorDeclaration(declaration), range);
8473
8345
  }
8474
- case "operator": {
8475
- const operator = new OperatorDeclaration_typeMember(firstTarget.operator);
8476
- return new Hover(this.displayService.displayOperatorDeclaration(operator), range);
8477
- }
8478
8346
  case "type-dereference-operator": {
8479
8347
  const operator = new DereferenceOperatorDeclaration_typeMember(firstTarget.operator);
8480
8348
  return new Hover(this.displayService.displayDereferenceOperatorDeclaration(operator), range);
@@ -8637,9 +8505,6 @@ var RenameService = class {
8637
8505
  case "match-result-value-parameter":
8638
8506
  canBeRenamed = this.entityCanBeRenamed(analyzer, target.parameter.entity);
8639
8507
  break;
8640
- case "operator":
8641
- canBeRenamed = this.entityCanBeRenamed(analyzer, target.operator.getEntity());
8642
- break;
8643
8508
  case "type-constructor":
8644
8509
  case "type-dereference-operator":
8645
8510
  case "package":
@@ -8965,13 +8830,6 @@ var SemanticTokensService = class {
8965
8830
  )
8966
8831
  );
8967
8832
  }
8968
- if (meaning.kind === "operator-access") {
8969
- result.push(new SemanticToken(
8970
- node.rangeWithoutTrivia,
8971
- 7 /* Operator */,
8972
- new SemanticTokenModifiers()
8973
- ));
8974
- }
8975
8833
  }
8976
8834
  if (node.kind === 73 /* MemberAccessExpression */) {
8977
8835
  const meaning = analyzer.resolveMemberAccessExpression(node);
@@ -9009,13 +8867,6 @@ var SemanticTokensService = class {
9009
8867
  )
9010
8868
  );
9011
8869
  }
9012
- if (meaning.kind === "operator-access") {
9013
- result.push(new SemanticToken(
9014
- node.memberName.rangeWithoutTrivia,
9015
- 7 /* Operator */,
9016
- new SemanticTokenModifiers()
9017
- ));
9018
- }
9019
8870
  }
9020
8871
  if (node.kind === 145 /* VariantValueDeclaration */) {
9021
8872
  result.push(
@@ -9045,13 +8896,10 @@ var SemanticTokensService = class {
9045
8896
  );
9046
8897
  }
9047
8898
  if (node.kind === 47 /* MethodDeclaration */) {
8899
+ const entity = analyzer.entity.ofMethodDeclaration(node);
8900
+ const kind = this.getSemanticTokenKindForNamedFunctionEntity(entity);
9048
8901
  result.push(
9049
- new SemanticToken(node.name.rangeWithoutTrivia, 6 /* Method */, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
9050
- );
9051
- }
9052
- if (node.kind === 48 /* OperatorDeclaration */) {
9053
- result.push(
9054
- new SemanticToken(node.name.rangeWithoutTrivia, 7 /* Operator */, new SemanticTokenModifiers().makeDeclaration())
8902
+ new SemanticToken(node.name.rangeWithoutTrivia, kind, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
9055
8903
  );
9056
8904
  }
9057
8905
  return void 0;
@@ -9068,7 +8916,7 @@ var SemanticTokensService = class {
9068
8916
  case "package":
9069
8917
  return 4 /* PackageFunction */;
9070
8918
  case "method":
9071
- return 6 /* Method */;
8919
+ return entity.getOperatorKind() === void 0 ? 6 /* Method */ : 7 /* Operator */;
9072
8920
  case "nested":
9073
8921
  return 5 /* NestedFunction */;
9074
8922
  default:
@@ -9621,11 +9469,6 @@ var ParametersSignatureHelpProvider = class {
9621
9469
  const displayParts = this.signatureContext.displayService.getFunctionDeclarationDisplayParts(func);
9622
9470
  return this.signatureContext.convertFunctionDisplayParts(displayParts);
9623
9471
  }
9624
- case "operator": {
9625
- const operator = new OperatorDeclaration_typeMember(signature.operator);
9626
- const displayParts = this.signatureContext.displayService.getOperatorDeclarationDisplayParts(operator);
9627
- return this.signatureContext.convertOperatorDisplayParts(displayParts);
9628
- }
9629
9472
  case "function-type": {
9630
9473
  const displayParts = this.signatureContext.displayService.getFunctionTypeBodyDisplayParts(signature.functionType);
9631
9474
  return this.signatureContext.convertFunctionTypeBodyDisplayParts(displayParts);
@@ -9716,16 +9559,7 @@ var SignatureInfo = class {
9716
9559
  };
9717
9560
 
9718
9561
  // source/services/source-generation/SourceGenerationService.ts
9719
- import {
9720
- transaction as transaction6,
9721
- signal as signal7,
9722
- RxMap as RxMap6,
9723
- RxObject as RxObject7,
9724
- options as options6,
9725
- reaction as reaction6,
9726
- Reentrance as Reentrance3,
9727
- Transaction as Transaction4
9728
- } from "reactronic";
9562
+ import { options as options6, reaction as reaction6, Reentrance as Reentrance3, RxMap as RxMap6, RxObject as RxObject7, signal as signal7, transaction as transaction6, Transaction as Transaction4 } from "reactronic";
9729
9563
 
9730
9564
  // source/services/workspace/ClientTrackedSourceFiles.ts
9731
9565
  import { RxMap, RxObject, signal, transaction, disposeRxObject } from "reactronic";
@@ -12962,7 +12796,6 @@ var SourceGenerationService = class extends RxObject7 {
12962
12796
  case 6 /* DereferenceOperator */:
12963
12797
  case 7 /* Constructor */:
12964
12798
  case 8 /* Destructor */:
12965
- case 9 /* Operator */:
12966
12799
  return this.checkIfEntityOfKindIsPresentInGeneratedCode(entity.getContainingEntity());
12967
12800
  case 10 /* PackageAlias */:
12968
12801
  return false;
@@ -13065,8 +12898,6 @@ var EntityFinder = class {
13065
12898
  return this.findConstructorEntity(entity);
13066
12899
  case 8 /* Destructor */:
13067
12900
  return this.findDestructorEntity(entity);
13068
- case 9 /* Operator */:
13069
- return this.findOperatorEntity(entity);
13070
12901
  case 5 /* Indexer */:
13071
12902
  return this.findIndexerEntity(entity);
13072
12903
  case 6 /* DereferenceOperator */:
@@ -13182,23 +13013,6 @@ var EntityFinder = class {
13182
13013
  return index >= 0 ? members[index] : void 0;
13183
13014
  }
13184
13015
  }
13185
- findOperatorEntity(entity) {
13186
- const containingType = this.findEntity(entity.getContainingEntity());
13187
- if (!(containingType !== void 0 && isTypeEntity(containingType) && isTypeEntityWithMembers(containingType))) {
13188
- return void 0;
13189
- }
13190
- const members = containingType.getMembers().getOperators();
13191
- if (members.length === 0) {
13192
- return void 0;
13193
- } else if (members.length === 1) {
13194
- return members[0];
13195
- } else {
13196
- const referenceData = new DataForFindingOverloadedMember([], entity.getParameters());
13197
- const membersData = members.map((m) => new DataForFindingOverloadedMember([], m.getParameters()));
13198
- const index = this.findOverloadedMemberIndex(referenceData, membersData);
13199
- return index >= 0 ? members[index] : void 0;
13200
- }
13201
- }
13202
13016
  findIndexerEntity(entity) {
13203
13017
  const containingType = this.findEntity(entity.getContainingEntity());
13204
13018
  if (!(containingType !== void 0 && isTypeEntity(containingType) && isTypeEntityWithMembers(containingType))) {
@@ -13258,8 +13072,6 @@ var EntityFinder = class {
13258
13072
  }
13259
13073
  return void 0;
13260
13074
  }
13261
- case 9 /* Operator */:
13262
- return entity.getParameters();
13263
13075
  case 0 /* Variable */:
13264
13076
  case 3 /* Getter */:
13265
13077
  case 4 /* Setter */:
@@ -13294,7 +13106,6 @@ var EntityFinder = class {
13294
13106
  case 10 /* PackageAlias */:
13295
13107
  case 12 /* Package */:
13296
13108
  case 11 /* TypeExtension */:
13297
- case 9 /* Operator */:
13298
13109
  case 13 /* TextTranslation */:
13299
13110
  return void 0;
13300
13111
  default: