@artel/artc 0.6.25221 → 0.6.25222

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.
@@ -27,6 +27,7 @@ import {
27
27
  Emitter,
28
28
  EntityLocalizationHelper,
29
29
  FileSystemTree,
30
+ FunctionBlock,
30
31
  GeneratedSourceFileScheme,
31
32
  GenericCancellationToken,
32
33
  InMemoryPackageScheme,
@@ -181,7 +182,7 @@ import {
181
182
  unwrapParenthesizedExpressions,
182
183
  visitChildren,
183
184
  yieldExecution
184
- } from "../chunk-X7TMUZ4C.js";
185
+ } from "../chunk-ODWG5ZXF.js";
185
186
 
186
187
  // source/services/CustomCommand.ts
187
188
  import * as ls from "vscode-languageserver";
@@ -318,7 +319,7 @@ var AddPropertyAssignmentService = class {
318
319
  const reassignmentText = `${leftValueText} = ${value}`;
319
320
  const subprogramBody = this.ifShouldBeAssignedAtTheEndOfSubprogramThenBody(assignmentNode);
320
321
  if (subprogramBody !== void 0) {
321
- const lastStatement = subprogramBody.statementList.statements.last();
322
+ const lastStatement = subprogramBody.expression ?? subprogramBody.statementList?.statements.last();
322
323
  let editRangeStart;
323
324
  let indentationText;
324
325
  if (lastStatement !== void 0) {
@@ -369,18 +370,17 @@ var AddPropertyAssignmentService = class {
369
370
  case 74 /* MethodLiteral */:
370
371
  case 53 /* OperatorDeclaration */:
371
372
  return void 0;
372
- case 97 /* RunStatement */:
373
- return this.ifShouldBeAssignedAtTheEndOfSubprogramThenBody(parent);
374
- case 98 /* TryStatement */:
375
- case 99 /* CatchClause */:
376
- case 101 /* FinallyClause */:
377
- case 106 /* ForStatement */:
378
- case 107 /* IfStatement */:
379
- case 109 /* ElseIfClause */:
380
- case 110 /* ElseClause */:
381
- case 114 /* LoopStatement */:
382
- case 119 /* CaseClause */:
383
- case 120 /* WhileStatement */:
373
+ case 98 /* RunStatement */:
374
+ case 99 /* TryStatement */:
375
+ case 100 /* CatchClause */:
376
+ case 102 /* FinallyClause */:
377
+ case 108 /* ForStatement */:
378
+ case 109 /* IfStatement */:
379
+ case 111 /* ElseIfClause */:
380
+ case 112 /* ElseClause */:
381
+ case 116 /* LoopStatement */:
382
+ case 121 /* CaseClause */:
383
+ case 122 /* WhileStatement */:
384
384
  return this.getContainingSubprogram(parent)?.block;
385
385
  default:
386
386
  Debug.never(parent);
@@ -572,7 +572,7 @@ var SyntaxFactory = class {
572
572
  static packageVariableGetterDeclaration(tags, modifiers, name, typeSpecifier, body) {
573
573
  const tagList = new TagList(tags);
574
574
  const modifierList = new ModifierList(modifiers);
575
- const getKeyword = this.keyword(57 /* Get */);
575
+ const getKeyword = this.keyword(58 /* Get */);
576
576
  const nameIdentifier = this.createIdentifier(name);
577
577
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
578
578
  return new PackageVariableGetterDeclaration(
@@ -587,7 +587,7 @@ var SyntaxFactory = class {
587
587
  static packageVariableSetterDeclaration(tags, modifiers, name, body) {
588
588
  const tagList = new TagList(tags);
589
589
  const modifierList = new ModifierList(modifiers);
590
- const setKeyword = this.keyword(58 /* Set */);
590
+ const setKeyword = this.keyword(59 /* Set */);
591
591
  const nameIdentifier = this.createIdentifier(name);
592
592
  return new PackageVariableSetterDeclaration(tagList, modifierList, setKeyword, nameIdentifier, body);
593
593
  }
@@ -634,7 +634,7 @@ var SyntaxFactory = class {
634
634
  static typeVariableGetterDeclaration(tags, modifiers, name, typeSpecifier, body) {
635
635
  const tagList = new TagList(tags);
636
636
  const modifierList = new ModifierList(modifiers);
637
- const getKeyword = this.keyword(57 /* Get */);
637
+ const getKeyword = this.keyword(58 /* Get */);
638
638
  const nameIdentifier = this.createIdentifier(name);
639
639
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
640
640
  return new TypeVariableGetterDeclaration(
@@ -649,7 +649,7 @@ var SyntaxFactory = class {
649
649
  static typeVariableSetterDeclaration(tags, modifiers, name, body) {
650
650
  const tagList = new TagList(tags);
651
651
  const modifierList = new ModifierList(modifiers);
652
- const setKeyword = this.keyword(58 /* Set */);
652
+ const setKeyword = this.keyword(59 /* Set */);
653
653
  const nameIdentifier = this.createIdentifier(name);
654
654
  return new TypeVariableSetterDeclaration(tagList, modifierList, setKeyword, nameIdentifier, body);
655
655
  }
@@ -675,21 +675,21 @@ var SyntaxFactory = class {
675
675
  static typeConstructorDeclaration(tags, modifiers, parameters, body) {
676
676
  const tagList = new TagList(tags);
677
677
  const modifierList = new ModifierList(modifiers);
678
- const creationKeyword = this.keyword(29 /* Creation */);
678
+ const creationKeyword = this.keyword(30 /* Creation */);
679
679
  const parameterClause = this.parameterClause(parameters);
680
680
  return new TypeConstructorDeclaration(tagList, modifierList, creationKeyword, parameterClause, body);
681
681
  }
682
682
  static typeDestructorDeclaration(tags, modifiers, parameters, body) {
683
683
  const tagList = new TagList(tags);
684
684
  const modifierList = new ModifierList(modifiers);
685
- const destructionKeyword = this.keyword(46 /* Destruction */);
685
+ const destructionKeyword = this.keyword(47 /* Destruction */);
686
686
  const parameterClause = this.parameterClause(parameters);
687
687
  return new TypeDestructorDeclaration(tagList, modifierList, destructionKeyword, parameterClause, body);
688
688
  }
689
689
  static typeIndexedGetterDeclaration(tags, modifiers, parameters, typeSpecifier, body) {
690
690
  const tagList = new TagList(tags);
691
691
  const modifierList = new ModifierList(modifiers);
692
- const getKeyword = this.keyword(57 /* Get */);
692
+ const getKeyword = this.keyword(58 /* Get */);
693
693
  const parameterClause = this.indexerParameterClause(parameters);
694
694
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
695
695
  return new TypeIndexedGetterDeclaration(
@@ -704,7 +704,7 @@ var SyntaxFactory = class {
704
704
  static typeIndexedSetterDeclaration(tags, modifiers, parameters, body) {
705
705
  const tagList = new TagList(tags);
706
706
  const modifierList = new ModifierList(modifiers);
707
- const getKeyword = this.keyword(58 /* Set */);
707
+ const getKeyword = this.keyword(59 /* Set */);
708
708
  const parameterClause = this.indexerParameterClause(parameters);
709
709
  return new TypeIndexedSetterDeclaration(tagList, modifierList, getKeyword, parameterClause, body);
710
710
  }
@@ -856,8 +856,19 @@ var SyntaxFactory = class {
856
856
  const closeBraceToken = this.token(20 /* CloseBrace */);
857
857
  return new StatementBlock(openBraceToken, statementList, closeBraceToken);
858
858
  }
859
+ static functionExpressionBlock(expression) {
860
+ const openBraceToken = this.token(43 /* OpenBrace */);
861
+ const closeBraceToken = this.token(20 /* CloseBrace */);
862
+ return new FunctionBlock(openBraceToken, expression, void 0, closeBraceToken);
863
+ }
864
+ static functionStatementBlock(statements) {
865
+ const openBraceToken = this.token(43 /* OpenBrace */);
866
+ const statementList = new StatementList(statements);
867
+ const closeBraceToken = this.token(20 /* CloseBrace */);
868
+ return new FunctionBlock(openBraceToken, void 0, statementList, closeBraceToken);
869
+ }
859
870
  static noneLiteral() {
860
- return new KeywordExpression(this.keyword(56 /* None */));
871
+ return new KeywordExpression(this.keyword(57 /* None */));
861
872
  }
862
873
  static integerLiteral(value) {
863
874
  return new TokenExpression(this.token(2 /* IntegerLiteral */, value.toString()));
@@ -865,7 +876,7 @@ var SyntaxFactory = class {
865
876
  static translationsDeclaration(translations) {
866
877
  const tagList = new TagList([]);
867
878
  const modifierList = new ModifierList([]);
868
- const translationsKeyword = this.keyword(54 /* Translations */);
879
+ const translationsKeyword = this.keyword(55 /* Translations */);
869
880
  const openBraceToken = this.token(43 /* OpenBrace */);
870
881
  const translationList = new TopLevelTranslationList(translations);
871
882
  const closeBraceToken = this.token(20 /* CloseBrace */);
@@ -982,7 +993,7 @@ var SyntaxFactory = class {
982
993
  );
983
994
  }
984
995
  static constructorTranslation(sourceParameters, translatedParameters) {
985
- const creationKeyword = this.keyword(29 /* Creation */);
996
+ const creationKeyword = this.keyword(30 /* Creation */);
986
997
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
987
998
  const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
988
999
  const translatedParameterClause = this.translationParameterClause(translatedParameters);
@@ -1661,11 +1672,11 @@ var SyntaxToCode = class _SyntaxToCode {
1661
1672
  this.writeNodeDefault(node);
1662
1673
  }
1663
1674
  writeDeclarationBody(node, addLeadingNewLineOrWhitespace = true) {
1664
- if (node.statementList.elements.length === 0) {
1675
+ if (node.statementList === void 0 || node.statementList.elements.length === 0) {
1665
1676
  this.writeWhitespace();
1666
- this.writeStatementBlock(node, false);
1677
+ this.writeFunctionBlock(node, false);
1667
1678
  } else {
1668
- this.writeStatementBlock(node, true);
1679
+ this.writeFunctionBlock(node, true);
1669
1680
  }
1670
1681
  }
1671
1682
  writeStatementBlock(node, addLeadingNewLineOrWhitespace = true) {
@@ -1674,6 +1685,12 @@ var SyntaxToCode = class _SyntaxToCode {
1674
1685
  }
1675
1686
  this.writeNodeDefault(node);
1676
1687
  }
1688
+ writeFunctionBlock(node, addLeadingNewLineOrWhitespace = true) {
1689
+ if (addLeadingNewLineOrWhitespace) {
1690
+ this.writeNewLineOrWhitespace();
1691
+ }
1692
+ this.writeNodeDefault(node);
1693
+ }
1677
1694
  writeTranslationsDeclaration(node) {
1678
1695
  this.writeKeyword(node.translationsKeyword);
1679
1696
  this.writeNewLineOrWhitespace();
@@ -1997,17 +2014,18 @@ var SyntaxToCode = class _SyntaxToCode {
1997
2014
  [55 /* TypeVariableGetterDeclaration */]: this.prototype.writeTypeVariableGetterDeclaration,
1998
2015
  [56 /* TypeVariableSetterDeclaration */]: this.prototype.writeTypeVariableSetterDeclaration,
1999
2016
  [93 /* StatementBlock */]: this.prototype.writeStatementBlock,
2000
- [133 /* QualifiedName */]: this.prototype.writeQualifiedName,
2001
- [140 /* VariantDeclaration */]: this.prototype.writeVariantDeclaration,
2002
- [141 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
2003
- [142 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
2004
- [143 /* Argument */]: this.prototype.writeArgument,
2005
- [145 /* Tag */]: this.prototype.writeTag,
2006
- [147 /* Modifier */]: this.prototype.writeModifier,
2007
- [148 /* ParameterClause */]: this.prototype.writeParameterClause,
2008
- [149 /* ParameterList */]: this.prototype.writeParameterList,
2009
- [150 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
2010
- [152 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
2017
+ [94 /* FunctionBlock */]: this.prototype.writeFunctionBlock,
2018
+ [135 /* QualifiedName */]: this.prototype.writeQualifiedName,
2019
+ [142 /* VariantDeclaration */]: this.prototype.writeVariantDeclaration,
2020
+ [143 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
2021
+ [144 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
2022
+ [145 /* Argument */]: this.prototype.writeArgument,
2023
+ [147 /* Tag */]: this.prototype.writeTag,
2024
+ [149 /* Modifier */]: this.prototype.writeModifier,
2025
+ [150 /* ParameterClause */]: this.prototype.writeParameterClause,
2026
+ [151 /* ParameterList */]: this.prototype.writeParameterList,
2027
+ [152 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
2028
+ [154 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
2011
2029
  [17 /* AnonymousMethodTypeDeclaration */]: this.prototype.writeAnonymousMethodTypeDeclaration,
2012
2030
  [18 /* AnonymousStructuredTypeDeclaration */]: this.prototype.writeAnonymousStructuredTypeDeclaration,
2013
2031
  [19 /* AnonymousVariantTypeDeclaration */]: this.prototype.writeAnonymousVariantTypeDeclaration,
@@ -2060,56 +2078,57 @@ var SyntaxToCode = class _SyntaxToCode {
2060
2078
  [90 /* DefaultMatchExpression */]: this.prototype.writeNodeDefault,
2061
2079
  [91 /* AssignmentStatement */]: this.prototype.writeNodeDefault,
2062
2080
  [92 /* StatementList */]: this.prototype.writeNodeDefault,
2063
- [94 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2064
- [95 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2065
- [96 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2066
- [97 /* RunStatement */]: this.prototype.writeNodeDefault,
2067
- [98 /* TryStatement */]: this.prototype.writeNodeDefault,
2068
- [99 /* CatchClause */]: this.prototype.writeNodeDefault,
2069
- [100 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2070
- [101 /* FinallyClause */]: this.prototype.writeNodeDefault,
2071
- [102 /* EmptyStatement */]: this.prototype.writeNodeDefault,
2072
- [103 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2073
- [104 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2074
- [105 /* EnumerationVariableList */]: this.prototype.writeNodeDefault,
2075
- [106 /* ForStatement */]: this.prototype.writeNodeDefault,
2076
- [107 /* IfStatement */]: this.prototype.writeNodeDefault,
2077
- [108 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2078
- [109 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2079
- [110 /* ElseClause */]: this.prototype.writeNodeDefault,
2080
- [111 /* InvalidStatement */]: this.prototype.writeNodeDefault,
2081
- [112 /* NestedMethodDeclarationStatement */]: this.prototype.writeNodeDefault,
2082
- [113 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2083
- [114 /* LoopStatement */]: this.prototype.writeNodeDefault,
2084
- [115 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2085
- [116 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2086
- [117 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2087
- [118 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2088
- [119 /* CaseClause */]: this.prototype.writeNodeDefault,
2089
- [120 /* WhileStatement */]: this.prototype.writeNodeDefault,
2090
- [121 /* YieldStatement */]: this.prototype.writeNodeDefault,
2091
- [122 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2092
- [123 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2093
- [124 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2094
- [125 /* IndexerTranslationParameterClause */]: this.prototype.writeIndexerTranslationParameterClause,
2095
- [126 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2096
- [127 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2097
- [128 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2098
- [129 /* PackageMethodTranslation */]: this.prototype.writePackageMethodTranslation,
2099
- [130 /* TypeMethodTranslation */]: this.prototype.writeTypeMethodTranslation,
2100
- [131 /* MethodTypeTranslation */]: this.prototype.writeMethodTypeTranslation,
2101
- [132 /* PackageImportTranslation */]: this.prototype.writePackageImportTranslation,
2102
- [134 /* PackageVariableTranslation */]: this.prototype.writePackageVariableTranslation,
2103
- [135 /* TypeVariableOrVariantTranslation */]: this.prototype.writeTypeVariableOrVariantTranslation,
2104
- [136 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2105
- [137 /* TypeTranslation */]: this.prototype.writeTypeTranslation,
2106
- [138 /* TextLiteralTranslation */]: this.prototype.writeNodeDefault,
2107
- [139 /* TextTemplateLiteralTranslation */]: this.prototype.writeNodeDefault,
2108
- [144 /* TagList */]: this.prototype.writeNodeDefault,
2109
- [146 /* ModifierList */]: this.prototype.writeNodeDefault,
2110
- [151 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2111
- [153 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2112
- [154 /* TypeAnnotation */]: this.prototype.writeNodeDefault
2081
+ [95 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2082
+ [96 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2083
+ [97 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2084
+ [98 /* RunStatement */]: this.prototype.writeNodeDefault,
2085
+ [99 /* TryStatement */]: this.prototype.writeNodeDefault,
2086
+ [100 /* CatchClause */]: this.prototype.writeNodeDefault,
2087
+ [101 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2088
+ [102 /* FinallyClause */]: this.prototype.writeNodeDefault,
2089
+ [103 /* EmptyStatement */]: this.prototype.writeNodeDefault,
2090
+ [104 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2091
+ [105 /* ImportantStatement */]: this.prototype.writeNodeDefault,
2092
+ [106 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2093
+ [107 /* EnumerationVariableList */]: this.prototype.writeNodeDefault,
2094
+ [108 /* ForStatement */]: this.prototype.writeNodeDefault,
2095
+ [109 /* IfStatement */]: this.prototype.writeNodeDefault,
2096
+ [110 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2097
+ [111 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2098
+ [112 /* ElseClause */]: this.prototype.writeNodeDefault,
2099
+ [113 /* InvalidStatement */]: this.prototype.writeNodeDefault,
2100
+ [114 /* NestedMethodDeclarationStatement */]: this.prototype.writeNodeDefault,
2101
+ [115 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2102
+ [116 /* LoopStatement */]: this.prototype.writeNodeDefault,
2103
+ [117 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2104
+ [118 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2105
+ [119 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2106
+ [120 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2107
+ [121 /* CaseClause */]: this.prototype.writeNodeDefault,
2108
+ [122 /* WhileStatement */]: this.prototype.writeNodeDefault,
2109
+ [123 /* YieldStatement */]: this.prototype.writeNodeDefault,
2110
+ [124 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2111
+ [125 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2112
+ [126 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2113
+ [127 /* IndexerTranslationParameterClause */]: this.prototype.writeIndexerTranslationParameterClause,
2114
+ [128 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2115
+ [129 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2116
+ [130 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2117
+ [131 /* PackageMethodTranslation */]: this.prototype.writePackageMethodTranslation,
2118
+ [132 /* TypeMethodTranslation */]: this.prototype.writeTypeMethodTranslation,
2119
+ [133 /* MethodTypeTranslation */]: this.prototype.writeMethodTypeTranslation,
2120
+ [134 /* PackageImportTranslation */]: this.prototype.writePackageImportTranslation,
2121
+ [136 /* PackageVariableTranslation */]: this.prototype.writePackageVariableTranslation,
2122
+ [137 /* TypeVariableOrVariantTranslation */]: this.prototype.writeTypeVariableOrVariantTranslation,
2123
+ [138 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2124
+ [139 /* TypeTranslation */]: this.prototype.writeTypeTranslation,
2125
+ [140 /* TextLiteralTranslation */]: this.prototype.writeNodeDefault,
2126
+ [141 /* TextTemplateLiteralTranslation */]: this.prototype.writeNodeDefault,
2127
+ [146 /* TagList */]: this.prototype.writeNodeDefault,
2128
+ [148 /* ModifierList */]: this.prototype.writeNodeDefault,
2129
+ [153 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2130
+ [155 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2131
+ [156 /* TypeAnnotation */]: this.prototype.writeNodeDefault
2113
2132
  };
2114
2133
  return writeFunctions;
2115
2134
  }
@@ -2120,14 +2139,14 @@ var SyntaxToCode = class _SyntaxToCode {
2120
2139
  }
2121
2140
  };
2122
2141
  var modifierSortOrder = {
2123
- [35 /* Hidden */]: 0,
2124
- [40 /* Static */]: 1,
2142
+ [36 /* Hidden */]: 0,
2143
+ [41 /* Static */]: 1,
2125
2144
  [17 /* Basic */]: 2,
2126
- [37 /* Redefinable */]: 3,
2127
- [36 /* Abstract */]: 4,
2128
- [38 /* Redefined */]: 5,
2129
- [39 /* Async */]: 6,
2130
- [34 /* Const */]: 7
2145
+ [38 /* Redefinable */]: 3,
2146
+ [37 /* Abstract */]: 4,
2147
+ [39 /* Redefined */]: 5,
2148
+ [40 /* Async */]: 6,
2149
+ [35 /* Const */]: 7
2131
2150
  };
2132
2151
 
2133
2152
  // source/services/TreeUtils.ts
@@ -2295,7 +2314,7 @@ var TranslationsGenerationService = class {
2295
2314
  return void 0;
2296
2315
  }
2297
2316
  let result;
2298
- if (tokenOrKeyword.isToken(63 /* Identifier */) && tokenOrKeyword.parent.kind === 137 /* TypeTranslation */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2317
+ if (tokenOrKeyword.isToken(63 /* Identifier */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslation */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2299
2318
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
2300
2319
  if (translationPackage !== void 0) {
2301
2320
  const generator = new TranslationsGenerator(
@@ -2307,7 +2326,7 @@ var TranslationsGenerationService = class {
2307
2326
  result = generator.generateMissingTypeMemberTranslations(tokenOrKeyword.parent);
2308
2327
  }
2309
2328
  }
2310
- if (result === void 0 && tokenOrKeyword.isKeyword(54 /* Translations */) && tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */) {
2329
+ if (result === void 0 && tokenOrKeyword.isKeyword(55 /* Translations */) && tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */) {
2311
2330
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
2312
2331
  if (translationPackage !== void 0) {
2313
2332
  const generator = new TranslationsGenerator(
@@ -2333,7 +2352,7 @@ var TranslationsGenerationService = class {
2333
2352
  if (tokenOrKeyword === void 0) {
2334
2353
  return false;
2335
2354
  }
2336
- if (!(tokenOrKeyword.isKeyword(54 /* Translations */) && tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */)) {
2355
+ if (!(tokenOrKeyword.isKeyword(55 /* Translations */) && tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */)) {
2337
2356
  return false;
2338
2357
  }
2339
2358
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
@@ -2341,7 +2360,7 @@ var TranslationsGenerationService = class {
2341
2360
  return false;
2342
2361
  }
2343
2362
  const generator = new TranslationsGenerator(analyzer, sourceFile, translationPackage, sourceFile.package.dialect);
2344
- return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 137 /* TypeTranslation */).mapAndFilter((t) => translationPackage.getTypeTranslationTarget(t).target).any((t) => generator.collectNotTranslatedTypeMembers(t).length > 0);
2363
+ return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 139 /* TypeTranslation */).mapAndFilter((t) => translationPackage.getTypeTranslationTarget(t).target).any((t) => generator.collectNotTranslatedTypeMembers(t).length > 0);
2345
2364
  }
2346
2365
  };
2347
2366
  var TranslationsGenerator = class _TranslationsGenerator {
@@ -2368,7 +2387,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2368
2387
  };
2369
2388
  const memberTranslationsCode = Query.from(memberEntities).mapAndFilter((m) => this.createPackageMemberTranslationNode(m)).uniqueWithComparator(compareNodes).map((n) => {
2370
2389
  const code = new SyntaxToCode(n, syntaxToCodeOptions).convert();
2371
- if (n.kind === 137 /* TypeTranslation */) {
2390
+ if (n.kind === 139 /* TypeTranslation */) {
2372
2391
  const startOffset = Math.max(code.indexOf(newLine), 0);
2373
2392
  return this.addNewLineBeforeArrowsInTranslation(
2374
2393
  code,
@@ -2400,7 +2419,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2400
2419
  generateMissingTranslationsForPartiallyTranslatedTypes(translationsDeclaration) {
2401
2420
  const result = new Array();
2402
2421
  for (const translation of translationsDeclaration.translationList.translationDeclarations) {
2403
- if (translation.kind === 137 /* TypeTranslation */) {
2422
+ if (translation.kind === 139 /* TypeTranslation */) {
2404
2423
  const edits = this.generateMissingTypeMemberTranslations(translation);
2405
2424
  if (edits !== void 0) {
2406
2425
  result.push(...edits);
@@ -2497,13 +2516,13 @@ var TranslationsGenerator = class _TranslationsGenerator {
2497
2516
  }
2498
2517
  detectIndentationStepForTypeMemberTranslations(node) {
2499
2518
  let indentationStepSize;
2500
- if (node.kind === 137 /* TypeTranslation */) {
2519
+ if (node.kind === 139 /* TypeTranslation */) {
2501
2520
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(node, this._sourceFile);
2502
2521
  }
2503
2522
  if (indentationStepSize === void 0) {
2504
2523
  const translationsDeclarations = node.kind === 21 /* TranslationsDeclaration */ ? node : node.parent.parent;
2505
2524
  for (const member of translationsDeclarations.translationList.translationDeclarations) {
2506
- if (member.kind === 137 /* TypeTranslation */) {
2525
+ if (member.kind === 139 /* TypeTranslation */) {
2507
2526
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(member, this._sourceFile);
2508
2527
  if (indentationStepSize !== void 0) {
2509
2528
  break;
@@ -2790,7 +2809,7 @@ var SignatureForNode = class _SignatureForNode {
2790
2809
  return _SignatureForNode.getSignaturesForAutotypeCallExpression(analyzer, node);
2791
2810
  case 71 /* IndexedAccessExpression */:
2792
2811
  return _SignatureForNode.getSignaturesForIndexedAccessExpression(analyzer, node);
2793
- case 145 /* Tag */:
2812
+ case 147 /* Tag */:
2794
2813
  return _SignatureForNode.getSignaturesForTag(analyzer, node);
2795
2814
  default:
2796
2815
  Debug.never(node);
@@ -3225,7 +3244,7 @@ var CompletionService = class {
3225
3244
  typeExtensionLookup
3226
3245
  );
3227
3246
  }
3228
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 133 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3247
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3229
3248
  const namedTypeSpecifier = tokenOrKeyword.parent.parent;
3230
3249
  const resolutionResult = this._analyzer.resolveNamedTypeSpecifier(namedTypeSpecifier);
3231
3250
  const segmentIndex = Math.floor(
@@ -3267,7 +3286,7 @@ var CompletionService = class {
3267
3286
  }
3268
3287
  return { kind: "none" };
3269
3288
  }
3270
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 133 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 145 /* Tag */) {
3289
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 147 /* Tag */) {
3271
3290
  const tag = tokenOrKeyword.parent.parent;
3272
3291
  const resolutionResult = this._analyzer.resolveTag(tag);
3273
3292
  const segmentIndex = Math.floor(
@@ -3360,17 +3379,17 @@ var CompletionService = class {
3360
3379
  translationKind = 0 /* Any */;
3361
3380
  hasPrecedingKeyword = false;
3362
3381
  }
3363
- if (tokenOrKeyword.isKeyword(18 /* Import */) && tokenOrKeyword.parent.kind === 132 /* PackageImportTranslation */) {
3382
+ if (tokenOrKeyword.isKeyword(18 /* Import */) && tokenOrKeyword.parent.kind === 134 /* PackageImportTranslation */) {
3364
3383
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3365
3384
  translationKind = 1 /* PackageImport */;
3366
3385
  hasPrecedingKeyword = true;
3367
3386
  }
3368
- if (tokenOrKeyword.isKeyword(16 /* Type */) && (tokenOrKeyword.parent.kind === 137 /* TypeTranslation */ || tokenOrKeyword.parent.kind === 131 /* MethodTypeTranslation */)) {
3387
+ if (tokenOrKeyword.isKeyword(16 /* Type */) && (tokenOrKeyword.parent.kind === 139 /* TypeTranslation */ || tokenOrKeyword.parent.kind === 133 /* MethodTypeTranslation */)) {
3369
3388
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3370
3389
  translationKind = 3 /* Type */;
3371
3390
  hasPrecedingKeyword = true;
3372
3391
  }
3373
- if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 129 /* PackageMethodTranslation */) {
3392
+ if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 131 /* PackageMethodTranslation */) {
3374
3393
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3375
3394
  translationKind = 2 /* Method */;
3376
3395
  hasPrecedingKeyword = true;
@@ -3390,9 +3409,9 @@ var CompletionService = class {
3390
3409
  hasPrecedingKeyword
3391
3410
  );
3392
3411
  }
3393
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 133 /* QualifiedName */) {
3412
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */) {
3394
3413
  const qualifiedName = tokenOrKeyword.parent;
3395
- if (qualifiedName.parent.kind === 132 /* PackageImportTranslation */ && qualifiedName === qualifiedName.parent.sourceName) {
3414
+ if (qualifiedName.parent.kind === 134 /* PackageImportTranslation */ && qualifiedName === qualifiedName.parent.sourceName) {
3396
3415
  const precedingSegmentNames = qualifiedName.qualifiers.takeWhile((s) => s.rangeStart < tokenOrKeyword.value.rangeStart).map((p) => this._analyzer.createNameFromIdentifier(p)).toArray();
3397
3416
  const sourceLocale = translationPackage.getTranslatedPackage().getLocale();
3398
3417
  return new PackageImportCompletionContext(precedingSegmentNames, { sourceLocale });
@@ -3417,12 +3436,12 @@ var CompletionService = class {
3417
3436
  translationKind = 0 /* Any */;
3418
3437
  hasPrecedingKeyword = false;
3419
3438
  }
3420
- if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 130 /* TypeMethodTranslation */) {
3439
+ if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 132 /* TypeMethodTranslation */) {
3421
3440
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3422
3441
  translationKind = 1 /* Method */;
3423
3442
  hasPrecedingKeyword = true;
3424
3443
  }
3425
- if (tokenOrKeyword.isKeyword(29 /* Creation */) && tokenOrKeyword.parent.kind === 124 /* ConstructorTranslation */) {
3444
+ if (tokenOrKeyword.isKeyword(30 /* Creation */) && tokenOrKeyword.parent.kind === 126 /* ConstructorTranslation */) {
3426
3445
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3427
3446
  translationKind = 3 /* Constructor */;
3428
3447
  hasPrecedingKeyword = true;
@@ -3462,7 +3481,7 @@ var CompletionService = class {
3462
3481
  role.argumentList.parent
3463
3482
  );
3464
3483
  break;
3465
- case 145 /* Tag */:
3484
+ case 147 /* Tag */:
3466
3485
  signatures = SignatureForNode.getSignaturesForTag(this._analyzer, role.argumentList.parent);
3467
3486
  valueArguments = ValueArgumentFactory.createValueArgumentsOfTag(role.argumentList.parent);
3468
3487
  break;
@@ -3506,6 +3525,13 @@ var CompletionService = class {
3506
3525
  }
3507
3526
  return { targetTypes: void 0, targetSignaturesParameters: void 0 };
3508
3527
  }
3528
+ if (role.kind === "function-block-expression") {
3529
+ const targetType = semanticContext.getContainingSubprogram()?.getReturnType();
3530
+ if (targetType !== void 0 && !targetType.equals(this._analyzer.standardTypes.none)) {
3531
+ return { targetTypes: [targetType], targetSignaturesParameters: void 0 };
3532
+ }
3533
+ return { targetTypes: void 0, targetSignaturesParameters: void 0 };
3534
+ }
3509
3535
  if (role.kind === "other") {
3510
3536
  if (role.expressionForTargetType !== void 0) {
3511
3537
  const targetType = this._analyzer.getTargetTypeOfExpression(role.expressionForTargetType);
@@ -3595,22 +3621,22 @@ var CompletionService = class {
3595
3621
  }
3596
3622
  const kinds = /* @__PURE__ */ new Set();
3597
3623
  if (syntaxContext.isPackageMemberDeclarationListContext) {
3598
- kinds.add(18 /* Import */).add(7 /* Run */).add(29 /* Creation */).add(12 /* Function */).add(17 /* Basic */).add(16 /* Type */).add(57 /* Get */).add(58 /* Set */).add(54 /* Translations */);
3624
+ kinds.add(18 /* Import */).add(7 /* Run */).add(30 /* Creation */).add(12 /* Function */).add(17 /* Basic */).add(16 /* Type */).add(58 /* Get */).add(59 /* Set */).add(55 /* Translations */);
3599
3625
  }
3600
3626
  if (syntaxContext.isPackageMemberDeclarationListContext || syntaxContext.isTypeMemberDeclarationListContext) {
3601
- kinds.add(35 /* Hidden */).add(40 /* Static */).add(37 /* Redefinable */).add(36 /* Abstract */).add(38 /* Redefined */).add(39 /* Async */).add(34 /* Const */);
3627
+ kinds.add(36 /* Hidden */).add(41 /* Static */).add(38 /* Redefinable */).add(37 /* Abstract */).add(39 /* Redefined */).add(40 /* Async */).add(35 /* Const */);
3602
3628
  }
3603
3629
  if (syntaxContext.isTypeMemberDeclarationListContext) {
3604
- kinds.add(29 /* Creation */).add(12 /* Function */).add(46 /* Destruction */).add(57 /* Get */).add(58 /* Set */);
3630
+ kinds.add(30 /* Creation */).add(12 /* Function */).add(47 /* Destruction */).add(58 /* Get */).add(59 /* Set */);
3605
3631
  }
3606
3632
  if (syntaxContext.isStatementContext) {
3607
- kinds.add(7 /* Run */).add(33 /* For */).add(24 /* While */).add(25 /* Loop */).add(15 /* Return */).add(19 /* Error */).add(27 /* Yield */).add(31 /* BreakLoop */).add(32 /* ContinueLoop */).add(13 /* If */).add(43 /* Switch */).add(1 /* Let */).add(34 /* Const */).add(45 /* Dispose */).add(8 /* Try */).add(12 /* Function */).add(39 /* Async */);
3633
+ kinds.add(7 /* Run */).add(34 /* For */).add(25 /* While */).add(26 /* Loop */).add(15 /* Return */).add(20 /* Error */).add(28 /* Yield */).add(32 /* BreakLoop */).add(33 /* ContinueLoop */).add(13 /* If */).add(44 /* Switch */).add(1 /* Let */).add(35 /* Const */).add(46 /* Dispose */).add(8 /* Try */).add(12 /* Function */).add(40 /* Async */);
3608
3634
  }
3609
3635
  if (this.isFromKeywordContext(positionDescription)) {
3610
3636
  kinds.add(9 /* From */);
3611
3637
  }
3612
3638
  if (syntaxContext.isExpressionContext !== void 0) {
3613
- kinds.add(42 /* Not */).add(51 /* Yes */).add(52 /* No */).add(56 /* None */).add(39 /* Async */).add(12 /* Function */).add(53 /* Reference */).add(2 /* Autotype */);
3639
+ kinds.add(43 /* Not */).add(52 /* Yes */).add(53 /* No */).add(57 /* None */).add(40 /* Async */).add(12 /* Function */).add(54 /* Reference */).add(2 /* Autotype */);
3614
3640
  if (positionDescription.kind === "after-token-or-keyword") {
3615
3641
  const container = semanticContext.getContainingTypeOrTypeExtension();
3616
3642
  if (container !== void 0) {
@@ -3618,40 +3644,40 @@ var CompletionService = class {
3618
3644
  if (container.kind === "type") {
3619
3645
  const typeEntity = container.value;
3620
3646
  if (typeEntity?.typeEntityKind === 1 /* Structured */ && typeEntity.getBaseObjectType() !== void 0 || typeEntity?.typeEntityKind === 3 /* Variant */ || typeEntity?.typeEntityKind === 4 /* Alias */) {
3621
- kinds.add(55 /* Base */);
3647
+ kinds.add(56 /* Base */);
3622
3648
  }
3623
3649
  }
3624
3650
  }
3625
3651
  }
3626
3652
  }
3627
3653
  if (this.isTypeKindCompletionContext(positionDescription)) {
3628
- kinds.add(4 /* Object */).add(5 /* PlainObject */).add(3 /* Aspect */).add(6 /* Variant */).add(12 /* Function */).add(39 /* Async */);
3654
+ kinds.add(4 /* Object */).add(5 /* PlainObject */).add(3 /* Aspect */).add(6 /* Variant */).add(12 /* Function */).add(40 /* Async */);
3629
3655
  }
3630
3656
  if (this.isCaseKeywordContext(positionDescription, syntaxContext)) {
3631
- kinds.add(44 /* Case */);
3657
+ kinds.add(45 /* Case */);
3632
3658
  }
3633
3659
  if (this.isCatchKeywordContext(positionDescription)) {
3634
- kinds.add(30 /* Catch */);
3660
+ kinds.add(31 /* Catch */);
3635
3661
  }
3636
3662
  if (this.isFinallyKeywordContext(positionDescription)) {
3637
- kinds.add(20 /* Finally */);
3663
+ kinds.add(21 /* Finally */);
3638
3664
  }
3639
3665
  if (this.isElseOrElseIfKeywordContext(positionDescription)) {
3640
3666
  kinds.add(10 /* Else */).add(11 /* ElseIf */);
3641
3667
  }
3642
3668
  if (syntaxContext.precedingExpression !== void 0) {
3643
- kinds.add(41 /* As */).add(14 /* Is */).add(21 /* And */).add(22 /* Or */).add(23 /* Xor */).add(28 /* When */);
3669
+ kinds.add(42 /* As */).add(14 /* Is */).add(22 /* And */).add(23 /* Or */).add(24 /* Xor */).add(29 /* When */);
3644
3670
  }
3645
3671
  if (this.isModifierLevelContext(positionDescription)) {
3646
- kinds.add(50 /* InType */).add(47 /* InHierarchy */).add(48 /* InFile */).add(49 /* InPackage */);
3672
+ kinds.add(51 /* InType */).add(48 /* InHierarchy */).add(49 /* InFile */).add(50 /* InPackage */);
3647
3673
  }
3648
3674
  if (this.isRepeatWhileKeywordContext(positionDescription)) {
3649
- kinds.add(26 /* RepeatWhile */);
3675
+ kinds.add(27 /* RepeatWhile */);
3650
3676
  }
3651
3677
  if (syntaxContext.isUnqualifiedTypeContext?.allowsAnonymousTypes === true) {
3652
- kinds.add(5 /* PlainObject */).add(4 /* Object */).add(6 /* Variant */).add(3 /* Aspect */).add(12 /* Function */).add(39 /* Async */);
3678
+ kinds.add(5 /* PlainObject */).add(4 /* Object */).add(6 /* Variant */).add(3 /* Aspect */).add(12 /* Function */).add(40 /* Async */);
3653
3679
  }
3654
- if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(39 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 58 /* NestedMethodDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 74 /* MethodLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 29 /* MethodTypeDeclarationBody */)) {
3680
+ if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(40 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 58 /* NestedMethodDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 74 /* MethodLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 29 /* MethodTypeDeclarationBody */)) {
3655
3681
  kinds.add(12 /* Function */);
3656
3682
  }
3657
3683
  return Query.from(kinds.values()).map(
@@ -3663,35 +3689,35 @@ var CompletionService = class {
3663
3689
  return false;
3664
3690
  }
3665
3691
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3666
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 114 /* LoopStatement */;
3692
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 116 /* LoopStatement */;
3667
3693
  }
3668
3694
  isModifierLevelContext(positionDescription) {
3669
3695
  if (positionDescription.kind !== "after-token-or-keyword") {
3670
3696
  return false;
3671
3697
  }
3672
3698
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3673
- return tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */;
3699
+ return tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 149 /* Modifier */;
3674
3700
  }
3675
3701
  isElseOrElseIfKeywordContext(positionDescription) {
3676
3702
  if (positionDescription.kind !== "after-token-or-keyword") {
3677
3703
  return false;
3678
3704
  }
3679
3705
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3680
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 107 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 109 /* ElseIfClause */);
3706
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 109 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 111 /* ElseIfClause */);
3681
3707
  }
3682
3708
  isCatchKeywordContext(positionDescription) {
3683
3709
  if (positionDescription.kind !== "after-token-or-keyword") {
3684
3710
  return false;
3685
3711
  }
3686
3712
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3687
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 98 /* TryStatement */;
3713
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 99 /* TryStatement */;
3688
3714
  }
3689
3715
  isFinallyKeywordContext(positionDescription) {
3690
3716
  if (positionDescription.kind !== "after-token-or-keyword") {
3691
3717
  return false;
3692
3718
  }
3693
3719
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3694
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 98 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 99 /* CatchClause */);
3720
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 99 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 100 /* CatchClause */);
3695
3721
  }
3696
3722
  isTypeKindCompletionContext(positionDescription) {
3697
3723
  return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(57 /* Equals */) && NodeTypeUtils.isPackageTypeDeclaration(positionDescription.tokenOrKeyword.parent);
@@ -3708,10 +3734,10 @@ var CompletionService = class {
3708
3734
  return false;
3709
3735
  }
3710
3736
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3711
- if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 119 /* CaseClause */) {
3737
+ if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 121 /* CaseClause */) {
3712
3738
  return true;
3713
3739
  }
3714
- if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 117 /* SwitchStatement */) {
3740
+ if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 119 /* SwitchStatement */) {
3715
3741
  return true;
3716
3742
  }
3717
3743
  return false;
@@ -4216,7 +4242,7 @@ var CompletionService = class {
4216
4242
  if (!ctx.hasPrecedingKeyword) {
4217
4243
  const keywords = [
4218
4244
  12 /* Function */,
4219
- 29 /* Creation */
4245
+ 30 /* Creation */
4220
4246
  ];
4221
4247
  result = result.chain(
4222
4248
  Query.from(keywords).map(
@@ -4379,7 +4405,7 @@ function isInvalidNode(node) {
4379
4405
  switch (node.kind) {
4380
4406
  case 72 /* InvalidExpression */:
4381
4407
  case 43 /* InvalidPackageMemberDeclaration */:
4382
- case 111 /* InvalidStatement */:
4408
+ case 113 /* InvalidStatement */:
4383
4409
  case 57 /* InvalidTypeMemberDeclaration */:
4384
4410
  case 16 /* InvalidTypeSpecifier */:
4385
4411
  return true;
@@ -5071,7 +5097,7 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
5071
5097
  Localization.Original.ofEntity(this.constructor_)
5072
5098
  );
5073
5099
  const displayParts = this.displayService.getConstructorDeclarationDisplayParts(constructorDeclaration);
5074
- const creationKeyword = this.displayService.displayKeyword(29 /* Creation */);
5100
+ const creationKeyword = this.displayService.displayKeyword(30 /* Creation */);
5075
5101
  return creationKeyword + displayParts.valueParametersStart + displayParts.valueParameters.map((p) => p.toString()).join(displayParts.valueParameterSeparator) + displayParts.valueParametersEnd;
5076
5102
  });
5077
5103
  }
@@ -5085,7 +5111,7 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
5085
5111
  return this.label;
5086
5112
  }
5087
5113
  getInsertText() {
5088
- const creationKeyword = this.includeOnCreateKeyword ? this.displayService.displayKeyword(29 /* Creation */) : "";
5114
+ const creationKeyword = this.includeOnCreateKeyword ? this.displayService.displayKeyword(30 /* Creation */) : "";
5089
5115
  const parameters = this.constructor_.getValueParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
5090
5116
  return `${creationKeyword}(${parameters})`;
5091
5117
  }
@@ -5163,6 +5189,12 @@ var ExpressionRole_returnedValue = class {
5163
5189
  this.kind = "returned-value";
5164
5190
  }
5165
5191
  };
5192
+ var ExpressionRole_functionBlockExpression = class {
5193
+ constructor(functionBlock) {
5194
+ this.functionBlock = functionBlock;
5195
+ this.kind = "function-block-expression";
5196
+ }
5197
+ };
5166
5198
  var ExpressionRole_other = class {
5167
5199
  constructor(expressionForTargetType) {
5168
5200
  this.expressionForTargetType = expressionForTargetType;
@@ -5199,7 +5231,7 @@ var SyntaxContextFactory = class {
5199
5231
  if (positionDescription.kind === "after-token-or-keyword") {
5200
5232
  isUnqualifiedTypeContext = this.isUnqualifiedTypeContext(positionDescription.tokenOrKeyword);
5201
5233
  }
5202
- const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(35 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 145 /* Tag */;
5234
+ const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(35 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 147 /* Tag */;
5203
5235
  let isTopLevelTranslationListContext;
5204
5236
  if (positionDescription.kind === "after-token-or-keyword") {
5205
5237
  isTopLevelTranslationListContext = this.isTopLevelTranslationListContext(positionDescription.tokenOrKeyword);
@@ -5241,15 +5273,15 @@ var SyntaxContextFactory = class {
5241
5273
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.initializer);
5242
5274
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5243
5275
  }
5244
- if (tokenOrKeyword.parent.kind === 142 /* ParameterDeclaration */) {
5276
+ if (tokenOrKeyword.parent.kind === 144 /* ParameterDeclaration */) {
5245
5277
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.defaultValue);
5246
5278
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5247
5279
  }
5248
- if (tokenOrKeyword.parent.kind === 143 /* Argument */) {
5280
+ if (tokenOrKeyword.parent.kind === 145 /* Argument */) {
5249
5281
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5250
5282
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5251
5283
  }
5252
- if (tokenOrKeyword.parent.kind === 140 /* VariantDeclaration */) {
5284
+ if (tokenOrKeyword.parent.kind === 142 /* VariantDeclaration */) {
5253
5285
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5254
5286
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5255
5287
  }
@@ -5285,6 +5317,20 @@ var SyntaxContextFactory = class {
5285
5317
  if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */) {
5286
5318
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5287
5319
  }
5320
+ if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 94 /* FunctionBlock */) {
5321
+ const block = tokenOrKeyword.parent;
5322
+ if (block.expression !== void 0 || block.statementList?.statements.count() === 0) {
5323
+ return {
5324
+ isExpressionContext: { expressionRole: new ExpressionRole_functionBlockExpression(block) },
5325
+ isStatementContext: true
5326
+ };
5327
+ } else {
5328
+ return {
5329
+ isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) },
5330
+ isStatementContext: true
5331
+ };
5332
+ }
5333
+ }
5288
5334
  if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 92 /* StatementList */) {
5289
5335
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5290
5336
  }
@@ -5305,7 +5351,7 @@ var SyntaxContextFactory = class {
5305
5351
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5306
5352
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5307
5353
  }
5308
- if (tokenOrKeyword.parent.kind === 145 /* Tag */) {
5354
+ if (tokenOrKeyword.parent.kind === 147 /* Tag */) {
5309
5355
  const argumentList = tokenOrKeyword.parent.argumentList;
5310
5356
  if (argumentList !== void 0) {
5311
5357
  const expressionRole = new ExpressionRole_argument(argumentList, 0);
@@ -5336,7 +5382,7 @@ var SyntaxContextFactory = class {
5336
5382
  const expressionRole = new ExpressionRole_argument(argumentList, index);
5337
5383
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5338
5384
  }
5339
- if (tokenOrKeyword.parent.kind === 118 /* MatchExpressionList */) {
5385
+ if (tokenOrKeyword.parent.kind === 120 /* MatchExpressionList */) {
5340
5386
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent.parent);
5341
5387
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5342
5388
  }
@@ -5345,43 +5391,43 @@ var SyntaxContextFactory = class {
5345
5391
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5346
5392
  }
5347
5393
  }
5348
- if (tokenOrKeyword.isKeyword(44 /* Case */) && tokenOrKeyword.parent.kind === 119 /* CaseClause */) {
5394
+ if (tokenOrKeyword.isKeyword(45 /* Case */) && tokenOrKeyword.parent.kind === 121 /* CaseClause */) {
5349
5395
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent);
5350
5396
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5351
5397
  }
5352
- if (tokenOrKeyword.isKeyword(15 /* Return */) && tokenOrKeyword.parent.kind === 115 /* ReturnStatement */) {
5398
+ if (tokenOrKeyword.isKeyword(15 /* Return */) && tokenOrKeyword.parent.kind === 117 /* ReturnStatement */) {
5353
5399
  const expressionRole = new ExpressionRole_returnedValue(tokenOrKeyword.parent);
5354
5400
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5355
5401
  }
5356
- if (tokenOrKeyword.isKeyword(43 /* Switch */) && tokenOrKeyword.parent.kind === 117 /* SwitchStatement */) {
5402
+ if (tokenOrKeyword.isKeyword(44 /* Switch */) && tokenOrKeyword.parent.kind === 119 /* SwitchStatement */) {
5357
5403
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5358
5404
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5359
5405
  }
5360
- if (tokenOrKeyword.isKeyword(13 /* If */) && tokenOrKeyword.parent.kind === 107 /* IfStatement */) {
5406
+ if (tokenOrKeyword.isKeyword(13 /* If */) && tokenOrKeyword.parent.kind === 109 /* IfStatement */) {
5361
5407
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5362
5408
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5363
5409
  }
5364
- if (tokenOrKeyword.isKeyword(11 /* ElseIf */) && tokenOrKeyword.parent.kind === 109 /* ElseIfClause */) {
5410
+ if (tokenOrKeyword.isKeyword(11 /* ElseIf */) && tokenOrKeyword.parent.kind === 111 /* ElseIfClause */) {
5365
5411
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5366
5412
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5367
5413
  }
5368
- if (tokenOrKeyword.isKeyword(9 /* From */) && tokenOrKeyword.parent.kind === 106 /* ForStatement */) {
5414
+ if (tokenOrKeyword.isKeyword(9 /* From */) && tokenOrKeyword.parent.kind === 108 /* ForStatement */) {
5369
5415
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.enumeratedExpression);
5370
5416
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5371
5417
  }
5372
- if (tokenOrKeyword.isKeyword(24 /* While */) && tokenOrKeyword.parent.kind === 120 /* WhileStatement */) {
5418
+ if (tokenOrKeyword.isKeyword(25 /* While */) && tokenOrKeyword.parent.kind === 122 /* WhileStatement */) {
5373
5419
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5374
5420
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5375
5421
  }
5376
- if (tokenOrKeyword.isKeyword(26 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 114 /* LoopStatement */) {
5422
+ if (tokenOrKeyword.isKeyword(27 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 116 /* LoopStatement */) {
5377
5423
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5378
5424
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5379
5425
  }
5380
- if (tokenOrKeyword.isKeyword(27 /* Yield */) && tokenOrKeyword.parent.kind === 121 /* YieldStatement */) {
5426
+ if (tokenOrKeyword.isKeyword(28 /* Yield */) && tokenOrKeyword.parent.kind === 123 /* YieldStatement */) {
5381
5427
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5382
5428
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5383
5429
  }
5384
- if (tokenOrKeyword.isKeyword(28 /* When */) && tokenOrKeyword.parent.kind === 76 /* WhenTernaryExpression */) {
5430
+ if (tokenOrKeyword.isKeyword(29 /* When */) && tokenOrKeyword.parent.kind === 76 /* WhenTernaryExpression */) {
5385
5431
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5386
5432
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5387
5433
  }
@@ -5407,7 +5453,7 @@ var SyntaxContextFactory = class {
5407
5453
  if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 32 /* TypeMemberDeclarationBlock */ && (tokenOrKeyword.parent.parent.kind === 40 /* TypeExtensionDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 33 /* PackageStructuredTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 38 /* PackageVariantTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 22 /* PackageAliasTypeDeclaration */)) {
5408
5454
  return true;
5409
5455
  }
5410
- if (tokenOrKeyword.isToken(20 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 25 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 26 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 27 /* PackageMethodDeclaration */))) {
5456
+ if (tokenOrKeyword.isToken(20 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 94 /* FunctionBlock */ && (tokenOrKeyword.parent.parent.kind === 25 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 26 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 27 /* PackageMethodDeclaration */))) {
5411
5457
  return true;
5412
5458
  }
5413
5459
  if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */) {
@@ -5419,10 +5465,10 @@ var SyntaxContextFactory = class {
5419
5465
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 37 /* PackageVariableSetterDeclaration */)) {
5420
5466
  return true;
5421
5467
  }
5422
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 147 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5468
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 149 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5423
5469
  return true;
5424
5470
  }
5425
- if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5471
+ if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 149 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5426
5472
  return true;
5427
5473
  }
5428
5474
  return false;
@@ -5443,13 +5489,13 @@ var SyntaxContextFactory = class {
5443
5489
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5444
5490
  tokenOrKeyword,
5445
5491
  51 /* TypeDereferencedVariableSetterDeclaration */
5446
- ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* TypeMethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 45 /* TypeConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 46 /* TypeDestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 140 /* VariantDeclaration */)) {
5492
+ ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* TypeMethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 45 /* TypeConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 46 /* TypeDestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 142 /* VariantDeclaration */)) {
5447
5493
  return true;
5448
5494
  }
5449
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 147 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5495
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 149 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5450
5496
  return true;
5451
5497
  }
5452
- if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5498
+ if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 149 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5453
5499
  return true;
5454
5500
  }
5455
5501
  return false;
@@ -5486,7 +5532,7 @@ var SyntaxContextFactory = class {
5486
5532
  return result;
5487
5533
  }
5488
5534
  static isUnqualifiedTypeContext(tokenOrKeyword) {
5489
- if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 154 /* TypeAnnotation */) {
5535
+ if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 156 /* TypeAnnotation */) {
5490
5536
  return { allowsAnonymousTypes: true };
5491
5537
  }
5492
5538
  if ((tokenOrKeyword.isKeyword(4 /* Object */) || tokenOrKeyword.isKeyword(5 /* PlainObject */) || tokenOrKeyword.isKeyword(3 /* Aspect */)) && tokenOrKeyword.parent.kind === 34 /* StructuredTypeDeclarationBody */) {
@@ -5495,16 +5541,16 @@ var SyntaxContextFactory = class {
5495
5541
  if (tokenOrKeyword.isKeyword(16 /* Type */) && (NodeTypeUtils.isPackageTypeDeclaration(tokenOrKeyword.parent) || tokenOrKeyword.parent.kind === 40 /* TypeExtensionDeclaration */)) {
5496
5542
  return { allowsAnonymousTypes: false };
5497
5543
  }
5498
- if (tokenOrKeyword.isToken(36 /* LessThan */) && tokenOrKeyword.parent.kind === 150 /* TypeArgumentClause */) {
5544
+ if (tokenOrKeyword.isToken(36 /* LessThan */) && tokenOrKeyword.parent.kind === 152 /* TypeArgumentClause */) {
5499
5545
  return { allowsAnonymousTypes: true };
5500
5546
  }
5501
- if (tokenOrKeyword.isToken(24 /* Comma */) && (tokenOrKeyword.parent.kind === 30 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 151 /* TypeArgumentList */)) {
5502
- return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 151 /* TypeArgumentList */ };
5547
+ if (tokenOrKeyword.isToken(24 /* Comma */) && (tokenOrKeyword.parent.kind === 30 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 153 /* TypeArgumentList */)) {
5548
+ return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 153 /* TypeArgumentList */ };
5503
5549
  }
5504
- if (tokenOrKeyword.isToken(35 /* HashSign */) && tokenOrKeyword.parent.kind === 145 /* Tag */) {
5550
+ if (tokenOrKeyword.isToken(35 /* HashSign */) && tokenOrKeyword.parent.kind === 147 /* Tag */) {
5505
5551
  return { allowsAnonymousTypes: false };
5506
5552
  }
5507
- if ((tokenOrKeyword.isToken(23 /* Colon */) || tokenOrKeyword.isToken(57 /* Equals */)) && tokenOrKeyword.parent.kind === 141 /* TypeParameterDeclaration */) {
5553
+ if ((tokenOrKeyword.isToken(23 /* Colon */) || tokenOrKeyword.isToken(57 /* Equals */)) && tokenOrKeyword.parent.kind === 143 /* TypeParameterDeclaration */) {
5508
5554
  return { allowsAnonymousTypes: false };
5509
5555
  }
5510
5556
  if (tokenOrKeyword.isToken(57 /* Equals */) && tokenOrKeyword.parent.kind === 22 /* PackageAliasTypeDeclaration */) {
@@ -5513,7 +5559,7 @@ var SyntaxContextFactory = class {
5513
5559
  if (tokenOrKeyword.isKeyword(14 /* Is */) && tokenOrKeyword.parent.kind === 73 /* IsExpression */) {
5514
5560
  return { allowsAnonymousTypes: true };
5515
5561
  }
5516
- if (tokenOrKeyword.isKeyword(41 /* As */) && tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
5562
+ if (tokenOrKeyword.isKeyword(42 /* As */) && tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
5517
5563
  return { allowsAnonymousTypes: true };
5518
5564
  }
5519
5565
  if (tokenOrKeyword.isToken(17 /* Bar */) && tokenOrKeyword.parent.kind === 12 /* UnionTypeSpecifierTypeList */) {
@@ -5533,32 +5579,32 @@ var SyntaxContextFactory = class {
5533
5579
  }
5534
5580
  const packageImport = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5535
5581
  tokenOrKeyword,
5536
- 132 /* PackageImportTranslation */
5582
+ 134 /* PackageImportTranslation */
5537
5583
  );
5538
5584
  if (packageImport !== void 0) {
5539
5585
  return { translationsDeclaration: packageImport.parent.parent };
5540
5586
  }
5541
- const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 137 /* TypeTranslation */);
5587
+ const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 139 /* TypeTranslation */);
5542
5588
  if (type !== void 0) {
5543
5589
  return { translationsDeclaration: type.parent.parent };
5544
5590
  }
5545
5591
  const methodType = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5546
5592
  tokenOrKeyword,
5547
- 131 /* MethodTypeTranslation */
5593
+ 133 /* MethodTypeTranslation */
5548
5594
  );
5549
5595
  if (methodType !== void 0) {
5550
5596
  return { translationsDeclaration: methodType.parent.parent };
5551
5597
  }
5552
5598
  const variable = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5553
5599
  tokenOrKeyword,
5554
- 134 /* PackageVariableTranslation */
5600
+ 136 /* PackageVariableTranslation */
5555
5601
  );
5556
5602
  if (variable !== void 0) {
5557
5603
  return { translationsDeclaration: variable.parent.parent };
5558
5604
  }
5559
5605
  const method = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5560
5606
  tokenOrKeyword,
5561
- 129 /* PackageMethodTranslation */
5607
+ 131 /* PackageMethodTranslation */
5562
5608
  );
5563
5609
  if (method !== void 0) {
5564
5610
  return { translationsDeclaration: method.parent.parent };
@@ -5566,33 +5612,33 @@ var SyntaxContextFactory = class {
5566
5612
  return void 0;
5567
5613
  }
5568
5614
  static isTypeMemberTranslationListContext(tokenOrKeyword) {
5569
- if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 136 /* TypeMemberTranslationList */) {
5615
+ if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 138 /* TypeMemberTranslationList */) {
5570
5616
  return { typeTranslation: tokenOrKeyword.parent.parent };
5571
5617
  }
5572
- if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 137 /* TypeTranslation */) {
5618
+ if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslation */) {
5573
5619
  return { typeTranslation: tokenOrKeyword.parent };
5574
5620
  }
5575
- const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 126 /* IndexerTranslation */);
5621
+ const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 128 /* IndexerTranslation */);
5576
5622
  if (indexer !== void 0) {
5577
5623
  return { typeTranslation: indexer.parent.parent };
5578
5624
  }
5579
5625
  const constructor = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5580
5626
  tokenOrKeyword,
5581
- 124 /* ConstructorTranslation */
5627
+ 126 /* ConstructorTranslation */
5582
5628
  );
5583
5629
  if (constructor !== void 0) {
5584
5630
  return { typeTranslation: constructor.parent.parent };
5585
5631
  }
5586
5632
  const variableOrVariant = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5587
5633
  tokenOrKeyword,
5588
- 135 /* TypeVariableOrVariantTranslation */
5634
+ 137 /* TypeVariableOrVariantTranslation */
5589
5635
  );
5590
5636
  if (variableOrVariant !== void 0) {
5591
5637
  return { typeTranslation: variableOrVariant.parent.parent };
5592
5638
  }
5593
5639
  const method = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5594
5640
  tokenOrKeyword,
5595
- 130 /* TypeMethodTranslation */
5641
+ 132 /* TypeMethodTranslation */
5596
5642
  );
5597
5643
  if (method !== void 0) {
5598
5644
  return { typeTranslation: method.parent.parent };
@@ -5717,13 +5763,13 @@ var NodeSemanticInfoService = class {
5717
5763
  return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5718
5764
  } else if (tokenOrKeyword.parent.kind === 91 /* AssignmentStatement */) {
5719
5765
  return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options6);
5720
- } else if (tokenOrKeyword.isKeyword(29 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
5766
+ } else if (tokenOrKeyword.isKeyword(30 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
5721
5767
  return this.ofTypeConstructorDeclaration(analyzer, tokenOrKeyword.parent);
5722
5768
  } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 90 /* DefaultMatchExpression */) {
5723
5769
  return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
5724
5770
  } else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 86 /* ObjectExpression */) {
5725
5771
  return this.ofObjectExpression(analyzer, tokenOrKeyword.parent, options6);
5726
- } else if (tokenOrKeyword.isKeyword(55 /* Base */) && tokenOrKeyword.parent.kind === 87 /* BaseExpression */) {
5772
+ } else if (tokenOrKeyword.isKeyword(56 /* Base */) && tokenOrKeyword.parent.kind === 87 /* BaseExpression */) {
5727
5773
  return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options6);
5728
5774
  } else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 49 /* TypeIndexerParameterClause */) {
5729
5775
  return this.ofTypeIndexerDeclaration(analyzer, tokenOrKeyword.parent.parent);
@@ -5740,11 +5786,11 @@ var NodeSemanticInfoService = class {
5740
5786
  let result;
5741
5787
  const parent = node.parent;
5742
5788
  switch (parent.kind) {
5743
- case 127 /* TranslationTypeParameterList */:
5789
+ case 129 /* TranslationTypeParameterList */:
5744
5790
  break;
5745
- case 122 /* TranslationParameterList */:
5791
+ case 124 /* TranslationParameterList */:
5746
5792
  break;
5747
- case 143 /* Argument */: {
5793
+ case 145 /* Argument */: {
5748
5794
  const respectiveParameter = analyzer.getRespectiveParameter(parent);
5749
5795
  if (respectiveParameter !== void 0) {
5750
5796
  const target = new SimpleWithLocalization(
@@ -5761,7 +5807,7 @@ var NodeSemanticInfoService = class {
5761
5807
  case 60 /* EnumerationVariableDeclaration */:
5762
5808
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofEnumerationVariableDeclaration(parent));
5763
5809
  break;
5764
- case 100 /* ErrorVariableDeclaration */:
5810
+ case 101 /* ErrorVariableDeclaration */:
5765
5811
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofErrorVariableDeclaration(parent));
5766
5812
  break;
5767
5813
  case 22 /* PackageAliasTypeDeclaration */:
@@ -5791,10 +5837,10 @@ var NodeSemanticInfoService = class {
5791
5837
  case 59 /* LocalVariableDeclaration */:
5792
5838
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofLocalVariableDeclaration(parent));
5793
5839
  break;
5794
- case 133 /* QualifiedName */:
5840
+ case 135 /* QualifiedName */:
5795
5841
  result = this.ofQualifiedNameQualifier(analyzer, parent, node, options6);
5796
5842
  break;
5797
- case 134 /* PackageVariableTranslation */: {
5843
+ case 136 /* PackageVariableTranslation */: {
5798
5844
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5799
5845
  const getTargetResult = translationPackage?.getPackageVariableTranslationTarget(parent);
5800
5846
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5814,7 +5860,7 @@ var NodeSemanticInfoService = class {
5814
5860
  }
5815
5861
  break;
5816
5862
  }
5817
- case 135 /* TypeVariableOrVariantTranslation */: {
5863
+ case 137 /* TypeVariableOrVariantTranslation */: {
5818
5864
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5819
5865
  const getTargetsResult = translationPackage?.getTypeVariableOrVariantTranslationTargets(parent);
5820
5866
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5838,7 +5884,7 @@ var NodeSemanticInfoService = class {
5838
5884
  }
5839
5885
  break;
5840
5886
  }
5841
- case 129 /* PackageMethodTranslation */: {
5887
+ case 131 /* PackageMethodTranslation */: {
5842
5888
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5843
5889
  const getTargetsResult = translationPackage?.getPackageMethodTranslationTargets(parent);
5844
5890
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5862,7 +5908,7 @@ var NodeSemanticInfoService = class {
5862
5908
  }
5863
5909
  break;
5864
5910
  }
5865
- case 130 /* TypeMethodTranslation */: {
5911
+ case 132 /* TypeMethodTranslation */: {
5866
5912
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5867
5913
  const getTargetsResult = translationPackage?.getTypeMethodTranslationTargets(parent);
5868
5914
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5886,7 +5932,7 @@ var NodeSemanticInfoService = class {
5886
5932
  }
5887
5933
  break;
5888
5934
  }
5889
- case 137 /* TypeTranslation */: {
5935
+ case 139 /* TypeTranslation */: {
5890
5936
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5891
5937
  const getTargetResult = translationPackage?.getTypeTranslationTarget(parent);
5892
5938
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5906,7 +5952,7 @@ var NodeSemanticInfoService = class {
5906
5952
  }
5907
5953
  break;
5908
5954
  }
5909
- case 131 /* MethodTypeTranslation */: {
5955
+ case 133 /* MethodTypeTranslation */: {
5910
5956
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5911
5957
  const getTargetResult = translationPackage?.getMethodTypeTranslationTarget(parent);
5912
5958
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5926,7 +5972,7 @@ var NodeSemanticInfoService = class {
5926
5972
  }
5927
5973
  break;
5928
5974
  }
5929
- case 142 /* ParameterDeclaration */:
5975
+ case 144 /* ParameterDeclaration */:
5930
5976
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofParameterDeclaration(parent));
5931
5977
  break;
5932
5978
  case 8 /* PackageImport */:
@@ -5947,10 +5993,10 @@ var NodeSemanticInfoService = class {
5947
5993
  case 54 /* TypeVariableDeclaration */:
5948
5994
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeVariableDeclaration(parent));
5949
5995
  break;
5950
- case 141 /* TypeParameterDeclaration */:
5996
+ case 143 /* TypeParameterDeclaration */:
5951
5997
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeParameterDeclaration(parent));
5952
5998
  break;
5953
- case 140 /* VariantDeclaration */:
5999
+ case 142 /* VariantDeclaration */:
5954
6000
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofVariantDeclaration(parent));
5955
6001
  break;
5956
6002
  case 36 /* PackageVariableGetterDeclaration */:
@@ -6076,10 +6122,10 @@ var NodeSemanticInfoService = class {
6076
6122
  switch (node.parent.kind) {
6077
6123
  case 10 /* NamedTypeSpecifier */:
6078
6124
  return this.ofNamedTypeSpecifierNameQualifier(analyzer, node.parent, qualifier, options6);
6079
- case 145 /* Tag */:
6125
+ case 147 /* Tag */:
6080
6126
  return this.ofTagNameQualifier(analyzer, node.parent, qualifier, options6);
6081
6127
  case 42 /* ExtendedTypeClause */:
6082
- case 132 /* PackageImportTranslation */:
6128
+ case 134 /* PackageImportTranslation */:
6083
6129
  return void 0;
6084
6130
  default:
6085
6131
  Debug.never(node.parent);
@@ -6820,7 +6866,7 @@ function getEntitySourceLocations(analyzer, entity) {
6820
6866
  case 38 /* PackageVariantTypeDeclaration */:
6821
6867
  case 58 /* NestedMethodDeclaration */:
6822
6868
  case 52 /* TypeMethodDeclaration */:
6823
- case 141 /* TypeParameterDeclaration */:
6869
+ case 143 /* TypeParameterDeclaration */:
6824
6870
  case 53 /* OperatorDeclaration */:
6825
6871
  range = node.name.rangeWithoutTrivia;
6826
6872
  break;
@@ -7661,17 +7707,17 @@ var EvaluatableExpressionService = class {
7661
7707
  return { nameIdentifier: node.name };
7662
7708
  case 59 /* LocalVariableDeclaration */:
7663
7709
  return { nameIdentifier: node.name };
7664
- case 142 /* ParameterDeclaration */:
7710
+ case 144 /* ParameterDeclaration */:
7665
7711
  return { nameIdentifier: node.name };
7666
7712
  case 52 /* TypeMethodDeclaration */:
7667
7713
  return { nameIdentifier: node.name };
7668
7714
  case 54 /* TypeVariableDeclaration */:
7669
7715
  return { nameIdentifier: node.name };
7670
- case 141 /* TypeParameterDeclaration */:
7716
+ case 143 /* TypeParameterDeclaration */:
7671
7717
  return { nameIdentifier: node.name };
7672
- case 140 /* VariantDeclaration */:
7718
+ case 142 /* VariantDeclaration */:
7673
7719
  return { nameIdentifier: node.name };
7674
- case 100 /* ErrorVariableDeclaration */:
7720
+ case 101 /* ErrorVariableDeclaration */:
7675
7721
  return { nameIdentifier: node.name };
7676
7722
  default:
7677
7723
  return void 0;
@@ -7849,7 +7895,7 @@ var HoverService = class {
7849
7895
  const typeText = this._displayService.displayType(firstTarget.value.type);
7850
7896
  return new Hover(`${keywordText}: ${typeText}`, range);
7851
7897
  } else if (firstTarget.value.typeContextKind === "base") {
7852
- const keywordText = this._displayService.displayKeyword(55 /* Base */);
7898
+ const keywordText = this._displayService.displayKeyword(56 /* Base */);
7853
7899
  const typeText = this._displayService.displayType(firstTarget.value.type);
7854
7900
  return new Hover(`${keywordText}: ${typeText}`, range);
7855
7901
  } else {
@@ -8106,7 +8152,7 @@ var SourceFileItemsService = class {
8106
8152
  );
8107
8153
  break;
8108
8154
  }
8109
- case 140 /* VariantDeclaration */: {
8155
+ case 142 /* VariantDeclaration */: {
8110
8156
  result.push(
8111
8157
  this.createItem(
8112
8158
  9 /* Variant */,
@@ -8118,7 +8164,7 @@ var SourceFileItemsService = class {
8118
8164
  );
8119
8165
  break;
8120
8166
  }
8121
- case 141 /* TypeParameterDeclaration */: {
8167
+ case 143 /* TypeParameterDeclaration */: {
8122
8168
  result.push(
8123
8169
  this.createItem(
8124
8170
  18 /* TypeParameter */,
@@ -8174,23 +8220,23 @@ var SourceFileItemsService = class {
8174
8220
  case 8 /* InvalidType */:
8175
8221
  return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(16 /* Type */, this.locale, this.dialect)}>`;
8176
8222
  case 10 /* TypeConstructor */:
8177
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(29 /* Creation */, this.locale, this.dialect);
8223
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(30 /* Creation */, this.locale, this.dialect);
8178
8224
  case 11 /* TypeDestructor */:
8179
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(46 /* Destruction */, this.locale, this.dialect);
8225
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(47 /* Destruction */, this.locale, this.dialect);
8180
8226
  case 9 /* Variant */:
8181
8227
  return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(6 /* Variant */, this.locale, this.dialect)}>`;
8182
8228
  case 18 /* TypeParameter */:
8183
8229
  return name ?? `<${LocalizationHelper.localizeHelperPhrase(2 /* TypeParameter */, this.locale)}>`;
8184
8230
  case 2 /* PackageVariableGetter */:
8185
8231
  case 13 /* TypeVariableGetter */:
8186
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(57 /* Get */, this.locale, this.dialect)} ${name ?? ""}`;
8232
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Get */, this.locale, this.dialect)} ${name ?? ""}`;
8187
8233
  case 3 /* PackageVariableSetter */:
8188
8234
  case 14 /* TypeVariableSetter */:
8189
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Set */, this.locale, this.dialect)} ${name ?? ""}`;
8235
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Set */, this.locale, this.dialect)} ${name ?? ""}`;
8190
8236
  case 16 /* TypeIndexedGetter */:
8191
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(57 /* Get */, this.locale, this.dialect)} []`;
8237
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Get */, this.locale, this.dialect)} []`;
8192
8238
  case 17 /* TypeIndexedSetter */:
8193
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Set */, this.locale, this.dialect)} []`;
8239
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Set */, this.locale, this.dialect)} []`;
8194
8240
  default:
8195
8241
  Debug.never(kind);
8196
8242
  }
@@ -8385,7 +8431,7 @@ var SelectionRangeService = class {
8385
8431
  }
8386
8432
  }
8387
8433
  switch (node.kind) {
8388
- case 154 /* TypeAnnotation */:
8434
+ case 156 /* TypeAnnotation */:
8389
8435
  case 34 /* StructuredTypeDeclarationBody */:
8390
8436
  case 39 /* VariantTypeDeclarationBody */:
8391
8437
  case 23 /* AliasTypeDeclarationBody */:
@@ -8529,7 +8575,7 @@ var SemanticTokensService = class {
8529
8575
  ));
8530
8576
  }
8531
8577
  }
8532
- if (node.kind === 140 /* VariantDeclaration */) {
8578
+ if (node.kind === 142 /* VariantDeclaration */) {
8533
8579
  result.push(
8534
8580
  new SemanticToken(
8535
8581
  node.name.rangeWithoutTrivia,
@@ -8713,7 +8759,7 @@ var TypeParameterSignatureHelpProvider = class {
8713
8759
  }
8714
8760
  let node = token.parent;
8715
8761
  while (node !== void 0) {
8716
- if (node.kind === 150 /* TypeArgumentClause */ && this._offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this._offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8762
+ if (node.kind === 152 /* TypeArgumentClause */ && this._offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this._offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8717
8763
  const argumentIndex = this.getArgumentIndex(node.typeArgumentList, this._offset);
8718
8764
  const argumentCount = this.countArguments(node.typeArgumentList);
8719
8765
  return new NodeWithTypeArgumentsInfo(node.parent, argumentIndex, argumentCount);
@@ -8760,7 +8806,7 @@ var TypeParameterSignatureHelpProvider = class {
8760
8806
  return this.getSignaturesForNamedTypeSpecifier(node);
8761
8807
  case 89 /* GenericSpecializationExpression */:
8762
8808
  return this.getSignaturesForGenericSpecializationExpression(node);
8763
- case 145 /* Tag */:
8809
+ case 147 /* Tag */:
8764
8810
  return this.getSignaturesForTag(node);
8765
8811
  default:
8766
8812
  Debug.never(node);
@@ -9091,7 +9137,7 @@ var ValueParametersSignatureHelpProvider = class {
9091
9137
  }
9092
9138
  break;
9093
9139
  }
9094
- case 145 /* Tag */: {
9140
+ case 147 /* Tag */: {
9095
9141
  if (node.openParenthesisToken !== void 0 && this._offset >= node.openParenthesisToken.rangeWithoutTrivia.end && node.argumentList !== void 0 && (node.closeParenthesisToken === void 0 || node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9096
9142
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this._offset);
9097
9143
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfTag(node);
@@ -11628,7 +11674,7 @@ var EntityToSyntax = class {
11628
11674
  convertPackageVariable(entity) {
11629
11675
  const commonModifiers = new Array();
11630
11676
  if (entity.isConstant()) {
11631
- commonModifiers.push(SyntaxFactory.modifier(34 /* Const */));
11677
+ commonModifiers.push(SyntaxFactory.modifier(35 /* Const */));
11632
11678
  }
11633
11679
  const name = this.getEntityName(entity);
11634
11680
  const type = this.convertType(entity.getType());
@@ -11670,7 +11716,7 @@ var EntityToSyntax = class {
11670
11716
  const tags = this.convertTags(entity.getTags());
11671
11717
  const modifiers = new Array();
11672
11718
  if (entity.isAsync()) {
11673
- modifiers.push(SyntaxFactory.modifier(39 /* Async */));
11719
+ modifiers.push(SyntaxFactory.modifier(40 /* Async */));
11674
11720
  }
11675
11721
  const isHidden = entity.isHidden();
11676
11722
  if (isHidden !== void 0) {
@@ -11752,19 +11798,19 @@ var EntityToSyntax = class {
11752
11798
  }
11753
11799
  const commonModifiers = new Array();
11754
11800
  if (entity.isConstant()) {
11755
- commonModifiers.push(SyntaxFactory.modifier(34 /* Const */));
11801
+ commonModifiers.push(SyntaxFactory.modifier(35 /* Const */));
11756
11802
  }
11757
11803
  if (entity.isStatic()) {
11758
- commonModifiers.push(SyntaxFactory.modifier(40 /* Static */));
11804
+ commonModifiers.push(SyntaxFactory.modifier(41 /* Static */));
11759
11805
  }
11760
11806
  if (entity.isAbstract()) {
11761
- commonModifiers.push(SyntaxFactory.modifier(36 /* Abstract */));
11807
+ commonModifiers.push(SyntaxFactory.modifier(37 /* Abstract */));
11762
11808
  }
11763
11809
  if (entity.isRedefinable()) {
11764
- commonModifiers.push(SyntaxFactory.modifier(37 /* Redefinable */));
11810
+ commonModifiers.push(SyntaxFactory.modifier(38 /* Redefinable */));
11765
11811
  }
11766
11812
  if (entity.isRedefined()) {
11767
- commonModifiers.push(SyntaxFactory.modifier(38 /* Redefined */));
11813
+ commonModifiers.push(SyntaxFactory.modifier(39 /* Redefined */));
11768
11814
  }
11769
11815
  const name = this.getEntityName(entity);
11770
11816
  const type = this.convertType(entity.getType());
@@ -11810,16 +11856,16 @@ var EntityToSyntax = class {
11810
11856
  modifiers.push(this.createHidingModifier(isHidden));
11811
11857
  }
11812
11858
  if (entity.isStatic()) {
11813
- modifiers.push(SyntaxFactory.modifier(40 /* Static */));
11859
+ modifiers.push(SyntaxFactory.modifier(41 /* Static */));
11814
11860
  }
11815
11861
  if (entity.isAbstract()) {
11816
- modifiers.push(SyntaxFactory.modifier(36 /* Abstract */));
11862
+ modifiers.push(SyntaxFactory.modifier(37 /* Abstract */));
11817
11863
  }
11818
11864
  if (entity.isRedefinable()) {
11819
- modifiers.push(SyntaxFactory.modifier(37 /* Redefinable */));
11865
+ modifiers.push(SyntaxFactory.modifier(38 /* Redefinable */));
11820
11866
  }
11821
11867
  if (entity.isRedefined()) {
11822
- modifiers.push(SyntaxFactory.modifier(38 /* Redefined */));
11868
+ modifiers.push(SyntaxFactory.modifier(39 /* Redefined */));
11823
11869
  }
11824
11870
  const name = this.getEntityName(entity);
11825
11871
  const typeParameters = this.convertTypeParameters(entity.getTypeParameters());
@@ -11835,7 +11881,7 @@ var EntityToSyntax = class {
11835
11881
  modifiers.push(this.createHidingModifier(isHidden));
11836
11882
  }
11837
11883
  if (entity.isAbstract()) {
11838
- modifiers.push(SyntaxFactory.modifier(36 /* Abstract */));
11884
+ modifiers.push(SyntaxFactory.modifier(37 /* Abstract */));
11839
11885
  }
11840
11886
  const parameters = this.convertValueParameters(entity.getValueParameters());
11841
11887
  return SyntaxFactory.typeConstructorDeclaration(tags, modifiers, parameters, void 0);
@@ -11848,7 +11894,7 @@ var EntityToSyntax = class {
11848
11894
  modifiers.push(this.createHidingModifier(isHidden));
11849
11895
  }
11850
11896
  if (entity.isAbstract()) {
11851
- modifiers.push(SyntaxFactory.modifier(36 /* Abstract */));
11897
+ modifiers.push(SyntaxFactory.modifier(37 /* Abstract */));
11852
11898
  }
11853
11899
  const parameters = this.convertValueParameters(entity.getValueParameters());
11854
11900
  return SyntaxFactory.typeDestructorDeclaration(tags, modifiers, parameters, void 0);
@@ -11856,10 +11902,10 @@ var EntityToSyntax = class {
11856
11902
  convertTypeIndexer(entity) {
11857
11903
  const commonModifiers = new Array();
11858
11904
  if (entity.isStatic()) {
11859
- commonModifiers.push(SyntaxFactory.modifier(40 /* Static */));
11905
+ commonModifiers.push(SyntaxFactory.modifier(41 /* Static */));
11860
11906
  }
11861
11907
  if (entity.isAbstract()) {
11862
- commonModifiers.push(SyntaxFactory.modifier(36 /* Abstract */));
11908
+ commonModifiers.push(SyntaxFactory.modifier(37 /* Abstract */));
11863
11909
  }
11864
11910
  const parameters = this.convertValueParameters(entity.getValueParameters());
11865
11911
  const result = new Array();
@@ -11973,21 +12019,21 @@ var EntityToSyntax = class {
11973
12019
  let levelKeyword;
11974
12020
  switch (hiding.kind) {
11975
12021
  case "type":
11976
- levelKeyword = 50 /* InType */;
12022
+ levelKeyword = 51 /* InType */;
11977
12023
  break;
11978
12024
  case "type-hierarchy":
11979
- levelKeyword = 47 /* InHierarchy */;
12025
+ levelKeyword = 48 /* InHierarchy */;
11980
12026
  break;
11981
12027
  case "file":
11982
- levelKeyword = 48 /* InFile */;
12028
+ levelKeyword = 49 /* InFile */;
11983
12029
  break;
11984
12030
  case "package":
11985
- levelKeyword = 49 /* InPackage */;
12031
+ levelKeyword = 50 /* InPackage */;
11986
12032
  break;
11987
12033
  default:
11988
12034
  Debug.never(hiding);
11989
12035
  }
11990
- return SyntaxFactory.modifier(35 /* Hidden */, levelKeyword);
12036
+ return SyntaxFactory.modifier(36 /* Hidden */, levelKeyword);
11991
12037
  }
11992
12038
  convertTags(_entityTags) {
11993
12039
  return [];