@artel/artc 0.6.25223 → 0.6.25225

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 (96) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +85 -79
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +797 -674
  5. package/build/{chunk-DZNNWICP.js → chunk-TFTCV5R5.js} +6604 -5875
  6. package/build/{chunk-AX3LQ2CF.js → chunk-UB6LHKS5.js} +3 -3
  7. package/build/{chunk-LG4Z4SWO.js → chunk-Z6TZA6SN.js} +3 -3
  8. package/build/types/analysis/AccessedFunction.d.ts +53 -0
  9. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +16 -15
  10. package/build/types/analysis/Analyzer.d.ts +142 -127
  11. package/build/types/analysis/CallExpressionMeaning.d.ts +10 -10
  12. package/build/types/analysis/DiagnosticCollector.d.ts +17 -17
  13. package/build/types/analysis/EntityLocalizationHelper.d.ts +6 -6
  14. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +10 -10
  15. package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -0
  16. package/build/types/analysis/LocalizationContext.d.ts +2 -2
  17. package/build/types/analysis/{PropertyAccessExpressionMeaning.d.ts → MemberAccessExpressionMeaning.d.ts} +27 -21
  18. package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
  19. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
  20. package/build/types/analysis/NodeTypeUtils.d.ts +13 -13
  21. package/build/types/analysis/OperationOverloadResolver.d.ts +1 -1
  22. package/build/types/analysis/Scope.d.ts +15 -15
  23. package/build/types/analysis/SemanticContext.d.ts +29 -29
  24. package/build/types/analysis/SemanticContextBuilder.d.ts +22 -22
  25. package/build/types/analysis/SourceFileMembers.d.ts +2 -2
  26. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +12 -12
  27. package/build/types/analysis/{SubstitutedMethod.d.ts → SubstitutedFunction.d.ts} +14 -14
  28. package/build/types/analysis/TagMeaning.d.ts +23 -20
  29. package/build/types/analysis/Tags.d.ts +6 -6
  30. package/build/types/analysis/TypeNarrower.d.ts +21 -21
  31. package/build/types/analysis/Utils.d.ts +15 -3
  32. package/build/types/analysis/WellKnownDeclarations.d.ts +4 -4
  33. package/build/types/analysis/control-flow/GraphBuilder.d.ts +43 -0
  34. package/build/types/analysis/{ControlFlowGraphVisualizer.d.ts → control-flow/GraphVisualizer.d.ts} +3 -3
  35. package/build/types/analysis/control-flow/NarrowableExpression.d.ts +5 -0
  36. package/build/types/analysis/control-flow/Nodes.d.ts +91 -0
  37. package/build/types/analysis/control-flow/index.d.ts +4 -0
  38. package/build/types/api/Api.d.ts +3 -3
  39. package/build/types/common/HelperPhrases.d.ts +3 -2
  40. package/build/types/diagnostic/DiagnosticCode.d.ts +130 -131
  41. package/build/types/emitter/EmitPhaseName.d.ts +8 -8
  42. package/build/types/emitter/Emitter.d.ts +4 -4
  43. package/build/types/emitter/EmitterContext.d.ts +2 -2
  44. package/build/types/emitter/Entities.d.ts +31 -29
  45. package/build/types/emitter/EntityMap.d.ts +8 -8
  46. package/build/types/emitter/IrBuilder.d.ts +18 -18
  47. package/build/types/emitter/IrToJs.d.ts +9 -9
  48. package/build/types/emitter/Transformer.d.ts +37 -37
  49. package/build/types/emitter/ir/AccessedEntities.d.ts +5 -5
  50. package/build/types/emitter/ir/ComputedAccess.d.ts +5 -5
  51. package/build/types/emitter/ir/EmitOptions.d.ts +41 -27
  52. package/build/types/emitter/ir/Nodes.d.ts +141 -140
  53. package/build/types/emitter/ir/types.d.ts +8 -8
  54. package/build/types/entities/ConstructorEntity.d.ts +9 -9
  55. package/build/types/entities/DereferenceOperatorEntity.d.ts +4 -4
  56. package/build/types/entities/DestructorEntity.d.ts +4 -4
  57. package/build/types/entities/{MethodEntity.d.ts → FunctionEntity.d.ts} +36 -36
  58. package/build/types/entities/{MethodTypeEntity.d.ts → FunctionTypeEntity.d.ts} +23 -23
  59. package/build/types/entities/GetterEntity.d.ts +9 -9
  60. package/build/types/entities/IndexerEntity.d.ts +4 -4
  61. package/build/types/entities/SetterEntity.d.ts +9 -9
  62. package/build/types/entities/TypeEntity.d.ts +3 -3
  63. package/build/types/entities/TypeEntityMembers.d.ts +3 -3
  64. package/build/types/entities/TypeParameterEntity.d.ts +2 -2
  65. package/build/types/entities/VariableEntity.d.ts +32 -32
  66. package/build/types/entities/index.d.ts +14 -14
  67. package/build/types/services/CompletionService.d.ts +8 -9
  68. package/build/types/services/DisplayService.d.ts +72 -69
  69. package/build/types/services/HoverService.d.ts +1 -1
  70. package/build/types/services/NodeSemanticInfo.d.ts +26 -21
  71. package/build/types/services/SemanticTokensService.d.ts +6 -6
  72. package/build/types/services/SourceFileItemsService.d.ts +11 -11
  73. package/build/types/services/TypeDefinitionService.d.ts +2 -2
  74. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +10 -10
  75. package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -1
  76. package/build/types/services/source-generation/EntityToSyntax.d.ts +10 -9
  77. package/build/types/tree/NodeKind.d.ts +27 -27
  78. package/build/types/tree/green/Nodes.d.ts +127 -128
  79. package/build/types/tree/green/SyntaxFactory.d.ts +20 -19
  80. package/build/types/tree/green/SyntaxToCode.d.ts +23 -21
  81. package/build/types/tree/red/Nodes.d.ts +173 -172
  82. package/build/types/ts-interop/Entities.d.ts +28 -28
  83. package/build/types/ts-interop/TsInteropContext.d.ts +2 -1
  84. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
  85. package/build/types/ts-interop/TsTypeMembersCreator.d.ts +1 -1
  86. package/build/types/types/{MethodType.d.ts → FunctionType.d.ts} +6 -6
  87. package/build/types/types/IntersectionType.d.ts +20 -0
  88. package/build/types/types/ParameterType.d.ts +6 -3
  89. package/build/types/types/StandardTypes.d.ts +2 -2
  90. package/build/types/types/Type.d.ts +3 -2
  91. package/build/types/types/TypeFactory.d.ts +8 -6
  92. package/build/types/types/TypeMembers.d.ts +8 -8
  93. package/build/types/types/index.d.ts +2 -1
  94. package/package.json +1 -1
  95. package/build/types/analysis/AccessedMethod.d.ts +0 -53
  96. package/build/types/analysis/ControlFlowGraphBuilder.d.ts +0 -129
