@artel/artc 0.6.25244 → 0.6.25246

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 (136) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +36 -22
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +651 -1065
  5. package/build/{chunk-V7EU2U6Y.js → chunk-BGCXIMTW.js} +2 -2
  6. package/build/{chunk-C7RKXERX.js → chunk-CNAUD5P6.js} +1 -1
  7. package/build/{chunk-BAAUJYMH.js → chunk-RIWU6SF4.js} +24430 -21532
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +49 -81
  9. package/build/types/analysis/Analyzer.d.ts +82 -91
  10. package/build/types/analysis/ArgumentToParameterMatchResult.d.ts +8 -10
  11. package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +3 -4
  12. package/build/types/analysis/BaseExpressionMeaning.d.ts +12 -8
  13. package/build/types/analysis/BaseMemberConflictsValidator.d.ts +8 -10
  14. package/build/types/analysis/CallExpressionMeaning.d.ts +8 -9
  15. package/build/types/analysis/ConstructorOverloadResolver.d.ts +4 -7
  16. package/build/types/analysis/DeclarationsUsageCounter.d.ts +1 -2
  17. package/build/types/analysis/DereferenceExpressionMeaning.d.ts +2 -3
  18. package/build/types/analysis/DiagnosticArgumentFactory.d.ts +18 -0
  19. package/build/types/analysis/DiagnosticCollector.d.ts +3 -3
  20. package/build/types/analysis/DisplayableEntity.d.ts +46 -0
  21. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +19 -20
  22. package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -7
  23. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +7 -8
  24. package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +18 -0
  25. package/build/types/analysis/Localization.d.ts +19 -25
  26. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +32 -34
  27. package/build/types/analysis/NamedTypeResolver.d.ts +7 -10
  28. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -7
  29. package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
  30. package/build/types/analysis/ObjectExpressionMeaning.d.ts +12 -8
  31. package/build/types/analysis/OwnAndBaseConstructorCallsChecker.d.ts +23 -0
  32. package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
  33. package/build/types/analysis/PackageMemberLookup.d.ts +4 -9
  34. package/build/types/analysis/PackageMemberNameConflictsValidator.d.ts +2 -2
  35. package/build/types/analysis/SourceFileMembers.d.ts +3 -3
  36. package/build/types/analysis/TagMeaning.d.ts +19 -22
  37. package/build/types/analysis/Tags.d.ts +1 -1
  38. package/build/types/analysis/TypeMemberConflictsValidator.d.ts +2 -2
  39. package/build/types/analysis/TypeMemberLookup.d.ts +23 -31
  40. package/build/types/analysis/TypeNarrower.d.ts +1 -0
  41. package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -2
  42. package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -2
  43. package/build/types/analysis/WellKnownDeclarations.d.ts +100 -31
  44. package/build/types/analysis/control-flow/NarrowableReference.d.ts +5 -6
  45. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +5 -6
  46. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +13 -14
  47. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +5 -6
  48. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +8 -9
  49. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +5 -6
  50. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +11 -12
  51. package/build/types/api/Api.d.ts +0 -3
  52. package/build/types/common/Displayable.d.ts +13 -0
  53. package/build/types/common/FormatString.d.ts +2 -1
  54. package/build/types/common/HelperPhrases.d.ts +2 -1
  55. package/build/types/common/Name.d.ts +9 -14
  56. package/build/types/common/TreeQuery.d.ts +6 -4
  57. package/build/types/common/WithDiagnostics.d.ts +3 -4
  58. package/build/types/common/index.d.ts +1 -1
  59. package/build/types/diagnostic/DiagnosticCode.d.ts +131 -125
  60. package/build/types/diagnostic/DiagnosticData.d.ts +7 -3
  61. package/build/types/emitter/EntityMap.d.ts +1 -0
  62. package/build/types/emitter/Transformer.d.ts +4 -2
  63. package/build/types/emitter/ir/EmitOptions.d.ts +14 -0
  64. package/build/types/emitter/ir/Nodes.d.ts +41 -25
  65. package/build/types/emitter/ir/types.d.ts +1 -1
  66. package/build/types/entities/AliasTypeEntity.d.ts +9 -41
  67. package/build/types/entities/AliasedType.d.ts +62 -0
  68. package/build/types/entities/BaseEntityHidingMatcher.d.ts +1 -1
  69. package/build/types/entities/ConstructorEntity.d.ts +10 -2
  70. package/build/types/entities/DereferenceOperatorEntity.d.ts +5 -0
  71. package/build/types/entities/DestructorEntity.d.ts +6 -2
  72. package/build/types/entities/EntityHiding.d.ts +1 -1
  73. package/build/types/entities/EntityLocalizationContext.d.ts +53 -0
  74. package/build/types/entities/FunctionEntity.d.ts +20 -0
  75. package/build/types/entities/FunctionTypeEntity.d.ts +15 -4
  76. package/build/types/entities/GetterEntity.d.ts +15 -2
  77. package/build/types/entities/IndexerEntity.d.ts +5 -0
  78. package/build/types/entities/OperatorEntity.d.ts +9 -3
  79. package/build/types/entities/PackageAliasEntity.d.ts +5 -0
  80. package/build/types/entities/PackageEntity.d.ts +8 -3
  81. package/build/types/entities/PackageMembers.d.ts +3 -2
  82. package/build/types/entities/SetterEntity.d.ts +15 -2
  83. package/build/types/entities/StructuredTypeEntity.d.ts +64 -15
  84. package/build/types/entities/TypeEntityMembers.d.ts +2 -5
  85. package/build/types/entities/TypeExtensionEntity.d.ts +9 -5
  86. package/build/types/entities/TypeMemberContainer.d.ts +2 -2
  87. package/build/types/entities/TypeParameterEntity.d.ts +26 -8
  88. package/build/types/entities/VariableEntity.d.ts +41 -1
  89. package/build/types/entities/VariantTypeEntity.d.ts +13 -4
  90. package/build/types/entities/index.d.ts +5 -4
  91. package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +54 -0
  92. package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +25 -0
  93. package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +34 -0
  94. package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +24 -0
  95. package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +75 -0
  96. package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +83 -0
  97. package/build/types/entities/translated/TranslatedGetterEntity.d.ts +25 -0
  98. package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +37 -0
  99. package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +35 -0
  100. package/build/types/entities/translated/TranslatedPackageEntity.d.ts +28 -0
  101. package/build/types/entities/translated/TranslatedSetterEntity.d.ts +22 -0
  102. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +107 -0
  103. package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +28 -0
  104. package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +46 -0
  105. package/build/types/entities/translated/TranslatedVariableEntity.d.ts +97 -0
  106. package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +76 -0
  107. package/build/types/project/FileSystemTree.d.ts +2 -2
  108. package/build/types/project/SourcePackage.d.ts +1 -0
  109. package/build/types/services/DefinitionService.d.ts +0 -1
  110. package/build/types/services/DisplayService.d.ts +39 -134
  111. package/build/types/services/NodeSemanticInfo.d.ts +7 -7
  112. package/build/types/services/ReferencesService.d.ts +5 -3
  113. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +7 -10
  114. package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -3
  115. package/build/types/services/source-generation/SourceGenerationService.d.ts +3 -4
  116. package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +5 -5
  117. package/build/types/services/workspace/CompilationController.d.ts +3 -3
  118. package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +4 -4
  119. package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +4 -4
  120. package/build/types/services/workspace/Workspace.d.ts +3 -3
  121. package/build/types/services/workspace/WorkspaceFiles.d.ts +7 -7
  122. package/build/types/tree/green/Token.d.ts +6 -7
  123. package/build/types/ts-interop/Entities.d.ts +64 -13
  124. package/build/types/ts-interop/TsInteropContext.d.ts +17 -5
  125. package/build/types/ts-interop/TsPackageContents.d.ts +2 -2
  126. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
  127. package/build/types/ts-interop/TsTypeMembersCreator.d.ts +4 -4
  128. package/build/types/types/StandardTypes.d.ts +3 -2
  129. package/build/types/types/Substitutions.d.ts +3 -0
  130. package/build/types/types/Type.d.ts +3 -0
  131. package/package.json +2 -2
  132. package/build/types/analysis/EntityLocalizationHelper.d.ts +0 -17
  133. package/build/types/analysis/FoundDeclaration.d.ts +0 -19
  134. package/build/types/analysis/LocalizationContext.d.ts +0 -15
  135. package/build/types/common/SearchName.d.ts +0 -14
  136. package/build/types/types/Internal.d.ts +0 -1
