@artel/artc 0.6.26039 → 0.9.26001

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 (213) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +19 -15
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +11426 -5066
  5. package/build/{chunk-LTJPPRSR.js → chunk-FLMCFMMG.js} +87218 -50777
  6. package/build/{chunk-AEW4TILW.js → chunk-V2TFXOVJ.js} +1 -1
  7. package/build/{chunk-5VVFNKOH.js → chunk-XMOVE7NP.js} +2 -2
  8. package/build/types/analysis/Analyzer.d.ts +6 -1
  9. package/build/types/analysis/TypeMemberLookup.d.ts +3 -1
  10. package/build/types/analysis/WellKnownDeclarations.d.ts +54 -0
  11. package/build/types/analysis/a/Analyzer.d.ts +10 -10
  12. package/build/types/analysis/a/IdentifierExpressionMeaning.d.ts +3 -3
  13. package/build/types/analysis/a/MemberAccessExpressionMeaning.d.ts +3 -3
  14. package/build/types/analysis/a/ModifierValidator.d.ts +3 -2
  15. package/build/types/analysis/a/ResolvedTranslationPackage.d.ts +2 -1
  16. package/build/types/analysis/a/SourceFileAnalyzer.d.ts +1 -1
  17. package/build/types/analysis/a/SourcePackageMembersCreator.d.ts +1 -2
  18. package/build/types/analysis/a/TreeQuery.d.ts +1 -2
  19. package/build/types/analysis/a/TypeMemberLookup.d.ts +3 -1
  20. package/build/types/analysis/a/semantic-context/FieldWithInitializerSemanticContext.d.ts +3 -3
  21. package/build/types/analysis/a/semantic-context/SemanticContext.d.ts +2 -2
  22. package/build/types/analysis/a/semantic-context/SemanticContextBuilder.d.ts +10 -12
  23. package/build/types/analysis/a/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +0 -1
  24. package/build/types/analysis/a/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -4
  25. package/build/types/analysis/a/semantic-context/SubprogramSemanticContext.d.ts +11 -10
  26. package/build/types/analysis/a/semantic-context/TypeSemanticContext.d.ts +13 -13
  27. package/build/types/analysis/m/Analyzer.d.ts +425 -1
  28. package/build/types/analysis/m/ArgumentToParameterMatchResult.d.ts +23 -0
  29. package/build/types/analysis/m/ArgumentsToParametersMatcher.d.ts +40 -0
  30. package/build/types/analysis/m/BaseExpressionMeaning.d.ts +25 -0
  31. package/build/types/analysis/m/CallExpressionMeaning.d.ts +72 -0
  32. package/build/types/analysis/m/ConstructorCallResolver.d.ts +24 -0
  33. package/build/types/analysis/m/DeclarationsUsageCounter.d.ts +12 -0
  34. package/build/types/analysis/m/DereferenceExpressionMeaning.d.ts +28 -0
  35. package/build/types/analysis/m/ExpressionAnalysisOptions.d.ts +21 -0
  36. package/build/types/analysis/m/FunctionAccessResolver.d.ts +19 -0
  37. package/build/types/analysis/m/IdentifierExpressionMeaning.d.ts +137 -0
  38. package/build/types/analysis/m/IndexedAccessExpressionMeaning.d.ts +32 -0
  39. package/build/types/analysis/m/InstanceFieldsInitializationValidator.d.ts +18 -0
  40. package/build/types/analysis/m/MemberAccessExpressionMeaning.d.ts +137 -0
  41. package/build/types/analysis/m/ModifierFlags.d.ts +20 -0
  42. package/build/types/analysis/m/NamedTypeResolver.d.ts +44 -0
  43. package/build/types/analysis/m/NamedTypeSpecifierResolver.d.ts +19 -0
  44. package/build/types/analysis/m/ObjectExpressionMeaning.d.ts +29 -0
  45. package/build/types/analysis/m/OverloadResolver.d.ts +104 -0
  46. package/build/types/analysis/m/OwnAndBaseConstructorCallsChecker.d.ts +36 -0
  47. package/build/types/analysis/m/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
  48. package/build/types/analysis/m/ReachabilityChecker.d.ts +27 -0
  49. package/build/types/analysis/m/ReductionSourceMemberFinder.d.ts +17 -0
  50. package/build/types/analysis/m/ReservedNameDictionary.d.ts +15 -0
  51. package/build/types/analysis/m/ResolvedTranslationPackage.d.ts +68 -0
  52. package/build/types/analysis/m/ReturnTypeInferrer.d.ts +13 -0
  53. package/build/types/analysis/m/SourceFileAnalyzer.d.ts +131 -0
  54. package/build/types/analysis/m/SourcePackageMembersCreator.d.ts +7 -0
  55. package/build/types/analysis/m/SourceTypeMembersCreator.d.ts +9 -0
  56. package/build/types/analysis/m/StaticDeclarationMeaning.d.ts +32 -0
  57. package/build/types/analysis/m/SyntacticAccessKind.d.ts +6 -0
  58. package/build/types/analysis/m/TagMeaning.d.ts +70 -0
  59. package/build/types/analysis/m/TextIdentity.d.ts +7 -0
  60. package/build/types/analysis/m/TranslatedEntityNameConflictsValidator.d.ts +28 -0
  61. package/build/types/analysis/m/TreeQuery.d.ts +15 -0
  62. package/build/types/analysis/m/TypeArgumentInferrer.d.ts +52 -0
  63. package/build/types/analysis/m/TypeInferrer.d.ts +11 -0
  64. package/build/types/analysis/m/TypeMemberLookup.d.ts +4 -1
  65. package/build/types/analysis/m/TypeNarrower.d.ts +31 -0
  66. package/build/types/analysis/m/TypeOverloadResolver.d.ts +9 -0
  67. package/build/types/analysis/m/UserDefinableBinaryOperatorResolver.d.ts +34 -0
  68. package/build/types/analysis/m/UserDefinableUnaryOperatorResolver.d.ts +23 -0
  69. package/build/types/analysis/m/VariableIsAssignedChecker.d.ts +11 -0
  70. package/build/types/analysis/m/VariableIsNotAssignedChecker.d.ts +12 -0
  71. package/build/types/analysis/m/control-flow/GraphBuilder.d.ts +52 -0
  72. package/build/types/analysis/m/control-flow/GraphVisualizer.d.ts +12 -0
  73. package/build/types/analysis/m/control-flow/NarrowableExpression.d.ts +5 -0
  74. package/build/types/analysis/m/control-flow/NarrowableReference.d.ts +72 -0
  75. package/build/types/analysis/m/control-flow/Nodes.d.ts +112 -0
  76. package/build/types/analysis/m/control-flow/index.d.ts +5 -0
  77. package/build/types/analysis/m/semantic-context/Declarations.d.ts +94 -0
  78. package/build/types/analysis/m/semantic-context/FieldWithInitializerSemanticContext.d.ts +28 -0
  79. package/build/types/analysis/m/semantic-context/SemanticContext.d.ts +14 -0
  80. package/build/types/analysis/m/semantic-context/SemanticContextBase.d.ts +190 -0
  81. package/build/types/analysis/m/semantic-context/SemanticContextBuilder.d.ts +69 -0
  82. package/build/types/analysis/m/semantic-context/SemanticContextValidatingNameConflicts.d.ts +51 -0
  83. package/build/types/analysis/m/semantic-context/SemanticContextWithParent.d.ts +12 -0
  84. package/build/types/analysis/m/semantic-context/SourceFileSemanticContext.d.ts +63 -0
  85. package/build/types/analysis/m/semantic-context/StaticDeclarationSemanticContext.d.ts +26 -0
  86. package/build/types/analysis/m/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +108 -0
  87. package/build/types/analysis/m/semantic-context/SubprogramSemanticContext.d.ts +92 -0
  88. package/build/types/analysis/m/semantic-context/TypeSemanticContext.d.ts +93 -0
  89. package/build/types/analysis/m/semantic-context/index.d.ts +10 -0
  90. package/build/types/common/LocalizationHelper.d.ts +3 -1
  91. package/build/types/common/LocalizationHelperA.d.ts +0 -2
  92. package/build/types/common/LocalizationHelperM.d.ts +13 -0
  93. package/build/types/common/Name.d.ts +1 -1
  94. package/build/types/common/index.d.ts +1 -0
  95. package/build/types/diagnostic/DiagnosticCode.d.ts +211 -192
  96. package/build/types/diagnostic/TokenDiagnosticM.d.ts +2 -0
  97. package/build/types/emitter/EmitPhaseName.d.ts +2 -2
  98. package/build/types/emitter/EmitterContext.d.ts +4 -4
  99. package/build/types/emitter/Entities.d.ts +4 -2
  100. package/build/types/emitter/IrBuilderM.d.ts +124 -0
  101. package/build/types/emitter/IrFactory.d.ts +2 -2
  102. package/build/types/entities/Entity.d.ts +8 -5
  103. package/build/types/entities/EntityLocalizationContext.d.ts +3 -2
  104. package/build/types/entities/OperatorKind.d.ts +13 -18
  105. package/build/types/entities/Translation.d.ts +4 -3
  106. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +4 -1
  107. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +3 -1
  108. package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -1
  109. package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +3 -1
  110. package/build/types/entities/interfaces/IndexerEntity.d.ts +4 -1
  111. package/build/types/entities/interfaces/PackageAliasEntity.d.ts +4 -1
  112. package/build/types/entities/interfaces/PackageEntity.d.ts +2 -1
  113. package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +3 -1
  114. package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +9 -2
  115. package/build/types/entities/interfaces/TextTranslationEntity.d.ts +4 -1
  116. package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +4 -1
  117. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +7 -3
  118. package/build/types/entities/interfaces/VariableEntity.d.ts +3 -2
  119. package/build/types/entities/interfaces/VariantTypeEntity.d.ts +3 -1
  120. package/build/types/entities/interfaces/m/ConstructorEntityM.d.ts +10 -0
  121. package/build/types/entities/interfaces/m/DestructorEntityM.d.ts +8 -0
  122. package/build/types/entities/interfaces/m/index.d.ts +2 -0
  123. package/build/types/entities/source/a/SourceFunctionEntity.d.ts +1 -1
  124. package/build/types/entities/source/a/SourcePackageEntity.d.ts +2 -1
  125. package/build/types/entities/source/a/SourceStructuredTypeEntity.d.ts +3 -5
  126. package/build/types/entities/source/m/SourceAliasTypeEntity.d.ts +32 -0
  127. package/build/types/entities/source/m/SourceConstructorEntity.d.ts +40 -0
  128. package/build/types/entities/source/m/SourceDestructorEntity.d.ts +38 -0
  129. package/build/types/entities/source/m/SourceFunctionEntity.d.ts +252 -0
  130. package/build/types/entities/source/m/SourceFunctionTypeEntity.d.ts +35 -0
  131. package/build/types/entities/source/m/SourceGetterEntity.d.ts +122 -0
  132. package/build/types/entities/source/m/SourceIndexerEntity.d.ts +36 -0
  133. package/build/types/entities/source/m/SourcePackageAliasEntity.d.ts +22 -0
  134. package/build/types/entities/source/m/SourcePackageEntity.d.ts +68 -0
  135. package/build/types/entities/source/m/SourceSetterEntity.d.ts +122 -0
  136. package/build/types/entities/source/m/SourceStructuredTypeEntity.d.ts +111 -0
  137. package/build/types/entities/source/m/SourceTextTranslationEntity.d.ts +29 -0
  138. package/build/types/entities/source/m/SourceTypeParameterEntity.d.ts +30 -0
  139. package/build/types/entities/source/m/SourceVariableEntity.d.ts +447 -0
  140. package/build/types/entities/source/m/SourceVariantTypeEntity.d.ts +38 -0
  141. package/build/types/entities/source/m/index.d.ts +15 -0
  142. package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -1
  143. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +33 -1
  144. package/build/types/entities/translated/source/a/SourceTranslatedPackageStructuredTypeEntity.d.ts +8 -2
  145. package/build/types/entities/translated/source/m/SourceTranslatedAliasTypeEntity.d.ts +14 -0
  146. package/build/types/entities/translated/source/m/SourceTranslatedDestructorEntity.d.ts +12 -0
  147. package/build/types/entities/translated/source/m/SourceTranslatedFunctionEntity.d.ts +24 -0
  148. package/build/types/entities/translated/source/m/SourceTranslatedFunctionTypeEntity.d.ts +13 -0
  149. package/build/types/entities/translated/source/m/SourceTranslatedIndexerEntity.d.ts +12 -0
  150. package/build/types/entities/translated/source/m/SourceTranslatedPackageEntity.d.ts +19 -0
  151. package/build/types/entities/translated/source/m/SourceTranslatedPackageStructuredTypeEntity.d.ts +26 -0
  152. package/build/types/entities/translated/source/m/SourceTranslatedPackageVariantTypeEntity.d.ts +14 -0
  153. package/build/types/entities/translated/source/m/SourceTranslatedReducedTypeEntity.d.ts +14 -0
  154. package/build/types/entities/translated/source/m/index.d.ts +9 -0
  155. package/build/types/parser/a/KeywordDictionary.d.ts +2 -3
  156. package/build/types/parser/a/Parser.d.ts +2 -2
  157. package/build/types/parser/m/ConvertTokenKind.d.ts +3 -0
  158. package/build/types/parser/m/KeywordDictionary.d.ts +33 -0
  159. package/build/types/parser/m/Parser.d.ts +7 -0
  160. package/build/types/parser/m/Scanner.d.ts +56 -0
  161. package/build/types/parser/m/TokenKind.d.ts +81 -0
  162. package/build/types/parser/m/TriviaInterner.d.ts +8 -0
  163. package/build/types/project/SourceFile.d.ts +5 -6
  164. package/build/types/services/LanguageServer.d.ts +23 -12
  165. package/build/types/services/a/NodeSemanticInfo.d.ts +2 -2
  166. package/build/types/services/common/WorkspaceItemsService.d.ts +1 -0
  167. package/build/types/services/common/completion/Types.d.ts +8 -2
  168. package/build/types/services/common/display/DisplayService.d.ts +3 -0
  169. package/build/types/services/common/display/Types.d.ts +2 -2
  170. package/build/types/services/m/CodeActionsService.d.ts +10 -0
  171. package/build/types/services/m/CompletionService.d.ts +60 -0
  172. package/build/types/services/m/DefinitionService.d.ts +11 -0
  173. package/build/types/services/m/DisplayService.d.ts +52 -0
  174. package/build/types/services/m/EvaluatableExpressionService.d.ts +10 -0
  175. package/build/types/services/m/HoverService.d.ts +11 -0
  176. package/build/types/services/m/NodeSemanticInfo.d.ts +46 -0
  177. package/build/types/services/m/RenameService.d.ts +11 -0
  178. package/build/types/services/m/SelectionRangeService.d.ts +7 -0
  179. package/build/types/services/m/SemanticTokensService.d.ts +11 -0
  180. package/build/types/services/m/SourceFileItemsService.d.ts +10 -0
  181. package/build/types/services/m/TranslationService.d.ts +23 -0
  182. package/build/types/services/m/TranslationsGenerationService.d.ts +7 -0
  183. package/build/types/services/m/TreeUtils.d.ts +58 -0
  184. package/build/types/services/m/references/DefinitionInfoFinder.d.ts +6 -0
  185. package/build/types/services/m/references/ReferencesFinder.d.ts +7 -0
  186. package/build/types/services/m/signature-help/ParametersSignatureHelpProvider.d.ts +15 -0
  187. package/build/types/services/m/signature-help/SignatureHelpService.d.ts +6 -0
  188. package/build/types/services/m/signature-help/SignatureWithParameters.d.ts +94 -0
  189. package/build/types/services/m/signature-help/TypeParameterSignatureHelpProvider.d.ts +21 -0
  190. package/build/types/services/m/signature-help/utils.d.ts +9 -0
  191. package/build/types/tree/a/KeywordKind.d.ts +1 -3
  192. package/build/types/tree/a/NodeKind.d.ts +113 -114
  193. package/build/types/tree/a/Nodes.d.ts +6 -5
  194. package/build/types/tree/a/OperatorKind.d.ts +5 -0
  195. package/build/types/tree/a/Types.d.ts +9 -4
  196. package/build/types/tree/m/BaseNode.d.ts +8 -40
  197. package/build/types/tree/m/KeywordFlags.d.ts +4 -0
  198. package/build/types/tree/m/KeywordKind.d.ts +40 -0
  199. package/build/types/tree/m/NodeKind.d.ts +147 -2
  200. package/build/types/tree/m/Nodes.d.ts +2064 -9
  201. package/build/types/tree/m/NodesDebug.d.ts +9 -0
  202. package/build/types/tree/m/OperatorKind.d.ts +39 -0
  203. package/build/types/tree/m/SyntaxToCode.d.ts +107 -0
  204. package/build/types/tree/m/Token.d.ts +46 -0
  205. package/build/types/tree/m/TokenFlags.d.ts +12 -0
  206. package/build/types/tree/m/TokenKind.d.ts +61 -60
  207. package/build/types/tree/m/TreeTraversal.d.ts +18 -0
  208. package/build/types/tree/m/Types.d.ts +46 -0
  209. package/build/types/tree/m/Utils.d.ts +7 -0
  210. package/build/types/tree/m/index.d.ts +9 -0
  211. package/build/types/types/StandardTypes.d.ts +2 -0
  212. package/package.json +2 -2
  213. /package/build/types/diagnostic/{TokenDiagnostic.d.ts → TokenDiagnosticA.d.ts} +0 -0