@@ -1,13 +1,13 @@
1
1
  import * as tree from '../tree/index.js';
2
2
  import { Analyzer } from './Analyzer.js';
3
- import { MethodDeclaration } from './NodeTypeUtils.js';
4
- import { RegularOrBlockMethodLiteral, SemanticContext, TypeDeclarationBody, TypeDeclarationCreatingSemanticContext } from './SemanticContext.js';
3
+ import { FunctionDeclaration } from './NodeTypeUtils.js';
4
+ import { RegularOrBlockFunctionLiteral, SemanticContext, TypeDeclarationBody, TypeDeclarationCreatingSemanticContext } from './SemanticContext.js';
5
5
  export declare class SemanticContextBuilder {
6
6
  private readonly _analyzer;
7
7
  private readonly _semanticContexts;
8
- private readonly _methodDeclarationTypeParametersContexts;
9
- private readonly _methodDeclarationValueParametersContexts;
10
- private readonly _indexerParametersContexts;
8
+ private readonly _functionDeclarationTypeParametersContexts;
9
+ private readonly _functionDeclarationValueParametersContexts;
10
+ private readonly _indexParametersContexts;
11
11
  constructor(analyzer: Analyzer);
12
12
  /**
13
13
  * Возвращает контекст, содержащий узел. Если в качестве узла передан исходный файл,
@@ -17,9 +17,9 @@ export declare class SemanticContextBuilder {
17
17
  containingWithOffset(node: tree.Node, offset: number): SemanticContext;
18
18
  ofSourceFile(node: tree.SourceFile): SemanticContext;
19
19
  /**
20
- * Контекст заголовка метода. Включает параметры-типы и параметры-значения (в зависимости от указанного `hint`).
20
+ * Контекст заголовка функции. Включает параметры-типы и параметры-значения (в зависимости от указанного `hint`).
21
21
  */
22
- ofMethodDeclarationHeader(node: MethodDeclaration, hint: 'type-parameters' | 'value-parameters'): SemanticContext;
22
+ ofFunctionDeclarationHeader(node: FunctionDeclaration, hint: 'type-parameters' | 'value-parameters'): SemanticContext;
23
23
  ofOperatorDeclaration(node: tree.OperatorDeclaration): SemanticContext;
24
24
  ofTypeDeclarationBody(node: TypeDeclarationBody): SemanticContext;
25
25
  /**
@@ -27,31 +27,31 @@ export declare class SemanticContextBuilder {
27
27
  */
28
28
  ofTypeDeclarationHeader(node: TypeDeclarationCreatingSemanticContext): SemanticContext;
29
29
  ofTypeExtensionDeclarationBody(node: tree.TypeExtensionDeclaration): SemanticContext;
30
- ofVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration | tree.TypeVariableGetterDeclaration | tree.TypeDereferencedVariableGetterDeclaration): SemanticContext;
31
- ofVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration | tree.TypeVariableSetterDeclaration | tree.TypeDereferencedVariableSetterDeclaration): SemanticContext;
30
+ ofVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration | tree.FieldGetterDeclaration | tree.DereferencedVariableGetterDeclaration): SemanticContext;
31
+ ofVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration | tree.FieldSetterDeclaration | tree.DereferencedVariableSetterDeclaration): SemanticContext;
32
32
  ofPackageConstructorDeclaration(node: tree.PackageConstructorDeclaration): SemanticContext;
33
33
  ofPackageEntryPointDeclaration(node: tree.PackageEntryPointDeclaration): SemanticContext;
34
- ofRegularOrBlockMethodLiteral(node: RegularOrBlockMethodLiteral): SemanticContext;
34
+ ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): SemanticContext;
35
35
  ofForStatement(node: tree.ForStatement): SemanticContext;
36
36
  ofStatementBlock(node: tree.StatementBlock): SemanticContext;
37
37
  ofFunctionBlock(node: tree.FunctionBlock): SemanticContext;
38
- ofTypeConstructorDeclaration(node: tree.TypeConstructorDeclaration): SemanticContext;
39
- ofTypeDestructorDeclaration(node: tree.TypeDestructorDeclaration): SemanticContext;
40
- ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
41
- ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
38
+ ofConstructorDeclaration(node: tree.ConstructorDeclaration): SemanticContext;
39
+ ofDestructorDeclaration(node: tree.DestructorDeclaration): SemanticContext;
40
+ ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
41
+ ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
42
42
  ofCatchClause(node: tree.CatchClause): SemanticContext;