@@ -1,7 +1,8 @@
1
- import { Analyzer } from '../analysis/index.js';
1
+ import { Analyzer, WellKnownDeclarations } from '../analysis/index.js';
2
2
  import { StructuredType, UnresolvedType } from './index.js';
3
3
  export declare class StandardTypes {
4
4
  private readonly _analyzer;
5
+ private readonly _wellKnownDeclarations;
5
6
  private _refObject;
6
7
  private _plainObject;
7
8
  private _number;
@@ -20,7 +21,7 @@ export declare class StandardTypes {
20
21
  private _task;
21
22
  private _error;
22
23
  private _func;
23
- constructor(_analyzer: Analyzer);
24
+ constructor(_analyzer: Analyzer, _wellKnownDeclarations: WellKnownDeclarations);
24
25
  get refObject(): StructuredType;
25
26
  get plainObject(): StructuredType;
26
27
  get number(): StructuredType;
@@ -2,6 +2,9 @@ import { Analyzer } from '../analysis/index.js';
2
2
  import { TypeParameterEntity } from '../entities/index.js';
3
3
  import { Type } from './index.js';
4
4
  export declare class Substitutions {
5
+ /**
6
+ * Ключом `SubstitutionMap` всегда является параметр на языке оригинала.
7
+ */
5
8
  readonly map: SubstitutionMap;
6
9
  private readonly _analyzer;
7
10
  get size(): number;
@@ -11,6 +11,9 @@ export type Type = StructuredType | VariantType | FunctionType | AliasType | Unr
11
11
  export interface IType {
12
12
  getSubstitutions(): Substitutions;
13
13
  applySubstitutions(map: SubstitutionMap): Type;
14
+ /**
15
+ * Сравнивает типы без учёта языка.
16
+ */
14
17
  equals(other: Type): boolean;
15
18
  getEntity(): TypeEntity | undefined;
16
19
  getBaseObjectTypeOrAliasedType(): Type | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25244",
3
+ "version": "0.6.25246",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",
@@ -41,7 +41,7 @@
41
41
  "@babel/types": "7.27.3",
42
42
  "@vscode/l10n": "0.0.18",
43
43
  "jsonc-parser": "3.3.1",
44
- "reactronic": "^0.93.25026",
44
+ "reactronic": "^0.94.25030",
45
45
  "typescript": "5.8.2",
46
46
  "vscode-json-languageservice": "5.4.2",
47
47
  "vscode-languageserver": "9.0.1",
@@ -1,17 +0,0 @@
1
- import { LocalizedSubprogramSignature, LocalizedTypeHeader, TypeEntityWithHeaderLocalization } from '../analysis/AnalyzedTranslationPackage.js';
2
- import { Analyzer } from '../analysis/index.js';
3
- import { Localization } from '../analysis/Localization.js';
4
- import { ConstructorEntity, DestructorEntity, FunctionEntity, FunctionTypeEntity, IndexerEntity, OperatorEntity } from '../entities/index.js';
5
- import * as types from '../types/index.js';
6
- export declare class EntityLocalizationHelper {
7
- static getLocalizedFunctionSignature(func: FunctionEntity, localization: Localization): LocalizedSubprogramSignature;
8
- static getLocalizedOperatorSignature(operator: OperatorEntity, localization: Localization): LocalizedSubprogramSignature;
9
- static getLocalizedFunctionTypeSignature(functionType: FunctionTypeEntity, localization: Localization): LocalizedSubprogramSignature;
10
- static getLocalizedConstructorSignature(constructor: ConstructorEntity, localization: Localization): LocalizedSubprogramSignature;
11
- static getLocalizedDestructorSignature(destructor: DestructorEntity, localization: Localization): LocalizedSubprogramSignature;
12
- static getLocalizedIndexerSignature(indexer: IndexerEntity, localization: Localization): LocalizedSubprogramSignature;
13
- static getLocalizedTypeHeader(type: TypeEntityWithHeaderLocalization, localization: Localization): LocalizedTypeHeader;
14
- static getLocalizedSignatureTypeOfFunction(analyzer: Analyzer, func: FunctionEntity, signatureType: types.FunctionType, localization: Localization): types.FunctionType;
15
- static getLocalizedSignatureTypeOfOperator(analyzer: Analyzer, operator: OperatorEntity, signatureType: types.FunctionType, localization: Localization): types.FunctionType;
16
- static localizeFunctionType(analyzer: Analyzer, type: types.FunctionType, localizedSignature: LocalizedSubprogramSignature): types.FunctionType;
17
- }
@@ -1,19 +0,0 @@
1
- import { PackageLocale, Name } from '../common/index.js';
2
- import { Localization, LocalizedName, Translation, WithLocalization } from './Localization.js';
3
- export declare class FoundNamedDeclaration<T> implements WithLocalization<T> {
4
- readonly value: T;
5
- readonly name: LocalizedName;
6
- readonly requiresExplicitOriginalName: boolean;
7
- get localization(): Localization;
8
- constructor(value: T, name: LocalizedName, requiresExplicitOriginalName: boolean);
9
- static original<T>(value: T, name: Name, locale: PackageLocale, requiresExplicitOriginalName: boolean): FoundNamedDeclaration<T>;
10
- static translated<T>(value: T, localizedName: LocalizedName.Translated): FoundNamedDeclaration<T>;
11
- withValue<T>(value: T): FoundNamedDeclaration<T>;
12
- }
13
- export declare class FoundAnonymousDeclaration<T> implements WithLocalization<T> {
14
- readonly value: T;
15
- readonly localization: Localization;
16
- constructor(value: T, localization: Localization);
17
- static original<T>(value: T, locale: PackageLocale): FoundAnonymousDeclaration<T>;
18
- static translated<T>(value: T, translation: Translation): FoundAnonymousDeclaration<T>;
19
- }
@@ -1,15 +0,0 @@
1
- import { PackageLocale } from '../common/index.js';
2
- import { AliasTypeEntity, FunctionEntity, PackageAliasEntity, PackageEntity, PackageFunctionTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeOrExtensionEntity, TypeParameterEntity, VariableEntity } from '../entities/index.js';
3
- import { AnalyzedTranslationPackage, TranslatedTypeEntityMembers } from './AnalyzedTranslationPackage.js';
4
- import { LocalizedName } from './Localization.js';
5
- export declare class LocalizationContext {
6
- readonly originalLocale: PackageLocale;
7
- private readonly _translationPackageByTranslated;
8
- get translationPackages(): Iterable<AnalyzedTranslationPackage>;
9
- constructor(translationPackages: readonly AnalyzedTranslationPackage[], originalLocale: PackageLocale);
10
- getTranslationPackage(packageEntity: PackageEntity): AnalyzedTranslationPackage | undefined;
11
- getTranslationLocale(packageEntity: PackageEntity): PackageLocale;
12
- getTranslatedTypeOrExtensionEntityMembers(entity: TypeOrExtensionEntity): TranslatedTypeEntityMembers | undefined;
13
- getEntityName(entity: NamedEntity): LocalizedName;
14
- }
15
- export type NamedEntity = VariableEntity | PackageVariantTypeEntity | FunctionEntity | TypeParameterEntity | PackageFunctionTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
@@ -1,14 +0,0 @@
1
- import { Name } from './Name.js';
2
- export declare class SearchName {
3
- readonly value: Name;
4
- /**
5
- * Это имя, допускающее объявления только на языке оригинала? (прим.: ~имя)
6
- */
7
- readonly isStrictlyOriginal: boolean;
8
- constructor(value: Name,
9
- /**
10
- * Это имя, допускающее объявления только на языке оригинала? (прим.: ~имя)
11
- */
12
- isStrictlyOriginal: boolean);
13
- static fromName(name: Name): SearchName;
14
- }
@@ -1 +0,0 @@
1
- export * from './StandardTypes.js';