@@ -9,7 +9,7 @@ import { NamedDeclarationLookupResult, ObjectVariableInfo, SemanticContextLookup
9
9
  import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
10
10
  import { SemanticContextWithParent } from './SemanticContextWithParent.js';
11
11
  import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
12
- export type TypeDeclarationCreatingSemanticContext = tree.StructuredTypeDeclaration | tree.VariantTypeDeclaration | tree.FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageReducedTypeDeclaration;
12
+ export type TypeDeclarationCreatingSemanticContext = Exclude<tree.TypeDeclaration, tree.TypeParameterDeclaration>;
13
13
  /**
14
14
  * Завершающий семантический контекст типа.
15
15
  * Поскольку контекст с параметрами типа является опциональным, необходим
@@ -32,9 +32,9 @@ export declare class OutermostSemanticContextOfType extends SemanticContextWithP
32
32
  getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
33
33
  getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
34
34
  getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupResult: SemanticContextLookupState): void;
35
- private getContainingType;
35
+ private getTypeEntity;
36
36
  }
37
- type TypeDeclarationWithTypeParameters = tree.TypeDeclaration & tree.TypeParameterClauseParent;
37
+ export type TypeDeclarationWithTypeParameters = tree.TypeDeclaration & tree.TypeParameterClauseParent;
38
38
  export declare class TypeParametersOfTypeSemanticContext extends SemanticContextValidatingNameConflictsBase {
39
39
  readonly kind = "type-parameter-of-type";
40
40
  readonly outer: OutermostSemanticContextOfType;
@@ -45,7 +45,7 @@ export declare class TypeParametersOfTypeSemanticContext extends SemanticContext
45
45
  protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
46
46
  protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
47
47
  }
48
- declare abstract class TypeOrExtensionBodySemanticContext extends SemanticContextWithParent {
48
+ declare abstract class TypeOrExtensionSemanticContextBase extends SemanticContextWithParent {
49
49
  protected abstract memberLookup: TypeMemberLookupA;
50
50
  getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
51
51
  getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
@@ -53,22 +53,21 @@ declare abstract class TypeOrExtensionBodySemanticContext extends SemanticContex
53
53
  getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
54
54
  private convertNamedMember;
55
55
  }
56
- export type SemanticContextContainingTypeMember = TypeBodySemanticContext | TypeExtensionBodySemanticContext;
57
- export type TypeBodySemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
58
- export type TypeDeclarationWithMemberBlock = tree.StructuredTypeDeclaration | tree.PackageReducedTypeDeclaration | tree.PackageVariantDeclaration | tree.PackageAliasTypeDeclaration;
59
- export declare class TypeBodySemanticContext extends TypeOrExtensionBodySemanticContext {
60
- readonly kind = "type-body";
61
- readonly outer: TypeBodySemanticContextParent;
56
+ export type TypeOrExtensionMembersSemanticContext = TypeMembersSemanticContext | TypeExtensionMembersSemanticContext;
57
+ export type TypeMembersSemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
58
+ export declare class TypeMembersSemanticContext extends TypeOrExtensionSemanticContextBase {
59
+ readonly kind = "type-members";
60
+ readonly outer: TypeMembersSemanticContextParent;
62
61
  protected readonly asContext: SemanticContext;
63
62
  private readonly analyzer;
64
63
  private readonly node;
65
64
  private readonly memberLookup_;
66
65
  protected get memberLookup(): TypeMemberLookupA;
67
- constructor(analyzer: Analyzer, node: TypeDeclarationWithMemberBlock, outer: TypeBodySemanticContextParent);
66
+ constructor(analyzer: Analyzer, node: tree.TypeWithMembersDeclaration, outer: TypeMembersSemanticContextParent);
68
67
  private getTypeEntity;
69
68
  }
70
- export declare class TypeExtensionBodySemanticContext extends TypeOrExtensionBodySemanticContext {
71
- readonly kind = "type-extension-body";
69
+ export declare class TypeExtensionMembersSemanticContext extends TypeOrExtensionSemanticContextBase {
70
+ readonly kind = "type-extension";
72
71
  readonly outer: SourceFileSemanticContext;
73
72
  protected readonly asContext: SemanticContext;
74
73
  private readonly analyzer;
@@ -80,6 +79,7 @@ export declare class TypeExtensionBodySemanticContext extends TypeOrExtensionBod
80
79
  getContainingTypeOrTypeExtension(): TypeOrTypeExtension;
81
80
  getObjectVariableInfo(): ObjectVariableInfo | undefined;
82
81
  getTypeMemberLookupContext(): TypeMemberLookupContext;
82
+ private getTypeExtensionEntity;
83
83
  }
84
84
  export type ParameterOfFunctionTypeSemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
85
85
  export declare class ParametersOfFunctionTypeSemanticContext extends SemanticContextValidatingNameConflictsBase {
@@ -1,10 +1,434 @@
1
- import { Analyzer as AnalyzerA } from '../a/Analyzer.js';
1
+ import { Name, PackageLocale, Query, TaskController } from '../../common/index.js';
2
+ import { Diagnostic, DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
3
+ import { WithDiagnostics } from '../../diagnostic/WithDiagnostics.js';
4
+ import { BinaryOperatorKind } from '../../entities/OperatorKind.js';
5
+ import * as tags from '../../entities/Tag.js';
6
+ import * as e from '../../entities/index.js';
7
+ import * as se from '../../entities/source/m/index.js';
8
+ import * as project from '../../project/index.js';
9
+ import * as tree from '../../tree/m/index.js';
10
+ import * as types from '../../types/index.js';
11
+ import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
2
12
  import { Analyzer as BaseAnalyzer, CommonAnalyzerState } from '../Analyzer.js';
13
+ import { DeclarationsUsageMap } from '../DeclarationsUsageMap.js';
14
+ import { ImportedPackageNameTree, PackageImportInfo, PackageNameTreeNode } from '../ImportedPackageNameTree.js';
15
+ import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
16
+ import { Analyzer as AnalyzerA } from '../a/Analyzer.js';
17
+ import { ArgumentToParameterMatchResult, MatchResultParameter } from './ArgumentToParameterMatchResult.js';
18
+ import * as baseExpressionMeaning from './BaseExpressionMeaning.js';
19
+ import * as callExpressionMeaning from './CallExpressionMeaning.js';
20
+ import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
21
+ import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
22
+ import * as identifierExpressionResolution from './IdentifierExpressionMeaning.js';
23
+ import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeaning.js';
24
+ import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
25
+ import { ModifierFlags } from './ModifierFlags.js';
26
+ import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
27
+ import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
28
+ import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
29
+ import { ReachabilityChecker } from './ReachabilityChecker.js';
30
+ import { ReductionSourceMemberFinder } from './ReductionSourceMemberFinder.js';
31
+ import { ReservedNameKind } from './ReservedNameDictionary.js';
32
+ import * as staticDeclarationMeaning from './StaticDeclarationMeaning.js';
33
+ import { SyntacticAccessKind } from './SyntacticAccessKind.js';
34
+ import * as tagMeaning from './TagMeaning.js';
35
+ import * as controlFlow from './control-flow/index.js';
36
+ import * as semanticContext from './semantic-context/index.js';
3
37
  /**
4
38
  * Анализатор диалекта М.
5
39
  */
6
40
  export declare class Analyzer extends BaseAnalyzer {
7
41
  readonly dialectA: AnalyzerA;
42
+ readonly type: Type;
43
+ readonly returnType: ReturnType;
44
+ readonly entity: Entity;
45
+ readonly semanticContext: semanticContext.SemanticContextBuilder;
46
+ readonly argumentToParameterMatchResult: ArgumentToParameterMatchResult;
47
+ readonly tags: Tags;
48
+ readonly packageImports: PackageImports;
49
+ readonly reachabilityChecker: ReachabilityChecker;
50
+ readonly reductionSourceMemberFinder: ReductionSourceMemberFinder;
51
+ readonly localTypes: LocalTypes;
52
+ readonly staticDeclarations: StaticDeclarations;
8
53
  get dialectM(): Analyzer;
54
+ private readonly targetType;
55
+ private readonly memberAccessExpressionResolutionResults;
56
+ private readonly memberAccessExpressionResolutionResultsFirstStage;
57
+ private readonly callExpressionResolutionResults;
58
+ private readonly indexedAccessExpressionResolutionResults;
59
+ private readonly dereferenceExpressionMeanings;
60
+ private readonly identifierExpressionResolutionResults;
61
+ private readonly identifierExpressionResolutionResultsFirstStage;
62
+ private readonly tagResolutionResults;
63
+ private readonly objectExpressionResolutionResults;
64
+ private readonly baseExpressionResolutionResults;
65
+ private readonly namedTypeSpecifierResolutionResults;
66
+ private readonly prefixUnaryExpressionOperatorResolutionResults;
67
+ private readonly binaryExpressionUserDefinableOperatorResolutionResults;
68
+ private readonly assignmentStatementOperatorResolutionResults;
69
+ private resolvedLocalizableTexts;
70
+ private readonly isFunctionGeneratorCheckResults;
71
+ private readonly namedDeclarationsUsageCountResults;
72
+ private readonly packageAndStaticVariablesInitializationDiagnostics;
73
+ private readonly controlFlowGraphs;
74
+ private readonly sourcePackageMemberConflictsDiagnostics;
75
+ private readonly ownAndBaseConstructorCallsCheckResults;
76
+ private readonly expressionCanBeUsedInForLoopCheckResults;
77
+ private readonly nameByIdentifierText;
78
+ private readonly packageTypeMemberConflictsDiagnostics;
79
+ private readonly valueParameterEntities;
9
80
  constructor(state: CommonAnalyzerState, analyzerA: AnalyzerA);
81
+ getProjectSourceFileM(node: tree.SourceFile): project.SourceFileM;
82
+ checkExpressionCanBeUsedInForLoop(node: tree.Expression): WithDiagnostics<ExpressionCanBeUsedInForLoopCheckResult>;
83
+ expressionCanBeReferenced(node: tree.Expression): boolean;
84
+ checkBlockCallsAsyncMethods(node: tree.StatementBlock | tree.FunctionBlock): boolean;
85
+ getSyntacticAccessKind(node: tree.Expression): SyntacticAccessKind;
86
+ getEntityContainingTypeMemberDeclaration(node: tree.TypeMemberDeclaration): e.TypeWithMembersOrExtensionEntity;
87
+ getTargetTypeOfExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type | undefined;
88
+ resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.MeaningStage1;
89
+ resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.Meaning;
90
+ resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.Meaning;
91
+ getRespectiveParameter(node: tree.Argument): MatchResultParameter | undefined;
92
+ resolveIndexedAccessExpression(node: tree.IndexedAccessExpression): indexedAccessExpressionMeaning.Meaning;
93
+ resolveDereferenceExpression(node: tree.DereferenceExpression): dereferenceExpressionMeaning.Meaning;
94
+ resolveIdentifierExpressionFirstStage(node: tree.IdentifierExpression): identifierExpressionResolution.MeaningStage1;
95
+ resolveIdentifierExpression(node: tree.IdentifierExpression, analysisOptions?: ExpressionAnalysisOptions): identifierExpressionResolution.Meaning;
96
+ resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
97
+ resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.Meaning;
98
+ resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.Meaning;
99
+ /**
100
+ * Проверяет, является ли выражение цепочкой доступов через `?`, заканчивающейся выражением, тип которого допускает
101
+ * `пусто`.
102
+ *
103
+ * Пример:
104
+ * ```artel
105
+ * а?.б
106
+ * а?[1]
107
+ * а?^
108
+ * а?()
109
+ * (а)?.б
110
+ * а?.б<Тип>()
111
+ * ```
112
+ *
113
+ * где тип переменной `а` допускает `пусто`.
114
+ */
115
+ isExpressionValidOptionalChaining(node: tree.Expression): boolean;
116
+ /**
117
+ * Проверяет, является ли выражение цепочкой доступов через `?`.
118
+ *
119
+ * Пример:
120
+ * ```artel
121
+ * а?.б
122
+ * а?[1]
123
+ * а?^
124
+ * а?()
125
+ * а?.б
126
+ * а?.б<Тип>()
127
+ * ```
128
+ */
129
+ isExpressionOptionalChainingSyntactically(node: tree.Expression): boolean;
130
+ isExpressionValidOutermostOptionalChaining(node: tree.Expression): boolean;
131
+ includeNullToTypeIfExpressionValidOutermostOptionalChaining(type: types.Type, node: tree.Expression): types.Type;
132
+ checkIdentifierNameIsReserved(name: Name, locale: PackageLocale): ReservedNameKind | undefined;
133
+ getReservedName(reservedNameKind: ReservedNameKind, locale: PackageLocale): Name;
134
+ createNameFromIdentifier(node: tree.Identifier): Name;
135
+ resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
136
+ getDenotedType(expression: tree.Expression): types.Type | undefined;
137
+ isExpressionDenotingType(expression: tree.Expression): boolean;
138
+ getDenotedPackageAlias(expression: tree.Expression): e.PackageAliasEntity | undefined;
139
+ getDenotedFunction(expression: tree.Expression): ExpressionDenotesFunctionCheckResult | undefined;
140
+ isExpressionDenotingFunction(expression: tree.Expression): boolean;
141
+ getDenotedPackageNameTreeNode(expression: tree.Expression): PackageNameTreeNode | undefined;
142
+ /**
143
+ * Функция считается генератором, если:
144
+ * - Использует команду `выдать`.
145
+ * - Не использует команду `выдать`, но её возвращаемым типом является `Перебираемый` или `Перебор`, она не
146
+ * возвращает значение и не использует переменную `результат` (использование команды `вернуть` без указания
147
+ * возвращаемого значения допустимо). В таком случае это генератор, не возвращающий ни одного элемента.
148
+ */
149
+ isFunctionGenerator(node: tree.FunctionDeclaration): boolean;
150
+ resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): types.Method | undefined;
151
+ resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): types.Method | undefined;
152
+ resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): types.Method | undefined;
153
+ classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
154
+ getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
155
+ resolveLocalizableTextOrTextTemplate(node: tree.LocalizableTextLiteral | tree.LocalizableTextTemplateLiteral): e.TextTranslationEntity | undefined;
156
+ createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
157
+ createTypeMemberHiding(node: tree.TypeMemberDeclaration | tree.StaticDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
158
+ getDeclarationsUsageOfSourceFileM(sourceFile: tree.SourceFile, taskController: TaskController): Promise<DeclarationsUsageMap>;
159
+ getPackageAndStaticVariablesInitializationDiagnostics(pkg: project.SourcePackageM, taskController: TaskController): Promise<readonly Diagnostic[]>;
160
+ getPackageTypeMemberConflictsDiagnostics(pkg: project.SourcePackageM): Promise<readonly Diagnostic[]>;
161
+ createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.MethodEntity[];
162
+ createBackingPackageVariables(declaredPackageMembers: readonly e.NamedPackageMemberEntity[], pkg: e.PackageEntity): e.PackageVariableEntity[];
163
+ createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
164
+ getDeclaredTypeMemberEntities(node: tree.TypeWithMembersOrExtensionDeclaration): e.TypeMemberEntity[];
165
+ checkBodyOfBasicAliasTypeMethod(node: tree.MethodDeclaration | tree.StaticMethodDeclaration, diagnostics?: DiagnosticAcceptor): {
166
+ basicMethodOfOriginalType: e.MethodEntity;
167
+ } | undefined;
168
+ getControlFlowGraph(sourceFile: project.SourceFileM): controlFlow.GraphBuildResult;
169
+ validateSourcePackageMemberConflicts(pkg: project.ProgramOrTextTranslationPackage): readonly Diagnostic[];
170
+ determineUnderlyingTypeOfSourceVariantType(memberList: tree.TypeMemberDeclarationList): types.Type;
171
+ getOwnAndBaseConstructorCallsCheckResult(node: tree.TypeWithMembersDeclaration): OwnAndBaseConstructorCallsCheckResult;
172
+ isCallingOwnConstructorCorrectly(node: tree.MethodDeclaration): boolean;
173
+ isOwnOrBaseConstructorCalledCorrectly(node: tree.CallExpression): boolean;
174
+ ifCalleeThenCallExpression(node: tree.Expression): tree.CallExpression | undefined;
175
+ getNodeForAmbiguousAccessDiagnostic(access: tree.Expression): tree.Node;
176
+ isPossibleWrappedTargetTypeDependentFunctionLiteral(node: tree.Expression): boolean;
177
+ isTargetTypeDependentFunctionLiteral(node: tree.Expression): node is tree.RegularOrBlockFunctionLiteral;
178
+ checkTypeArgumentCount(typeArgumentCount: number, typeParameters: readonly e.TypeParameterEntity[], diagnostics?: DiagnosticAcceptor, diagnosticLocation?: NodeOrDiagnosticLocation): boolean;
179
+ checkTypeCanBeUsedAsValue(typeAccess: tree.IdentifierExpression | tree.MemberAccessExpression): boolean;
180
+ checkTypeIsUsedAsValue(typeAccess: tree.IdentifierExpression | tree.MemberAccessExpression): boolean;
181
+ isPossiblyCastedBaseExpression(node: tree.Expression): boolean;
182
+ createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], nodeOrLocation: NodeOrDiagnosticLocation): Diagnostic;
183
+ /**
184
+ * Является ли член типа именованным с точки зрения диалекта М.
185
+ */
186
+ isNamedTypeMemberEntity(entity: e.TypeMemberEntity): entity is e.NamedTypeMemberEntity;
187
+ getValueParameterOfSetterEntity(entity: e.AccessorEntity): e.ParameterEntity | undefined;
188
+ getValueParameterNodeOfSetter(node: tree.PackageVariableSetterDeclaration | tree.StaticFieldSetterDeclaration | tree.FieldSetterDeclaration | tree.IndexedElementSetterDeclaration): tree.ParameterDeclaration | undefined;
189
+ getIndexParametersOfIndexedElementSetter(node: tree.IndexedElementAccessorDeclaration): Query<tree.ParameterDeclaration>;
190
+ }
191
+ export type BinaryExpressionOperatorClassificationResult = {
192
+ kind: 'user-definable';
193
+ operatorKind: BinaryOperatorKind;
194
+ } | {
195
+ kind: 'question-question';
196
+ } | {
197
+ kind: 'equals';
198
+ } | {
199
+ kind: 'not-equals';
200
+ };
201
+ export declare namespace BinaryExpressionOperatorClassificationResult {
202
+ const multiply: BinaryExpressionOperatorClassificationResult;
203
+ const greaterThan: BinaryExpressionOperatorClassificationResult;
204
+ const greaterThanOrEqual: BinaryExpressionOperatorClassificationResult;
205
+ const lessThan: BinaryExpressionOperatorClassificationResult;
206
+ const lessThanOrEqual: BinaryExpressionOperatorClassificationResult;
207
+ const subtract: BinaryExpressionOperatorClassificationResult;
208
+ const add: BinaryExpressionOperatorClassificationResult;
209
+ const divide: BinaryExpressionOperatorClassificationResult;
210
+ const modulo: BinaryExpressionOperatorClassificationResult;
211
+ const and: BinaryExpressionOperatorClassificationResult;
212
+ const or: BinaryExpressionOperatorClassificationResult;
213
+ const equals: BinaryExpressionOperatorClassificationResult;
214
+ const notEquals: BinaryExpressionOperatorClassificationResult;
215
+ const questionQuestion: BinaryExpressionOperatorClassificationResult;
216
+ }
217
+ export declare class ExpressionCanBeUsedInForLoopCheckResult {
218
+ readonly elementType: types.Type;
219
+ readonly ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined;
220
+ constructor(elementType: types.Type, ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined);
221
+ }
222
+ declare class Type {
223
+ private readonly analyzer;
224
+ private readonly unionTypeSpecifierTypes;
225
+ private readonly functionLiteralTypes;
226
+ private readonly nodesForWhichReturnTypeInferenceDiagnosticHasBeenReported;
227
+ private recursionDepth;
228
+ constructor(analyzer: Analyzer);
229
+ ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
230
+ ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
231
+ private ofExpressionWithoutGuard;
232
+ private ofFunctionBlockLiteral;
233
+ private ofFunctionLiteral;
234
+ private ofRegularOrBlockFunctionLiteral;
235
+ private createFunctionTypeOfFunctionEntity;
236
+ private ofArrayLiteral;
237
+ private ofAssumptionExpression;
238
+ private ofBinaryExpression;
239
+ private ofCallExpression;
240
+ private ofIndexedAccessExpression;
241
+ private ofMissingExpression;
242
+ private ofParenthesizedExpression;
243
+ private ofPrefixUnaryExpression;
244
+ private ofMemberAccessExpression;
245
+ private ofReferenceExpression;
246
+ private ofDereferenceExpression;
247
+ private ofConditionalExpression;
248
+ private ofTextLiteral;
249
+ private ofLocalizableTextLiteral;
250
+ /**
251
+ * По умолчанию литерал шаблона текста имеет тип Текст.
252
+ *
253
+ * Литерал шаблона текста имеет тип ТекстШаблонный в следующих случаях:
254
+ * - если он присваивается в переменную, имеющую тип ТекстШаблонный;
255
+ * - если он присваивается в переменную, имеющую множественный тип, содержащий тип ТекстШаблонный
256
+ * и не содержащий тип Текст.
257
+ */
258
+ private ofTextTemplateLiteral;
259
+ /**
260
+ * По умолчанию литерал шаблона текста имеет тип Текст.
261
+ *
262
+ * Литерал переводимого шаблона текста имеет тип ТекстПереводимый в следующих случаях:
263
+ * - если он присваивается в переменную, имеющую тип ТекстПереводимый;
264
+ * - если он присваивается в переменную, имеющую множественный тип, содержащий тип ТекстПереводимый
265
+ * и не содержащий тип Текст.
266
+ */
267
+ private ofLocalizableTextTemplateLiteral;
268
+ private ofIdentifierExpression;
269
+ private ofTokenExpression;
270
+ private ofKeywordExpression;
271
+ private ofObjectExpression;
272
+ private ofBaseExpression;
273
+ private ofGenericSpecializationExpression;
274
+ private ofDefaultMatchExpression;
275
+ private ofLocalTypeSpecifier;
276
+ private ofNamedTypeSpecifier;
277
+ private ofParenthesizedTypeSpecifier;
278
+ private ofNullableTypeSpecifier;
279
+ private ofUnionTypeSpecifier;
280
+ private ofInvalidTypeSpecifier;
281
+ private reportReturnTypeCanNotBeInferredDiagnostic;
282
+ private getNarrowedTypeIfNarrowableReference;
283
+ }
284
+ declare class ReturnType {
285
+ private readonly analyzer;
286
+ constructor(analyzer: Analyzer);
287
+ ofLocalFunctionTypeDeclaration(node: tree.LocalFunctionTypeDeclaration): types.Type;
288
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): types.Type;
289
+ ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): types.Type;
290
+ ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): types.Type;
291
+ ofFunctionLiteral(node: tree.FunctionLiteral): types.Type;
292
+ ofMethodDeclaration(node: tree.MethodDeclaration): types.Type;
293
+ ofStaticMethodDeclaration(node: tree.StaticMethodDeclaration): types.Type;
294
+ ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): types.Type;
295
+ ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): types.Type;
296
+ ofStaticFieldGetterDeclaration(node: tree.StaticFieldGetterDeclaration): types.Type;
297
+ ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): types.Type;
298
+ ofFunctionDeclaration(node: tree.FunctionDeclaration): types.Type;
299
+ ofTextTranslationFunctionDeclaration(node: tree.TextTranslationFunctionDeclaration): types.Type;
300
+ }
301
+ declare class Entity {
302
+ private readonly analyzer;
303
+ private readonly programPackageEntities;
304
+ private readonly nameTranslationPackageEntities;
305
+ private readonly textTranslationPackageEntities;
306
+ private readonly packageVariableEntities;
307
+ private readonly fieldEntities;
308
+ private readonly parameterEntities;
309
+ private readonly localVariableEntities;
310
+ private readonly typeParameterEntities;
311
+ private readonly indexerEntities;
312
+ private readonly localFunctionTypeEntities;
313
+ private readonly aliasTypeEntities;
314
+ private readonly packageFunctionEntities;
315
+ private readonly methodEntities;
316
+ private readonly nestedFunctionEntities;
317
+ private readonly packageAliasEntities;
318
+ private readonly textTranslationDeclarationEntities;
319
+ private readonly functionLiteralEntities;
320
+ private readonly functionBlockLiteralEntities;
321
+ private readonly localClassEntities;
322
+ private readonly packageTypeDeclarationEntities;
323
+ constructor(analyzer: Analyzer);
324
+ ofPackage(pkg: project.SourcePackageM): e.PackageEntity;
325
+ ofProgramPackage(pkg: project.ProgramPackageM): e.ProgramPackageEntity;
326
+ ofTranslationPackage(pkg: project.TranslationPackageM): se.SourceNameTranslationPackageEntity;
327
+ ofTextTranslationPackage(pkg: project.TextTranslationPackageM): e.TextTranslationPackageEntity;
328
+ ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
329
+ ofComputedPackageVariableDeclaration(node: tree.PackageVariableAccessorDeclaration): e.PackageVariableEntity;
330
+ ofFieldDeclaration(node: tree.FieldDeclaration): e.FieldEntity;
331
+ ofStaticFieldDeclaration(node: tree.StaticFieldDeclaration): e.FieldEntity;
332
+ ofComputedFieldDeclaration(node: tree.FieldAccessorDeclaration): e.FieldEntity;
333
+ ofComputedStaticFieldDeclaration(node: tree.StaticFieldAccessorDeclaration): e.FieldEntity;
334
+ ofLocalVariableDeclaration(node: tree.LocalVariableDeclaration): e.LocalVariableEntity;
335
+ ofForStatementVariableDeclaration(node: tree.ForStatementVariableDeclaration): e.LocalVariableEntity;
336
+ ofErrorVariableDeclaration(node: tree.ErrorVariableDeclaration): e.LocalVariableEntity;
337
+ ofParameterDeclaration(node: tree.ParameterDeclaration): e.ParameterEntity;
338
+ ofTypeParameterDeclaration(node: tree.TypeParameterDeclaration): e.TypeParameterEntity;
339
+ ofIndexerDeclaration(node: tree.IndexedElementAccessorDeclaration): e.IndexerEntity;
340
+ ofPackageTypeDeclaration(node: tree.PackageTypeDeclaration): e.PackageStructuredTypeEntity | e.PackageVariantTypeEntity | e.TypeExtensionEntity;
341
+ ofLocalStructuredTypeDeclaration(node: tree.LocalStructuredTypeDeclaration): e.LocalStructuredTypeEntity;
342
+ ofLocalFunctionTypeDeclaration(node: tree.LocalFunctionTypeDeclaration): e.AnonymousFunctionTypeEntity;
343
+ ofPackageAliasTypeDeclaration(node: tree.PackageAliasTypeDeclaration): e.AliasTypeEntity;
344
+ ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.PackageFunctionEntity;
345
+ ofMethodDeclaration(node: tree.MethodDeclaration): e.MethodEntity;
346
+ ofStaticMethodDeclaration(node: tree.StaticMethodDeclaration): e.MethodEntity;
347
+ ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.NestedFunctionEntity;
348
+ ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.PackageFunctionEntity;
349
+ ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.MethodEntity;
350
+ ofStaticFieldGetterDeclaration(node: tree.StaticFieldGetterDeclaration): e.MethodEntity;
351
+ ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.MethodEntity;
352
+ ofGetterDeclaration(node: tree.GetterDeclaration): e.AccessorEntity;
353
+ ofPackageVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration): e.PackageFunctionEntity;
354
+ ofFieldSetterDeclaration(node: tree.FieldSetterDeclaration): e.MethodEntity;
355
+ ofStaticFieldSetterDeclaration(node: tree.StaticFieldSetterDeclaration): e.MethodEntity;
356
+ ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.MethodEntity;
357
+ ofSetterDeclaration(node: tree.SetterDeclaration): e.AccessorEntity;
358
+ ofIndexedElementAccessorDeclaration(node: tree.IndexedElementAccessorDeclaration): e.MethodEntity;
359
+ ofVariantValueDeclaration(node: tree.VariantValueDeclaration): e.FieldEntity;
360
+ ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
361
+ ofTypeWithMembersOrExtensionDeclaration(node: tree.TypeWithMembersOrExtensionDeclaration): e.TypeWithMembersOrExtensionEntity;
362
+ ofTranslationTextTemplateParameter(node: tree.TranslationTextTemplateParameter): e.ParameterEntity;
363
+ ofTextTranslationDeclaration(node: tree.TextTranslationSource): e.TextTranslationEntity;
364
+ ofFunctionLiteral(node: tree.FunctionLiteral): e.AnonymousFunctionEntity;
365
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.AnonymousFunctionEntity;
366
+ ofRegularOrBlockFunctionLiteral(node: tree.RegularOrBlockFunctionLiteral): e.AnonymousFunctionEntity;
367
+ ofFunctionLiteralInternal(node: tree.FunctionLiteral): se.FunctionLiteralEntity;
368
+ ofFunctionBlockLiteralInternal(node: tree.FunctionBlockLiteral): se.FunctionBlockLiteralEntity;
369
+ ofFunctionLiteralParameterDeclarationInternal(node: tree.ParameterDeclaration, literal: tree.FunctionLiteral): se.FunctionLiteralParameterDeclarationEntity;
370
+ }
371
+ declare class Tags {
372
+ private readonly analyzer;
373
+ private readonly tagsByNodeWithTags;
374
+ constructor(analyzer: Analyzer);
375
+ ofNodeWithTags(node: tree.NodeWithTags): readonly tags.Tag[];
376
+ createModifierFlagsOfNodeWithTags(node: tree.NodeWithTags): ModifierFlags;
377
+ private createTagsOfNodeWithTags;
378
+ private createTagFromNode;
379
+ private argumentToTagArgument;
380
+ }
381
+ declare class PackageImports {
382
+ private readonly analyzer;
383
+ private readonly packagesAvailableForImport;
384
+ private readonly resolvedPackageImports;
385
+ private readonly importedPackages;
386
+ private readonly automaticallyImportedPackages;
387
+ private readonly importedPackageNameTrees;
388
+ constructor(analyzer: Analyzer);
389
+ resolvePackageImports(sourceFile: project.SourceFileM): ReadonlyMap<tree.PackageImport, ResolvedPackageImport>;
390
+ getImportedPackage(node: tree.PackageImport): ResolvedPackageImport | undefined;
391
+ getPackagesAvailableForImport(pkg: project.SourcePackageM): readonly e.PackageEntity[];
392
+ getUniqueImportedPackages(sourceFile: project.SourceFileM): readonly PackageImportInfo[];
393
+ getImportedPackageNameTree(node: tree.SourceFile): ImportedPackageNameTree;
394
+ private getAutomaticallyImportedPackages;
395
+ }
396
+ declare class LocalTypes {
397
+ private readonly analyzer;
398
+ constructor(analyzer: Analyzer);
399
+ collectLocalTypesFromPackageMemberList(result: e.LocalStructuredTypeEntity[], nodes: Iterable<tree.PackageMemberDeclaration> | undefined): void;
400
+ collectLocalTypesFromTypeMemberList(result: e.LocalStructuredTypeEntity[], nodes: Iterable<tree.TypeMemberDeclaration> | undefined): void;
401
+ collectLocalTypesFromStatementList(result: e.LocalStructuredTypeEntity[], nodes: Iterable<tree.Statement> | undefined): void;
402
+ collectLocalTypesInPackageMember(result: e.LocalStructuredTypeEntity[], node: tree.PackageMemberDeclaration | undefined): void;
403
+ collectLocalTypesInTypeMember(result: e.LocalStructuredTypeEntity[], node: tree.TypeMemberDeclaration | undefined): void;
404
+ collectLocalTypesInStatement(result: e.LocalStructuredTypeEntity[], node: tree.Statement | undefined): void;
405
+ collectLocalTypesInExpression(result: e.LocalStructuredTypeEntity[], node: tree.Expression | undefined): void;
406
+ collectLocalTypesInTagOfNodeWithTags(result: e.LocalStructuredTypeEntity[], node: tree.NodeWithTags | undefined): void;
407
+ collectLocalTypesInParameterClause(result: e.LocalStructuredTypeEntity[], node: tree.ParameterListParent | undefined): void;
408
+ collectLocalTypesInTypeParameterClause(result: e.LocalStructuredTypeEntity[], node: tree.TypeParameterClause | undefined): void;
409
+ collectLocalTypesInTypeArgumentClause(result: e.LocalStructuredTypeEntity[], node: tree.TypeArgumentClause | undefined): void;
410
+ collectLocalTypesInArgumentList(result: e.LocalStructuredTypeEntity[], node: tree.ArgumentList | undefined): void;
411
+ collectLocalTypesInVariableInitializer(result: e.LocalStructuredTypeEntity[], node: tree.VariableInitializer | undefined): void;
412
+ collectLocalTypesInTypeSpecifier(result: e.LocalStructuredTypeEntity[], node: tree.TypeSpecifier | undefined): void;
413
+ }
414
+ declare class StaticDeclarations {
415
+ private readonly analyzer;
416
+ private readonly staticDeclarationTypes;
417
+ private readonly staticDeclarationMeanings;
418
+ private readonly staticDeclarationsOfTypeOrExtension;
419
+ constructor(analyzer: Analyzer);
420
+ resolveStaticDeclarationMeaning(node: tree.StaticDeclaration): staticDeclarationMeaning.Meaning;
421
+ getTypeEntityContainingStaticDeclaration(node: tree.StaticDeclaration): e.TypeEntityWithMembers;
422
+ getStaticDeclarationsOfTypeOrExtension(node: tree.TypeWithMembersOrExtensionDeclaration): readonly tree.StaticDeclaration[];
423
+ }
424
+ export declare class ResolvedPackageImport {
425
+ readonly entity: e.PackageEntity | undefined;
426
+ readonly isAliasedImport: e.PackageAliasEntity | undefined;
427
+ constructor(entity: e.PackageEntity | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
428
+ }
429
+ export declare class ExpressionDenotesFunctionCheckResult {
430
+ readonly candidates: readonly NotSubstitutedAccessedFunction[];
431
+ readonly suitableOrSingleFunction: AccessedFunction | undefined;
432
+ constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
10
433
  }
434
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ParameterEntity } from '../../entities/index.js';
2
+ import * as tree from '../../tree/m/index.js';
3
+ import * as types from '../../types/index.js';
4
+ import { Analyzer } from './Analyzer.js';
5
+ export declare class ArgumentToParameterMatchResult {
6
+ private readonly analyzer;
7
+ private readonly matchResults;
8
+ constructor(analyzer: Analyzer);
9
+ ofCallExpression(node: tree.CallExpression): MatchResult | undefined;
10
+ ofTag(node: tree.Tag): MatchResult | undefined;
11
+ ofIndexedAccessExpression(node: tree.IndexedAccessExpression): MatchResult | undefined;
12
+ private convertMatchResult;
13
+ private convertParameter;
14
+ }
15
+ export declare class MatchResult {
16
+ readonly parameterByArgument: ReadonlyMap<tree.Argument, MatchResultParameter>;
17
+ constructor(parameterByArgument: ReadonlyMap<tree.Argument, MatchResultParameter>);
18
+ }
19
+ export declare class MatchResultParameter {
20
+ readonly entity: ParameterEntity;
21
+ readonly type: types.Type;
22
+ constructor(entity: ParameterEntity, type: types.Type);
23
+ }
@@ -0,0 +1,40 @@
1
+ import { Name } from '../../common/index.js';
2
+ import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
3
+ import * as tree from '../../tree/m/index.js';
4
+ import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
5
+ import { Analyzer } from './Analyzer.js';
6
+ export declare class ArgumentToParameterMatcher<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends IArgument> {
7
+ private readonly analyzer;
8
+ private readonly signature;
9
+ private readonly arguments_;
10
+ private readonly diagnostics;
11
+ private readonly unmatchedRequiredParametersDiagnosticLocation;
12
+ constructor(analyzer: Analyzer, signature: TSignature, arguments_: readonly TArgument[], diagnostics: DiagnosticAcceptor | undefined, unmatchedRequiredParametersDiagnosticLocation: NodeOrDiagnosticLocation | undefined);
13
+ match(): MatchResult<TParameter, TArgument>;
14
+ private matchArgumentsToParameters;
15
+ private reportArgumentDiagnostic;
16
+ }
17
+ export declare class MatchResult<TParameter extends ISignatureParameter, TArgument extends IArgument> {
18
+ readonly mapping: ReadonlyMap<TArgument, TParameter>;
19
+ readonly isMatching: boolean;
20
+ constructor(mapping: ReadonlyMap<TArgument, TParameter>, isMatching: boolean);
21
+ }
22
+ export interface ISignature<TParameter extends ISignatureParameter> {
23
+ getParameters(): readonly TParameter[];
24
+ }
25
+ export interface ISignatureParameter {
26
+ getName(): Name | undefined;
27
+ isOptional(): boolean;
28
+ isVariadic(): boolean;
29
+ }
30
+ export interface IArgument {
31
+ readonly name: Name | undefined;
32
+ getDiagnosticLocation(): NodeOrDiagnosticLocation | undefined;
33
+ }
34
+ export declare class SourceArgument implements IArgument {
35
+ private readonly analyzer;
36
+ readonly node: tree.Argument;
37
+ readonly name: Name | undefined;
38
+ constructor(analyzer: Analyzer, node: tree.Argument);
39
+ getDiagnosticLocation(): NodeOrDiagnosticLocation;
40
+ }
@@ -0,0 +1,25 @@
1
+ import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
2
+ import * as tree from '../../tree/m/index.js';
3
+ import * as types from '../../types/index.js';
4
+ import { Analyzer } from './Analyzer.js';
5
+ export declare class Resolver {
6
+ private readonly analyzer;
7
+ private readonly node;
8
+ private readonly diagnostics;
9
+ constructor(analyzer: Analyzer, node: tree.BaseExpression, diagnostics: DiagnosticAcceptor | undefined);
10
+ resolve(): Meaning;
11
+ private resolveBaseObjectAccess;
12
+ private invalidContextDiagnostic;
13
+ private staticContextDiagnostic;
14
+ private getBaseOrAliasedType;
15
+ }
16
+ export type Meaning = Meaning_baseObjectAccess | Meaning_unresolved;
17
+ declare class Meaning_baseObjectAccess {
18
+ readonly type: types.Type;
19
+ readonly kind = "base-object-access";
20
+ constructor(type: types.Type);
21
+ }
22
+ declare class Meaning_unresolved {
23
+ readonly kind = "unresolved";
24
+ }
25
+ export {};