43
- ofTypeVariableDeclarationWithInitializer(node: tree.TypeVariableDeclaration): SemanticContext;
43
+ ofFieldDeclarationWithInitializer(node: tree.FieldDeclaration): SemanticContext;
44
44
  private containingInternal;
45
- private ofChildOfMethodDeclaration;
45
+ private ofChildOfFunctionDeclaration;
46
46
  private ofChildOfTypeDeclarationWithMemberBlock;
47
47
  private ofChildOfTypeDeclarationBodyWithMemberBlock;
48
- private ofChildOfMethodTypeDeclarationBody;
49
- private ofChildOfMethodLiteral;
48
+ private ofChildOfFunctionTypeDeclarationBody;
49
+ private ofChildOfFunctionLiteral;
50
50
  private ofOperatorDeclarationChild;
51
- private ofTypeConstructorDeclarationChild;
52
- private ofTypeDestructorDeclarationChild;
53
- private ofTypeIndexedGetterDeclarationChild;
54
- private ofTypeIndexedSetterDeclarationChild;
51
+ private ofConstructorDeclarationChild;
52
+ private ofDestructorDeclarationChild;
53
+ private ofIndexedElementGetterDeclarationChild;
54
+ private ofIndexedElementSetterDeclarationChild;
55
55
  private ofChildOfTypeExtensionDeclaration;
56
56
  private isOffsetBetweenNodes;
57
57
  private isOffsetInsideStatementBlock;
@@ -1,5 +1,5 @@
1
1
  import { SearchName } from '../common/index.js';
2
- import { PackageAliasEntity, PackageMethodEntity, PackageTypeEntity, PackageVariableEntity, TypeExtensionEntity } from '../entities/index.js';
2
+ import { PackageAliasEntity, PackageFunctionEntity, PackageTypeEntity, PackageVariableEntity, TypeExtensionEntity } from '../entities/index.js';
3
3
  export declare class SourceFileMembers {
4
4
  private readonly _namedMembers;
5
5
  private readonly _typeExtensions;
@@ -12,4 +12,4 @@ export declare class SourceFileMembers {
12
12
  getPackageAliasesByName(name: SearchName): readonly PackageAliasEntity[];
13
13
  getTypeExtensions(): readonly TypeExtensionEntity[];
14
14
  }
15
- export type NamedSourceFileMemberEntity = PackageTypeEntity | PackageVariableEntity | PackageMethodEntity | PackageAliasEntity;
15
+ export type NamedSourceFileMemberEntity = PackageTypeEntity | PackageVariableEntity | PackageFunctionEntity | PackageAliasEntity;
@@ -6,20 +6,20 @@ export declare class StatementBlockScopeBuilder {
6
6
  static buildStatementBlockScope(analyzer: Analyzer, node: tree.StatementBlock): IScope;
7
7
  static buildGenericScopeForFunctionBlock(analyzer: Analyzer, node: tree.FunctionBlock): IScope;
8
8
  static buildGenericScopeForStatementBlock(analyzer: Analyzer, node: tree.StatementBlock): IScope;
9
- static buildScopeForMethodBlockLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.MethodBlockLiteral): IScope;
10
- static buildScopeForPackageMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageMethodDeclaration): IScope;
11
- static buildScopeForTypeVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeVariableGetterDeclaration): IScope;
12
- static buildScopeForTypeVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeVariableSetterDeclaration): IScope;
9
+ static buildScopeForFunctionBlockLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FunctionBlockLiteral): IScope;
10
+ static buildScopeForPackageFunctionDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageFunctionDeclaration): IScope;
11
+ static buildScopeForFieldGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FieldGetterDeclaration): IScope;
12
+ static buildScopeForFieldSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FieldSetterDeclaration): IScope;
13
13
  static buildScopeForPackageVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageVariableGetterDeclaration): IScope;
14
14
  static buildScopeForPackageVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageVariableSetterDeclaration): IScope;
15
- static buildScopeForTypeIndexedGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeIndexedGetterDeclaration): IScope;
16
- static buildScopeForTypeIndexedSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeIndexedSetterDeclaration): IScope;
17
- static buildScopeForTypeDereferencedVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeDereferencedVariableGetterDeclaration): IScope;
18
- static buildScopeForTypeDereferencedVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeDereferencedVariableSetterDeclaration): IScope;
19
- static buildScopeForNestedMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.NestedMethodDeclaration): IScope;
20
- static buildScopeForMethodLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.MethodLiteral): IScope;
21
- static buildScopeForTypeConstructorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeConstructorDeclaration): IScope;
22
- static buildScopeForTypeMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeMethodDeclaration): IScope;
15
+ static buildScopeForIndexedElementGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.IndexedElementGetterDeclaration): IScope;
16
+ static buildScopeForIndexedElementSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.IndexedElementSetterDeclaration): IScope;
17
+ static buildScopeForDereferencedVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.DereferencedVariableGetterDeclaration): IScope;
18
+ static buildScopeForDereferencedVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.DereferencedVariableSetterDeclaration): IScope;
19
+ static buildScopeForNestedFunctionDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.NestedFunctionDeclaration): IScope;
20
+ static buildScopeForFunctionLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FunctionLiteral): IScope;
21
+ static buildScopeForConstructorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.ConstructorDeclaration): IScope;
22
+ static buildScopeForMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.MethodDeclaration): IScope;
23
23
  static buildScopeForOperatorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.OperatorDeclaration): IScope;
24
24
  private static getLocalNamedDeclarationsOfFunctionBlock;
25
25
  private static getLocalNamedDeclarations;
@@ -1,17 +1,17 @@
1
1
  import { Name } from '../common/index.js';
2
- import { MethodEntity, ParameterVariableEntity } from '../entities/index.js';
2
+ import { FunctionEntity, ParameterVariableEntity } from '../entities/index.js';
3
3
  import * as types from '../types/index.js';
4
- export type SubstitutedMethod = SubstitutedMethod_entity | SubstitutedMethod_typeMember;
5
- export declare class SubstitutedMethod_entity implements ISubstitutedMethod {
6
- readonly entity: MethodEntity;
7
- readonly entitySignatureType: types.MethodType;
4
+ export type SubstitutedFunction = SubstitutedFunction_entity | SubstitutedFunction_typeMember;
5
+ export declare class SubstitutedFunction_entity implements ISubstitutedFunction {
6
+ readonly entity: FunctionEntity;
7
+ readonly entitySignatureType: types.FunctionType;
8
8
  readonly substitutions: types.Substitutions;
9
9
  readonly kind = "entity";
10
10
  private readonly _signatureType;
11
- constructor(entity: MethodEntity, entitySignatureType: types.MethodType, substitutions: types.Substitutions);
12
- getEntity(): MethodEntity;
11
+ constructor(entity: FunctionEntity, entitySignatureType: types.FunctionType, substitutions: types.Substitutions);
12
+ getEntity(): FunctionEntity;
13
13
  getName(): Name;
14
- getSignatureType(): types.MethodType;
14
+ getSignatureType(): types.FunctionType;
15
15
  getSubstitutions(): types.Substitutions;
16
16
  getValueParameters(): readonly {
17
17
  entity: ParameterVariableEntity;
@@ -19,15 +19,15 @@ export declare class SubstitutedMethod_entity implements ISubstitutedMethod {
19
19
  }[];
20
20
  isAsync(): boolean;
21
21
  }
22
- export declare class SubstitutedMethod_typeMember implements ISubstitutedMethod {
22
+ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunction {
23
23
  readonly method: types.Method;
24
24
  readonly substitutions: types.Substitutions;
25
25
  readonly kind = "type-member";
26
26
  private readonly _signatureType;
27
27
  constructor(method: types.Method, substitutions: types.Substitutions);
28
- getEntity(): MethodEntity;
28
+ getEntity(): FunctionEntity;
29
29
  getName(): Name;
30
- getSignatureType(): types.MethodType;
30
+ getSignatureType(): types.FunctionType;
31
31
  getSubstitutions(): types.Substitutions;
32
32
  getValueParameters(): readonly {
33
33
  entity: ParameterVariableEntity;
@@ -35,10 +35,10 @@ export declare class SubstitutedMethod_typeMember implements ISubstitutedMethod
35
35
  }[];
36
36
  isAsync(): boolean;
37
37
  }
38
- interface ISubstitutedMethod {
39
- getEntity(): MethodEntity;
38
+ interface ISubstitutedFunction {
39
+ getEntity(): FunctionEntity;
40
40
  getName(): Name;
41
- getSignatureType(): types.MethodType;
41
+ getSignatureType(): types.FunctionType;
42
42
  getSubstitutions(): types.Substitutions;
43
43
  getValueParameters(): readonly {
44
44
  entity: ParameterVariableEntity;
@@ -1,11 +1,13 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
- import { MethodEntity, NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
2
+ import { FunctionEntity, NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
3
3
  import { Tag } from '../tree/index.js';
4
4
  import * as types from '../types/index.js';
5
- import { AccessedMethod } from './AccessedMethod.js';
5
+ import { AccessedFunction } from './AccessedFunction.js';
6
6
  import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
7
7
  import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
8
8
  import { Analyzer } from './index.js';
9
+ import { WithLocalization } from './Localization.js';
10
+ import { EntityOrPackageNameTreeNode } from './Utils.js';
9
11
  export declare class Resolver {
10
12
  private readonly _analyzer;
11
13
  private readonly _node;
@@ -17,17 +19,18 @@ export declare class Resolver {
17
19
  private resolveNameInPackage;
18
20
  private resolveTypeOverload;
19
21
  private resolveTagType;
20
- private resolveTagMethod;
21
- private createAccessedMethod;
22
- private resolveMethodOverload;
22
+ private resolveTagFunction;
23
+ private createAccessedFunction;
24
+ private resolveFunctionOverload;
23
25
  }
24
26
  export declare class ResolutionResult {
25
27
  readonly meaning: Meaning;
26
28
  readonly resolvedQualifiers: readonly ResolvedQualifier[];
27
29
  readonly diagnostic?: Diagnostic | undefined;
28
- constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostic?: Diagnostic | undefined);
30
+ readonly ambiguousDeclarations?: readonly WithLocalization<EntityOrPackageNameTreeNode>[] | undefined;
31
+ constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostic?: Diagnostic | undefined, ambiguousDeclarations?: readonly WithLocalization<EntityOrPackageNameTreeNode>[] | undefined);
29
32
  }
30
- export type Meaning = Meaning_tagType | Meaning_tagMethod | Meaning_unresolved;
33
+ export type Meaning = Meaning_tagType | Meaning_tagFunction | Meaning_unresolved;
31
34
  declare class Meaning_tagType {
32
35
  readonly type: types.Type;
33
36
  readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
@@ -36,17 +39,17 @@ declare class Meaning_tagType {
36
39
  get singleSuitableConstructor(): FoundAnonymousDeclaration<types.Constructor> | undefined;
37
40
  constructor(type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
38
41
  }
39
- declare class Meaning_tagMethod {
40
- readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
41
- readonly suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[];
42
- readonly kind = "tag-method";
43
- get singleSuitableMethod(): FoundNamedDeclaration<AccessedMethod> | undefined;
44
- constructor(candidates: readonly FoundNamedDeclaration<AccessedMethod>[], suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[]);
42
+ declare class Meaning_tagFunction {
43
+ readonly candidates: readonly FoundNamedDeclaration<AccessedFunction>[];
44
+ readonly suitableFunctions: readonly FoundNamedDeclaration<AccessedFunction>[];
45
+ readonly kind = "tag-function";
46
+ get singleSuitableFunction(): FoundNamedDeclaration<AccessedFunction> | undefined;
47
+ constructor(candidates: readonly FoundNamedDeclaration<AccessedFunction>[], suitableFunctions: readonly FoundNamedDeclaration<AccessedFunction>[]);
45
48
  }
46
49
  declare class Meaning_unresolved {
47
50
  readonly kind = "unresolved";
48
51
  }
49
- export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type | ResolvedQualifier_method;
52
+ export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type | ResolvedQualifier_function;
50
53
  export declare class ResolvedQualifier_packageNameSegment {
51
54
  readonly packageTreeNode: PackageNameTreeNode;
52
55
  readonly kind = "package-name-segment";
@@ -64,11 +67,11 @@ export declare class ResolvedQualifier_type {
64
67
  get singleSuitableType(): FoundNamedDeclaration<NamedTypeEntity> | undefined;
65
68
  constructor(candidates: readonly FoundNamedDeclaration<NamedTypeEntity>[], suitableTypes: readonly FoundNamedDeclaration<NamedTypeEntity>[]);
66
69
  }
67
- export declare class ResolvedQualifier_method {
68
- readonly candidates: readonly FoundNamedDeclaration<MethodEntity>[];
69
- readonly suitableMethods: readonly FoundNamedDeclaration<MethodEntity>[];
70
- readonly kind = "method";
71
- get singleSuitableMethod(): FoundNamedDeclaration<MethodEntity> | undefined;
72
- constructor(candidates: readonly FoundNamedDeclaration<MethodEntity>[], suitableMethods: readonly FoundNamedDeclaration<MethodEntity>[]);
70
+ export declare class ResolvedQualifier_function {
71
+ readonly candidates: readonly FoundNamedDeclaration<FunctionEntity>[];
72
+ readonly suitableFunctions: readonly FoundNamedDeclaration<FunctionEntity>[];
73
+ readonly kind = "function";
74
+ get singleSuitableFunction(): FoundNamedDeclaration<FunctionEntity> | undefined;
75
+ constructor(candidates: readonly FoundNamedDeclaration<FunctionEntity>[], suitableFunctions: readonly FoundNamedDeclaration<FunctionEntity>[]);
73
76
  }
74
77
  export {};
@@ -1,7 +1,7 @@
1
1
  import { ParameterVariableEntity } from '../entities/index.js';
2
2
  import * as types from '../types/index.js';
3
- import { AccessedMethod } from './AccessedMethod.js';
4
- export type Tag = TagType | TagMethod;
3
+ import { AccessedFunction } from './AccessedFunction.js';
4
+ export type Tag = TagType | TagFunction;
5
5
  declare abstract class TagBase {
6
6
  readonly argumentByParameter: ReadonlyMap<ParameterVariableEntity, TagArgument>;
7
7
  private readonly _argumentByName;
@@ -14,10 +14,10 @@ export declare class TagType extends TagBase {
14
14
  readonly constructor_: types.Constructor;
15
15
  constructor(type: types.Type, constructor_: types.Constructor, argumentByParameter: ReadonlyMap<ParameterVariableEntity, TagArgument>);
16
16
  }
17
- export declare class TagMethod extends TagBase {
18
- readonly kind = "method";
19
- readonly method: AccessedMethod;
20
- constructor(method: AccessedMethod, argumentByParameter: ReadonlyMap<ParameterVariableEntity, TagArgument>);
17
+ export declare class TagFunction extends TagBase {
18
+ readonly kind = "function";
19
+ readonly func: AccessedFunction;
20
+ constructor(func: AccessedFunction, argumentByParameter: ReadonlyMap<ParameterVariableEntity, TagArgument>);
21
21
  }
22
22
  export type TagArgument = TagArgument_string | TagArgument_numeric | TagArgument_boolean | TagArgument_invalid;
23
23
  export declare class TagArgument_string {
@@ -1,7 +1,7 @@
1
1
  import { LocalVariableEntity, PackageVariableEntity, ParameterVariableEntity } from '../entities/VariableEntity.js';
2
2
  import * as types from '../types/index.js';
3
3
  import { Analyzer } from './Analyzer.js';
4
- import { ControlFlowNode, NarrowableReferenceExpression } from './ControlFlowGraphBuilder.js';
4
+ import * as controlFlow from './control-flow/index.js';
5
5
  export declare class TypeNarrower {
6
6
  private readonly _analyzer;
7
7
  private readonly _referenceExpression;
@@ -10,7 +10,7 @@ export declare class TypeNarrower {
10
10
  private _reference;
11
11
  private readonly _typeByNode;
12
12
  private readonly _isVariableAssignedInLoopCheckResults;
13
- constructor(analyzer: Analyzer, referenceExpression: NarrowableReferenceExpression, initialType: types.Type, controlFlowNode: ControlFlowNode);
13
+ constructor(analyzer: Analyzer, referenceExpression: controlFlow.NarrowableReferenceExpression, initialType: types.Type, controlFlowNode: controlFlow.Node);
14
14
  getType(): types.Type;
15
15
  private getTypeAtControlFlowNode;
16
16
  private getTypeAtCondition;
@@ -30,7 +30,7 @@ export declare class TypeNarrower {
30
30
  private getReferenceAtNode;
31
31
  private getReferenceAtLocalVariableDeclaration;
32
32
  }
33
- export type NarrowableReference = NarrowableReference.LocalVariable | NarrowableReference.PackageVariable | NarrowableReference.InstanceTypeVariable | NarrowableReference.StaticTypeVariable | NarrowableReference.Object;
33
+ export type NarrowableReference = NarrowableReference.LocalVariable | NarrowableReference.PackageVariable | NarrowableReference.ObjectField | NarrowableReference.StaticField | NarrowableReference.ObjectAutoVariable;
34
34
  export declare namespace NarrowableReference {
35
35
  export class LocalVariable implements INarrowableReference {
36
36
  private readonly _analyzer;
@@ -39,8 +39,8 @@ export declare namespace NarrowableReference {
39
39
  constructor(_analyzer: Analyzer, entity: LocalVariableEntity | ParameterVariableEntity);
40
40
  equals(other: NarrowableReference): boolean;
41
41
  contains(_other: NarrowableReference): boolean;
42
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
43
- containsExpression(_expression: NarrowableReferenceExpression): boolean;
42
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
43
+ containsExpression(_expression: controlFlow.NarrowableReferenceExpression): boolean;
44
44
  }
45
45
  export class PackageVariable implements INarrowableReference {
46
46
  private readonly _analyzer;
@@ -49,36 +49,36 @@ export declare namespace NarrowableReference {
49
49
  constructor(_analyzer: Analyzer, entity: PackageVariableEntity);
50
50
  equals(other: NarrowableReference): boolean;
51
51
  contains(_other: NarrowableReference): boolean;
52
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
53
- containsExpression(_expression: NarrowableReferenceExpression): boolean;
52
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
53
+ containsExpression(_expression: controlFlow.NarrowableReferenceExpression): boolean;
54
54
  }
55
- export class InstanceTypeVariable implements INarrowableReference {
55
+ export class ObjectField implements INarrowableReference {
56
56
  private readonly _analyzer;
57
57
  readonly variable: types.Variable;
58
58
  readonly receiver: NarrowableReference;
59
- readonly kind = "instance-type-variable";
59
+ readonly kind = "object-field";
60
60
  constructor(_analyzer: Analyzer, variable: types.Variable, receiver: NarrowableReference);
61
61
  equals(other: NarrowableReference): boolean;
62
62
  contains(other: NarrowableReference): boolean;
63
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
64
- containsExpression(expression: NarrowableReferenceExpression): boolean;
63
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
64
+ containsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
65
65
  }
66
- export class StaticTypeVariable implements INarrowableReference {
66
+ export class StaticField implements INarrowableReference {
67
67
  private readonly _analyzer;
68
68
  readonly variable: types.Variable;
69
- readonly kind = "static-type-variable";
69
+ readonly kind = "static-field";
70
70
  constructor(_analyzer: Analyzer, variable: types.Variable);
71
71
  equals(other: NarrowableReference): boolean;
72
72
  contains(_other: NarrowableReference): boolean;
73
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
74
- containsExpression(_expression: NarrowableReferenceExpression): boolean;
73
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
74
+ containsExpression(_expression: controlFlow.NarrowableReferenceExpression): boolean;
75
75
  }
76
- export class Object implements INarrowableReference {
77
- readonly kind = "object";
76
+ export class ObjectAutoVariable implements INarrowableReference {
77
+ readonly kind = "object-auto-variable";
78
78
  equals(other: NarrowableReference): boolean;
79
79
  contains(_other: NarrowableReference): boolean;
80
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
81
- containsExpression(_expression: NarrowableReferenceExpression): boolean;
80
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
81
+ containsExpression(_expression: controlFlow.NarrowableReferenceExpression): boolean;
82
82
  }
83
83
  interface INarrowableReference {
84
84
  equals(other: NarrowableReference): boolean;
@@ -90,8 +90,8 @@ export declare namespace NarrowableReference {
90
90
  * связывание для имени `б` выполняться не будет. Такое поведение необходимо при анализе циклов,
91
91
  * чтобы избежать рекурсии.
92
92
  */
93
- equalsExpression(expression: NarrowableReferenceExpression): boolean;
94
- containsExpression(expression: NarrowableReferenceExpression): boolean;
93
+ equalsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
94
+ containsExpression(expression: controlFlow.NarrowableReferenceExpression): boolean;
95
95
  }
96
96
  export {};
97
97
  }
@@ -1,7 +1,8 @@
1
- import { Entity, MethodEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity } from '../entities/index.js';
1
+ import { Entity, FunctionEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity } from '../entities/index.js';
2
2
  import * as tree from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
- import { Tag, TagMethod, TagType } from './Tags.js';
4
+ import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
5
+ import { Tag, TagFunction, TagType } from './Tags.js';
5
6
  type TextToken = tree.Token<tree.TokenKind.TextLiteral> | tree.Token<tree.TokenKind.TextTemplateHead> | tree.Token<tree.TokenKind.TextTemplatePart> | tree.Token<tree.TokenKind.TextTemplateTail>;
6
7
  export declare function getUnescapedTextFromTextToken(token: TextToken): string;
7
8
  export declare function unwrapParenthesizedExpressions(expression: tree.Expression): tree.Expression;
@@ -10,9 +11,20 @@ export declare function unaliasType(type: types.Type): types.Type;
10
11
  export declare function unaliasType(type: types.Type | undefined): types.Type | undefined;
11
12
  export declare function getPackageContainingEntity(entity: Entity): PackageEntity;
12
13
  export declare function findTag(tagTypeEntity: StructuredTypeEntity, tags: readonly Tag[]): TagType | undefined;
13
- export declare function findTag(tagMethodEntity: MethodEntity, tags: readonly Tag[]): TagMethod | undefined;
14
+ export declare function findTag(tagFunctionEntity: FunctionEntity, tags: readonly Tag[]): TagFunction | undefined;
14
15
  export declare function getRequiredTypeParameterCount(typeParameters: readonly TypeParameterEntity[]): number;
15
16
  export declare function flattenPackageMemberDeclarationList(list: tree.PackageMemberDeclarationList): Iterable<Exclude<tree.PackageMemberDeclaration, tree.PackageMemberGroupDeclaration>>;
16
17
  export declare function flattenTypeMemberDeclarationList(list: tree.TypeMemberDeclarationList): Iterable<Exclude<tree.TypeMemberDeclaration, tree.TypeMemberGroupDeclaration>>;
17
18
  export declare function isComputedVariableEntity(entity: VariableEntity): boolean;
19
+ export type EntityOrPackageNameTreeNode = EntityOrPackageNameTreeNode_entity | EntityOrPackageNameTreeNode_node;
20
+ export declare class EntityOrPackageNameTreeNode_entity {
21
+ readonly entity: Entity;
22
+ readonly kind = "entity";
23
+ constructor(entity: Entity);
24
+ }
25
+ export declare class EntityOrPackageNameTreeNode_node {
26
+ readonly node: PackageNameTreeNode;
27
+ readonly kind = "node";
28
+ constructor(node: PackageNameTreeNode);
29
+ }
18
30
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
- import { AliasTypeEntity, StructuredTypeEntity, TypeMethodEntity } from '../entities/index.js';
2
+ import { AliasTypeEntity, StructuredTypeEntity, MethodEntity } from '../entities/index.js';
3
3
  export declare class WellKnownDeclarationsLoadError extends Error {
4
4
  readonly diagnostic: Diagnostic;
5
5
  constructor(diagnostic: Diagnostic);
@@ -16,7 +16,7 @@ export declare class WellKnownDeclarations {
16
16
  none: StructuredTypeEntity;
17
17
  enumerable: StructuredTypeEntity;
18
18
  enumerator: StructuredTypeEntity;
19
- enumeratorMethod: TypeMethodEntity;
19
+ enumeratorMethod: MethodEntity;
20
20
  array: StructuredTypeEntity;
21
21
  readonlyArray: StructuredTypeEntity;
22
22
  map: StructuredTypeEntity;
@@ -27,11 +27,11 @@ export declare class WellKnownDeclarations {
27
27
  reference: StructuredTypeEntity;
28
28
  task: StructuredTypeEntity;
29
29
  error: StructuredTypeEntity;
30
- method: StructuredTypeEntity;
30
+ func: StructuredTypeEntity;
31
31
  parameterArray: AliasTypeEntity;
32
32
  defaultImport: StructuredTypeEntity;
33
33
  realName: StructuredTypeEntity;
34
34
  builtIntoPlatform: StructuredTypeEntity;
35
- typeVariableProxy: StructuredTypeEntity;
35
+ fieldProxy: StructuredTypeEntity;
36
36
  javaScriptDecorator: StructuredTypeEntity;
37
37
  }
@@ -0,0 +1,43 @@
1
+ import { Diagnostic } from '../../diagnostic/Diagnostic.js';
2
+ import { SourceFile } from '../../project/SourceFile.js';
3
+ import { NarrowableReferenceExpression } from './NarrowableExpression.js';
4
+ import { Node } from './Nodes.js';
5
+ export declare class GraphBuilder {
6
+ private readonly _sourceFile;
7
+ private readonly _controlFlowNodeByReference;
8
+ private readonly _unreachableCodeDiagnostics;
9
+ private _isInRebuildingFinallyClauseGraphMode;
10
+ private _currentPredecessor;
11
+ private _currentContinueLoopTarget;
12
+ private _currentBreakLoopTarget;
13
+ private _currentErrorTarget;
14
+ private _currentReturnTarget;
15
+ constructor(sourceFile: SourceFile);
16
+ build(): GraphBuildResult;
17
+ private visitNode;
18
+ private visitAssignmentStatement;
19
+ private visitIfStatement;
20
+ private visitWhileStatement;
21
+ private visitLoopStatement;
22
+ private visitForStatement;
23
+ private visitContinueLoopStatement;
24
+ private visitBreakLoopStatement;
25
+ private visitSwitchStatement;
26
+ private visitTryStatement;
27
+ private visitReturnStatement;
28
+ private visitErrorStatement;
29
+ private visitLocalVariableDeclaration;
30
+ private visitWhenTernaryExpression;
31
+ private visitCondition;
32
+ private visitBinaryExpression;
33
+ private visitPrefixUnaryExpressionInCondition;
34
+ private visitIsExpressionInCondition;
35
+ private setAssignmentAsCurrentPredecessor;
36
+ private visitChildren;
37
+ private addUnreachableCodeDiagnostic;
38
+ }
39
+ export declare class GraphBuildResult {
40
+ readonly controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, Node>;
41
+ readonly unreachableCodeDiagnostics: readonly Diagnostic[];
42
+ constructor(controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, Node>, unreachableCodeDiagnostics: readonly Diagnostic[]);
43
+ }
@@ -1,12 +1,12 @@
1
- import { ControlFlowNode } from './ControlFlowGraphBuilder.js';
2
- export declare class ControlFlowGraphVisualizer {
1
+ import { Node } from './Nodes.js';
2
+ export declare class GraphVisualizer {
3
3
  /**
4
4
  * Создаёт описание графа на языке Dot.
5
5
  *
6
6
  * Визуализацию графа можно посмотреть по этой ссылке:
7
7
  * https://dreampuf.github.io/GraphvizOnline/?engine=dot#digraph%20%7B%20%7D
8
8
  */
9
- static generateGraphDescriptionInDotLanguage(startNode: ControlFlowNode): string;
9
+ static generateGraphDescriptionInDotLanguage(startNode: Node): string;
10
10
  private static getLabel;
11
11
  private static createGetIdFunction;
12
12
  }
@@ -0,0 +1,5 @@
1
+ import * as tree from '../../tree/index.js';
2
+ export declare function isNarrowableExpression(node: tree.Node): node is tree.Expression;
3
+ export type NarrowableReferenceExpression = tree.IdentifierExpression | tree.MemberAccessExpression | tree.ObjectExpression;
4
+ export declare function isNarrowableReferenceExpression(node: tree.Node): node is NarrowableReferenceExpression;
5
+ export declare function unwrapExpressionForNarrowableReferenceCheck(node: tree.Expression): tree.Expression;
@@ -0,0 +1,91 @@
1
+ import * as tree from '../../tree/index.js';
2
+ export type Node = StartNode | ConditionNode | AssignmentNode | LocalVariableDeclarationNode | SplitNode | LoopNode | UnreachableNode;
3
+ declare abstract class ControlFlowNodeBase {
4
+ protected abstract thisAsNode: Node;
5
+ /**
6
+ * Для отладочных целей.
7
+ */
8
+ generateVisualizationCode(): string;
9
+ }
10
+ /**
11
+ * Начальный узел, не имеющий предшественников. Создаётся в начале функций, а также для переменных пакета и полей
12
+ * объекта с начальным значением, поскольку выражение-инициализатор может иметь собственный граф потока управления
13
+ * (например, если начальное значение - это трёхместная операция `когда` с проверкой на `пусто`).
14
+ */
15
+ export declare class StartNode extends ControlFlowNodeBase {
16
+ readonly kind = "start";
17
+ get debuggerDisplay(): string;
18
+ protected get thisAsNode(): Node;
19
+ }
20
+ export type ConditionExpression = tree.BinaryExpression | tree.IsExpression;
21
+ /**
22
+ * Хранит информацию об истинности некоторого условия. Например, если условие `а != пусто` истинно, то из типа
23
+ * переменной `а` необходимо исключить тип `Пусто`.
24
+ */
25
+ export declare class ConditionNode extends ControlFlowNodeBase {
26
+ readonly predecessor: Node;
27
+ readonly syntaxNode: ConditionExpression;
28
+ readonly isTrue: boolean;
29
+ readonly kind = "condition";
30
+ get debuggerDisplay(): string;
31
+ protected get thisAsNode(): Node;
32
+ constructor(predecessor: Node, syntaxNode: ConditionExpression, isTrue: boolean);
33
+ }
34
+ /**
35
+ * Создаётся в местах присваивания значений в переменную. После присваивания тип переменной меняется на тип выражения
36
+ * справа от равно.
37
+ */
38
+ export declare class AssignmentNode extends ControlFlowNodeBase {
39
+ readonly predecessor: Node;
40
+ readonly syntaxNode: tree.AssignmentStatement;
41
+ readonly kind = "assignment";
42
+ get debuggerDisplay(): string;
43
+ protected get thisAsNode(): Node;
44
+ constructor(predecessor: Node, syntaxNode: tree.AssignmentStatement);
45
+ }
46
+ /**
47
+ * Создаётся в местах объявления локальных переменных. Если переменной присваивается начальное значение, её тип будет
48
+ * заменён на тип присваиваемого выражения.
49
+ */
50
+ export declare class LocalVariableDeclarationNode extends ControlFlowNodeBase {
51
+ readonly predecessor: Node;
52
+ readonly syntaxNode: tree.LocalVariableDeclaration;
53
+ readonly kind = "local-variable-declaration";
54
+ get debuggerDisplay(): string;
55
+ protected get thisAsNode(): Node;
56
+ constructor(predecessor: Node, syntaxNode: tree.LocalVariableDeclaration);
57
+ }
58
+ /**
59
+ * Вспомогательный узел, использующийся в местах, где происходит разветвление графа потока управления. Тип переменной
60
+ * для этого узла определяется как союзный тип из типов переменных в предшествующих узлах.
61
+ */
62
+ export declare class SplitNode extends ControlFlowNodeBase {
63
+ readonly predecessors: readonly Node[];
64
+ readonly kind = "split";
65
+ get debuggerDisplay(): string;
66
+ protected get thisAsNode(): Node;
67
+ constructor(predecessors: readonly Node[]);
68
+ }
69
+ /**
70
+ * Используется для циклов (пока, цикл - повтор пока, для-из). Отличается от узла {@link SplitNode} тем, что предшествующие
71
+ * узлы, указанные в массиве {@link loopingPredecessors}, образуют циклы в графе потока управления.
72
+ */
73
+ export declare abstract class LoopNode extends ControlFlowNodeBase {
74
+ readonly kind = "loop";
75
+ get debuggerDisplay(): string;
76
+ protected get thisAsNode(): Node;
77
+ abstract predecessor: Node;
78
+ abstract loopingPredecessors: readonly Node[];
79
+ }
80
+ /**
81
+ * Обозначает недостижимый код. Соответствующая диагностика добавляется в
82
+ * {@link GraphBuildResult.unreachableCodeDiagnostics}. Класс {@link GraphBuilder} создаёт эти
83
+ * узлы для кода, недостижимость которого можно определить анализируя только синтаксическое дерево и не использую
84
+ * семантическую информацию. Например, инструкции, находящиеся после инструкции `возврат`, помечаются как недостижимые.
85
+ */
86
+ export declare class UnreachableNode extends ControlFlowNodeBase {
87
+ readonly kind = "unreachable";
88
+ get debuggerDisplay(): string;
89
+ protected get thisAsNode(): Node;
90
+ }
91
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './GraphBuilder.js';
2
+ export * from './GraphVisualizer.js';
3
+ export * from './NarrowableExpression.js';
4
+ export * from './Nodes.js';